Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Momentum Strategy using Heikin Ashi

One unique thing about Heikin Ashi is the calculation of open, close, high, and low

Heikin-Ashi Trading Strategy  
1) Close price: Heikin-Ashi candle is the average of open, close, high and low price  
2) Open price: Heikin-Ashi candle is the average of the open and close of the previous candle.  
3) High price: the high price in a Heikin-Ashi candle is chosen from one of the high, open and close price of which has the highest value.  
4) Low price: the high price in a Heikin-Ashi candle is chosen from one of the high, open and close price of which has the lowest value.

Investment Logic is as following:
When 4 consecutive bullish candlesticks formed (one candlestick = 1 day), we will long the position and exit in 2 days no matter what.

Investment Universe: The top 30 highest liquidity stocks based on trading volume, and stocks price larger than $5

Returns aren't that exciting after financial crisis, it has beta around 0.00 throughout the period; However, the results seemed reverse mirrored the s&p500 performance, how can i still achieve almost 0 beta in this case?. Please feel free to make any positive or negative comments about the model, e.g: whether it is overfitting, or whatsoever. It will be much appreciated!

Thank You

Best,
Felix

3 responses

HI Felix

I cleaned up your code, optimized for speed, solved the leverage issue and got rid of stop loss. Perhaps you can build further from there.

Vladimir,

Thanks for the help! Learnt from the optimized code. Very much appreciated!

Felix

Vladimir,

Thanks for the help! Learnt from the optimized code. Very much appreciated!

Felix