Kelly Criterion Part 2: Avoid Lotteries and Reverse Lotteries

Somewhere along the way someone probably told you not to play the lottery – that it’s a dumb idea.  And this is true.  The typical state lottery pays out about 50% of the money it takes in as prizes.  The other 50% is retained by the state to build parks or educate kids or some such nonsense 😉  It’s no exaggeration to say that lotteries are a tax on people that are bad at math – a sort of tax I heartily approve of.

There’s an interesting intersection between trading and lotteries you may not have thought about.  One aspect of a lottery is the deficient payout – in the typical case $0.50 is paid out for every $1 payed in.  In other words playing the lottery has a profit factor of 0.5.  Another aspect is the extreme imbalance of payouts – infrequent huge wins paired with frequent small losses.  This later aspect is what I want to investigate today – especially the idea of lotteries where the payoff is greater than pay-in.  In other words, “good” lotteries.

Continue reading

Monkey Math Part 1 – Deciding If Trading Systems Work

I realized this morning that it’s been almost an entire year since I wrote about the trading system development process pictured at right.  That’s almost criminal, because in all that time I’ve never really gotten around to explaining the heart of the system development process: testing systems to make sure they work, and refining them when they don’t.  This corresponds to the formal specification, backwards/forwards testing & re-work boxes in the diagram.

These steps are in some sense the most dangerous parts of system development process because it’s easy to fool yourself into thinking a system works when it doesn’t. Continue reading

Mathematical Literacy And Trading

A little over a week ago I posted on the topic of the Kelly Criterion and its use in bet sizing.  This post was notable for being the most mathematically sophisticated material I’ve covered thus far.  On previous topics I’ve made some effort to hide the math – sort of like those cooking shows where they pull a fully baked cake from the oven immediately after putting the pan full of batter in.  There are upsides and downsides to hiding the math this way, but I’m starting to think the downsides outweigh the upsides. Continue reading

Alpha and Beta: Slicing and Dicing Stocks

Before we continue with the speculative alternatives to investment series, I need to introduce some mathematical concepts.  Yeah, yeah.  You’ve got a hangover and barely eked out a C- in calculus.  But stick with me.

Two key tools of quantitative finance are:

  1. combining financial instruments together
  2. slicing a single financial instrument up into smaller pieces to understand how it behaves

It’s pretty easy to understand how you combine instruments – the easiest way is to make an index.  You take a bunch of instruments (say, stocks) that are somehow similar and average their price.  Typically you weight the average by a size metric like market cap.  Voila – an index.  This is a big data approach to understanding the movement of the market.

It’s a little less clear how you take one instrument and slice it up.  Turns out there’s slightly beefier math involved – Pearson correlation, linear models and linear regression in this particular case.  It’s OK if you skipped that class – there are plenty of tools to help us get through the math. Continue reading

Embrace Big Data and Simple Analysis

I’ve been seeing the buzzword “big data” cropping up a lot lately.  As best I can tell, in business-droid speak it refers to any very large collection of non-uniform or hard to work with data.  For example, all the videos on YouTube.  The large part should be obvious.  The hard to work with part stems with the fact that you can’t really extract any value from the videos without doing something difficult (or at least time consuming) – watching them.  There’s lots of big data out there – census data, social media, credit card data, military intelligence, etc.

While I’m always loath to jump on trendy business bandwagons, I think this one is bringing to the public an idea long overdue, and which I strongly believe in:

Given a choice between having better analysis or more data, 99% of the time you’d be way better off having more data.

Continue reading

Cool Tool

I thought people might be interested to know that Wolfram Alpha has several useful financial/economic calculators for  bonds, options, interest rates, time value & historical money etc on their website.  While lots of websites have calculators, it’s nice to have that functionality combined withe Alpha’s very good general math support.

Just a cool little something I stumbled into.  I’ve got another big post in the works that should go up today or tomorrow.

Adjusting to Market Volatility

If you pay attention to the financial press, you’ve probably heard the markets described as “volatile” at one point or another.  In this context, volatility is not merely descriptive.  It has a specific mathematical meaning which can help you make better trading (or for that matter, investing) decisions.  In order to succeed as a trader you need to have a strong working understanding of volatility and its implications. Continue reading

Additive vs. Multiplicative Thinking About Money

If you think way back to grade school, you may remember that you studied addition and subtraction one year, and then a grade or two later studied multiplication and division.  Each pair of arithmetic operators intrinsically go together – they’re opposites of each other (algebraists would say inverses).  What I want to explore today is that each pair of arithmetic operators carries with it a means of thinking about numbers, and thus by extension thinking about money.  These two means of thinking are both useful but they’re surprisingly distinct, and people frequently make the mistake of applying the wrong type of thinking in a given circumstance.  My whole premise here may seem irredeemably nerdy, and it is.  But bear with me anyways – I reckon there’s real insight to be had. Continue reading

Profit Factor – A Means of Comparing Strategies

In order to evaluate trading strategies, it’s very handy to have one number that represents how good a given strategy is – bigger is better.  I’ve suggested a couple of ways of doing that –  win rate and expectation.  Both are uselful, but both also have substantial limitations that render them problematic in the real world.  What I want to do here is briefly describe those limitations, and then suggest an alternate mathematical construct called “profit factor” you can use for evaluating systems. Continue reading

The Surprising Effect of Small Edges

Imagine you have a trading method which trades the GLOBEX west Texas crude oil contract (ticker:CL).  This is a futures contract that represents 1000 barrels of crude oil.  At current oil prices, the contract has a value of about $100,000.  Price for CL is specified in dollars per barrel, and the tick is one cent per barrel, or $10 for the contract.  Now, let’s say this method has very simple trade management – once a trade is entered, a stop loss order is placed 10 ticks away from the entry price, and a limit order to exit is placed 10 ticks the other direction.  These orders are set up as a “one cancels all” or OCA group, meaning that if one of the two exit orders executes, the other is canceled.

This is a very simple type of trade setup, and is common for very short term trades.  In this example once you enter a trade (assume a 1 contract position) you should get one of two resuls:

  1. You win $100 minus fees
  2. You lose $100 plus fees + slippage

Fees in this example are simply your transaction fees.  Slippage is the cost associated with stop orders executing at a price worse than the trigger price, which they can do since they trigger market orders.  For now, let’s assume that the round trip transaction fees for 1 contract of CL are $4 (my broker charges $4.01 for some strange reason) and that slippage is zero.  The slippage assumption is unrealistic and I’ll address it in a subsequent post, but for now I want to get at a different aspect of the situation.  I want to know:

How often do you have to place your trade in the right direction in order to make good money here? Continue reading