RSI Strategy

Description

RSI Strategy is build to gain profit on buying / selling shares in a specific market conditions. RSI Strategy calculates two values:

  • Average gain - weighted average of gains
  • Average loss - weighted average of loses

This two values are used to compute a Relative Strength Index (RSI):

\text{RSI} = 100 - \frac{100}{1 + \frac{\text{avgGain}}{\text{avgLoss}}}

Moreover, there are two RSI values given: overbought (normally around 70) and oversold (normally around 30) which are used in a process of making a decision if a strategy should sell or buy an asset. In a process of computing both averages we use some number of last price values (= Number of Periods; normally around 20). Consider a price of the last trade p_l and the previous one p_{l-1}. Gain has positive value when p_l > p_{l-1}, otherwise it is equal to zero. Loss can be defined in a similar way. It has positive value when p_l < p_{l-1}, otherwise it is equal to zero.

Gain =
\begin{cases}
p_l - p_{l-1} & p_l - p_{l-1} > 0 \\
0 & p_l - p_{l-1} \leq 0
\end{cases}

Loss =
\begin{cases}
|p_l - p_{l-1}| & p_l - p_{l-1} < 0 \\
0 & p_l - p_{l-1} \geq 0
\end{cases}

RSI strategy starts decision rule, if orders should be sent after receiving Number of Periods trades.

Market Data

  • Last trade

Parameters

Parameter name Description Essential
Number of Periods Number of last ‘last trades’ events taken into account in a computation of the Avg~Gain, Avg~Loss Yes
Oversold Level Upper boundary of the RSI values area where market is oversold Yes
Overbought Level Lower boundary of the RSI values area where market is overbought Yes

Conditions

Open position

Side Buy or Sell
Amount One asset per order
Price Last market price
Type Price limit

If Overbought Level is crossed by the counted RSI from the top side then sell order is sent. Similarly, when the Oversold Level is crossed from the bottom side by the counted RSI the buy order is sent.

Close position

There is no closing position condition.

Termination

There is no strategy termination condition.

Time frame

Strategy bases on some initial Number of periods of data collection without trading and is designed to enable adjusting both: period of data collection and its trading time span from hours to whole weeks.

Further information & source

PLEASE NOTE: Empirica does not provide tax, investment, or financial services. The information available through this website is provided on an "as is" basis at user's sole risk and does not constitute trading advice or a solicitation to buy or sell any stock, option, future, commodity, or forex product. Empirica makes no guarantees as to the accurateness, quality, or completeness of the information and shall not be responsible or liable for any errors, omissions, inaccuracies in the information or for any user's reliance on the information. User is solely responsible for verifying the information as being appropriate for user's personal use, including without limitation, seeking the advice of a qualified professional regarding any specific financial questions a user may have. Past performance is not necessarily an indication of future performance. Trading is inherently risky.