Abstract: In this notebook, we seek to address the problem: does an FM (Fund Manager) or investor beat the index? The problem is looked at from two angles: a frequentist hypothesis test using the binomial distribution, and a Bayesian statistician using a Beta prior.
This has been an interesting experiment for me. I was interested in writing about testing whether a fund manager could outperform an index. I would normally have written in LaTex, but I decided to experiment with iPython3. iPython3 is a great little bolt-on for Python that all the brainy boys are using these days. iPython3 is often combined with scipy for scientific computing. You end up with a cross between Mathematica, where you can do exploratory computing; and Knuth’s Literate Programming, where you intersperse code with text. It means that you don’t just throw code at the reader, but walk them through an argument in a discursive style.
The way everything is set up might seem a little strange. The file is in the form of a python notebook (.ipynb), that can actually be downloaded from my website:
That wont necessarily do you any good, because it is actually a JSON file used by iPython3. If you have iPython3 set up, then you can experiment with it yourself. Otherwise, there is a site called nbviewer.ipython.org that actually renders the notebook for you, so that you can view it as an html page. It gives you very nice rendering, and you can even see the graphical output. I’m quite impressed. I dare say it is straighforward to render the notebook to html itself, but I haven’t gone down that route yet.