Publications by Milk Trader

Programming Outside the Box: A Recursive Function in R

11.03.2011

I heard a talk given by Ruby creator Yukihiro Matsumoto where he was rambling about how he came about becoming a programming language developer. He mentioned an important milestone as being his grasp of the idea behind recursion. I’ve kept that in mind and decided to dig into the idea a little bit and was pleased to discover somethi...

2123 sym R (257 sym/3 pcs) 2 img

Yeah Sure, Maybe, Well … Okay

23.03.2011

Whoever wrote the book on statistics, probably avoided getting a proper education in literature. At least that’s my null hypothesis. The cryptic and awkward presentation of probabilities common amongst the Frequentists (no, not the Latin American Socialist faction you’re thinking of) is legend. They speak of the null hypothesis an...

2167 sym R (3890 sym/1 pcs) 2 img

Silver Is A Weighted Coin

24.03.2011

editorial note: there is an error in the code explained below the code. When you flip a quarter, you normally assume the coin is fair and that there is a 50% chance of getting either heads or tails. Option pricing assumes the world of trading is filled with fair coins. In other words, there is basically an equal chance that the option’s underl...

2100 sym R (2397 sym/2 pcs) 2 img

Volatility Violins

28.03.2011

Unlike many humans, markets love change. In fact, they look forward to it with great anticipation. Regular people like stability, for the most part. Unless you’re a career gypsy, you like to stay in one place for some time. Making a home. Settling in, as it were. Unlike markets, where volatility is the raison d’etre.I’ve plotted...

1156 sym R (309 sym/1 pcs) 4 img

Feed Your (Machine) Brain

03.04.2011

Few can tell you what goes into a chicken nugget, but most will agree that it’s good for your brain. If you’re a little sluggish and can’t focus, what do you normally do? That’s right, you pop a couple chicken nuggets. And similar to our brains, our algorithms need some food too, to think properly. It’s not a simple matter f...

3683 sym R (1678 sym/8 pcs) 2 img

Algorithm Whisperer

06.04.2011

I was staring at my favorite trading algorithm the other day and I could swear it wanted to tell me something. I’ve made contact with it in the past, but our conversations pretty much ran along the lines of “What position are you in the market?” to which it would reply “long”, “short” or “flat”. And that was pretty m...

2157 sym R (1290 sym/7 pcs) 10 img

A Super-Easy, Simple-Dimple Backtester in R

09.04.2011

I cut my finger on a paring knife this morning. Don’t use a sharp knife to spread butter on your toast. It’s better to limit yourself to using dull kitchen utensils until the caffeine kicks in. No matter, I still have most of my digits to type in a simple backtesting program in R. Good thing it’s only about 15 lines of code.requ...

732 sym R (685 sym/1 pcs) 2 img

Recursive Trading System in R

15.04.2011

I have a trick knee. Normally, it works just fine. But if I stand on my head when its raining on Tuesdays and Thursdays and pinch my nose, it hurts. Not just a little. It hurts a lot. I went to the doctor and he told me not to stand on my head when it’s raining on Tuesdays and Thursdays and pinch my nose. I left the office a little ...

1958 sym R (1709 sym/1 pcs) 6 img

Chop, Slice and Dice Your Returns in R

24.04.2011

I have a knife rack on my kitchen wall with all my kitchen knives easily identifiable and accessible. I also have small scars on my hand where each knife can claim to have left a mark. It’s not the knife’s fault, of course. They hardly like being suddenly dropped and cursed at. They have no control over who gets picked on a given ...

6327 sym 2 img

Bug Collector

26.04.2011

Most are quite unamused to find an ant infestation in their kitchen around this time of year. Time to start spraying that stuff that’s not supposed to be harmful to humans but that you always wonder if it is anyway. Some bugs, such as ant attacks or software glitches, are bad. But I’ve got a growing collection of good bugs. Tradin...

2365 sym R (1028 sym/7 pcs) 6 img