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

Clone Algorithm
15
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 583ec5ee1b3320626822158b
There was a runtime error.
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.

Clone Algorithm
31
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 583f6fe86698f0622d8e3178
There was a runtime error.

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