Blog Archives

There is more than one way to get data

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.1
Happy Halloween, everybody! So the plan for today is

Get as much historical data as possible.
Filter the data with a market scanner.
Profit!!!

Data retrieval
This week I had fun retrieving data with Perl. The script I made, reads a file with [...]

Share
Posted in programming | Tagged , , , | Leave a comment

Portfolio analysis with Pandas for the win

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.2
I saw a PyCon presentation about pandas. Pandas is a data analysis Python library, which works with timeseries data and handles missing data automatically. It is based on NumPy and should work well together with for instance scikits.statsmodels. [...]

Share
Posted in programming | Tagged , , | Leave a comment

Big drops in stock price explained

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.3
It’s all about gravity. The same thing that happens, when Wilie E. Coyote runs too far off a cliff. On the menu for today is:

Try out a new screener and portfolio.
Gravity calculations.
Profit!

Big drops screener
The screener selects statistically big [...]

Share
Posted in programming | Tagged , | Leave a comment

Jarque Bera, the CAPM and undervalued stocks

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.4
The Capital Asset Pricing Model ( CAPM ) links the expected return of assets to their risk. A linear fit of this relationship gives us the so called Security Market Line ( SML ). One of the problems [...]

Share
Posted in programming | Tagged , | Leave a comment

Stock selection with the mad CAPM and liquidity filtering

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.5
The Capital Asset Pricing Model ( CAPM ) usually uses variance or standard deviation as a risk metric. I invented a slight modification of the model, which I call the mad CAPM ( well OK maybe I did [...]

Share
Posted in programming | Tagged , , | Leave a comment

Random walks get you nowhere

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.6
Well, you might bump into a wall repeatedly or get hit by a car. The best you can do is get pretty close to your desired destination. So I made some random walk simulations using a trinomial model [...]

Share
Posted in programming | Tagged , , | Leave a comment

How skewed are the prices of stocks?

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.7
The 3 moment CAPM takes into account the mean, variance and skewness of asset returns. An investor prefers high positive skewness and low risk, because this corresponds to higher returns. I also did an experiment with fractional Brownian [...]

Share
Posted in programming | Tagged , , | Leave a comment

Stock returns entropy, the CAPM and target practice

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.8
Entropy is a measure of uncertainty and therefore risk. So I attempted to replace the variance of stock returns in the CAPM with entropy. I also tried to save some pennies by “shooting” below the open price on [...]

Share
Posted in programming | Tagged , , | Leave a comment

How to optimize maximum drawdowns of stock returns

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.0.9
Merry Xmas everybody. If you don’t celebrate Xmas, don’t worry, you are not missing that much. Maximum drawdown is defined as the maximum decline from a historical peak. Obviously, this is a measure of risk as well. So [...]

Share
Posted in programming | Tagged , , | Leave a comment

What is the optimal holding period for shares?

This entry is part of 17 in the series Numpy Strategies

Numpy Strategies 0.1.0
Happy New Year! So I was collecting evidence for my prediction of the gold bubble bursting early in 2011 and I found this article. Very short summary – 14 June 2011. What do I think? I think this [...]

Share
Posted in programming | Tagged , , | Leave a comment