Computing RSI from Resampled Intraday Close Prices
Summary
The document addresses how to calculate the Relative Strength Index when intraday prices are resampled into longer intervals, such as ten-minute bars, while decisions or updates occur more frequently. It asks whether to rebuild a moving history of bars at every minute or keep completed bars fixed and update only the current partial bar.
The answer emphasizes that RSI was developed using closing prices and recommends calculating it from the available intraday prices when feasible. For a ten-minute aggregation, the suggested approach is to calculate and store RSI inputs at completed interval boundaries, then use those historical values alongside the newly completed close when the next interval ends. This reduces repeated recalculation and provides a consistent sequence of interval closes. The response does not compare alternative bar alignment conventions or discuss how partial bars should be handled in a live strategy, so implementations should define their timing and data availability carefully.
Key ideas
- RSI is based on price closes, so define which interval closes form its input series.
- The suggested ten-minute approach stores values at completed bar boundaries.
- At the next boundary, combine the new close with stored history to update RSI.
- Intraday calculations can involve substantially more observations than slower-frequency calculations.
- The answer does not assess partial-bar RSI or compare different resampling conventions.
Tags
Full text
# Correct way to compute RSI in a moving window # Correct way to compute RSI in a moving window I am trying to compute the RSI using the ticker price. I have troubles at the time to implement the RSI when I want to compute it every 1 minute but using windows to compute the OHLC of 10 minutes. I don't know how to use the OHCL resampling for example if I want to compute the RSI for a the time 03:55. Let's say that I use the close value as the input for the RSI. Do I have to compute the close every 10 minute back at times 03:55, 03:45, 03:35, 03:25, ...., or I have to compute the OHLC values at times 03:50, 03:40, 03:30, 03:20 and the only "truncated" and incomplete window is the last one? Let's say the I use the following parameters : - $\Delta t$: time window to compute the OHCL values - $N$: number of windows used to compute the RSU So the question would be, do I have to move jointly the hole big window $W=N \Delta t$ one minute at a time, or the the OHLC values for the previous complete windows remains constant (at times 03:50, 03:40, 03:30 ) and the only that is changing is the last one till it gets filled? Thank's! ## Answer by Peter (score 1) https://quant.stackexchange.com/a/36586 The concept of RSI was developed by Welles Wilder on the basis of close prices. On intraday prices, I would suggest to calculate RSI with all possible prices. Yes, that's a technical problem because of the amount of data! But this problem is the same as our ancestors have 40 years ago when computers were extremely expensive. So when you have a 10 minute conflation, I would compute it at the given times 03:50, 03:40, 03:30, 03:20 and store it in database. So on 04:00, you calculate a new value for 04:00 and take the history values for 3:50, 3:40 from your database.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.