Comments on: Finding The Optimal Period https://easylanguagemastery.com/building-strategies/finding-optimal-period/?utm_source=rss&utm_medium=rss&utm_campaign=finding-optimal-period Helping you Master EasyLanguage Wed, 27 Jul 2022 16:35:18 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Bard https://easylanguagemastery.com/building-strategies/finding-optimal-period/#comments/7160 Thu, 18 May 2017 16:31:41 +0000 http://systemtradersuccess.com/?p=11465#comment-7160 Hi Curtis,

Thanks for an interesting article. What would easy language code look like to sum the amount of time that the RSI spends above 80 and below 20, and take the difference?

I was curious to know which period (2…14) in the first table produced the $82,812? Ditto for both columns (30/70 and 20/80) in the second table for the Emini?

Cheers
Bard

]]>
By: Cameron Osborne https://easylanguagemastery.com/building-strategies/finding-optimal-period/#comments/7159 Wed, 10 May 2017 11:52:37 +0000 http://systemtradersuccess.com/?p=11465#comment-7159 Great analysis. I did something very similar for tracking the “RSI Trend” over a lookback of 55 periods. The analysis gave a result of 1 for instances where the RSI was over 69, and 1 when under 31. An RSI calculation was performed:

N1 = 2… 14
N2 = 55

r = rsi(src, N1)

// Normalize extreme levels
OB = r > 69 ? 1 : 0
OS = r < 31 ? 1 : 0

// Average gain, average loss
avgU = (avgU[1] * (N2 – 1) + OB) / N2
avgD = (avgD[1] * (N2 – 1) + OS) / N2

// RSI calculation of the trend
rTrend = (100 – 100 / (1 + avgU / avgD)) / 100

The result shows when the normal RSI of period N2 is spending most of its time near extreme levels. This helped, for example, filter out short trades when the "RSI Trend" was above say, 70. When the RSI Trend is above 70, the vast majority of the time when the normal RSI breached oversold (< 30), there was an immediate snap back up.

Great work, I will research this further on intraday testing in Trading View.

]]>
By: DaveM https://easylanguagemastery.com/building-strategies/finding-optimal-period/#comments/7158 Tue, 09 May 2017 04:29:38 +0000 http://systemtradersuccess.com/?p=11465#comment-7158 I have worked with RSI quite a bit, never thought to record the results. My idea would be to work with the highest win percentage and lowest equity drawdown. I suggest that changing the period beyond 14 might give some nice results also.
Thanks for the insights.

]]>
By: Curtis https://easylanguagemastery.com/building-strategies/finding-optimal-period/#comments/7157 Mon, 08 May 2017 23:13:28 +0000 http://systemtradersuccess.com/?p=11465#comment-7157 The buy/sell thresholds are exactly the same. The adaptive approach dynamically changes the period (lookback) from 2 to 14 based 90 day lookback. To understand what the algo is doing, imagine adjusting your RSI lookback every day from 2 to 14 with the goal of finding the one that is most well-balanced, i.e. one that isn’t stuck in overbought or oversold conditions.

]]>
By: Bruce Berger https://easylanguagemastery.com/building-strategies/finding-optimal-period/#comments/7156 Mon, 08 May 2017 10:14:58 +0000 http://systemtradersuccess.com/?p=11465#comment-7156 Thanks for sharing this. I was wondering if you could clarify something. What are the buy/sell thresholds you used on the adaptive RSI approach? Your base case is a two-period RSI with longs taken below 30 and exits above 70. I don’t believe you explicitly said what they are. If you did, I apologize for missing it. Thanks.

]]>