Direct answer
R Squared changes when you change the way you calculate it. In practical charting, “settings” usually mean choices like the lookback window length, which data points are included, and sometimes what variables are regressed against what. Those choices change how sensitive the fit measure is and how much it smooths or exaggerates short-term shifts.
Mechanism and definition
R Squared (often written as R²) describes how strongly one variable can be explained by another using a regression model. In a simple interpretation, higher R² means the observed points are closer to a straight-line relationship under the regression you used; lower R² means the relationship is weaker or more scattered.
What changes when you adjust settings is not “R² itself,” but the dataset and/or the regression setup that produces the number. For example:
- Lookback window length: A longer window averages over more history. That typically makes R² less jumpy because the regression sees a broader mix of market behavior. A shorter window can make R² respond quickly to regime shifts, but it can also fluctuate more.
- Data frequency and sampling: Using different bar sizes (e.g., minutes vs. hours) changes which observations you feed into the regression. The same underlying market can look more or less linear depending on sampling.
- Which series you regress: Some charting implementations compute R² for a trendline fit, while others regress one transformed series against another. If the dependent and independent variables change, the meaning of the resulting R² changes too.
A simple model of this sensitivity is: R² is a statistic computed from the current window. Replace the window or the input series, and the computed fit can change even if the market is “the same” in real time.
Evidence or example (with stated assumptions)
Assume you compute R² from a regression over the most recent N closing prices to a straight-line trend.
- Scenario A: smaller N (e.g., 50 bars). If the last 50 bars include a sharp directional move, the points may cluster more tightly around a line, raising R². If that move ends, R² can fall quickly because the next bars re-shape the window.
- Scenario B: larger N (e.g., 200 bars). If the same chart has mixed behavior across those 200 bars (trend followed by sideways action), the fit to a single straight line will be weaker on average, so R² may be lower and change more slowly.
This shows the trade-off: shorter windows often make R² more responsive to local changes, while longer windows often make it more stable. Neither choice is inherently “better” because they measure different windows and therefore different local relationships.
Limitations and risks (and what can fail)
Several failure modes can occur when people treat R² as a dependable decision variable:
- Changing settings breaks comparability: A high R² computed over a short window is not directly comparable to a high R² computed over a long window because they reflect different datasets and different regression contexts.
- Regime shifts can make the fit stale: R² describes fit inside the current window. If the market’s behavior changes (volatility, trend persistence, or structure), the historical linearity can vanish, and R² can drop quickly.
- Data and implementation differences matter: If two platforms use different transformations (price vs. returns), different regression targets, or different handling of missing data, the resulting R² can differ even with the same “settings” name.
- Costs and execution are not included: R² is a statistical fit measure of a relationship in the data, not a measure of tradability. Transaction costs, spreads, and execution quality can dominate real outcomes, but they do not appear in the R² computation.
These risks mean R² should be understood as a descriptive statistic of the current window’s relationship, not a standalone guarantee about future behavior.
Verification and next question
To independently verify how settings change R², do the following:
- Identify the exact inputs: What series is being regressed (raw price, returns, or another transformation)? What is the dependent vs. independent variable? - Change one setting at a time: Adjust only the lookback window (or only the sampling frequency) and observe whether R² becomes more responsive or more stable.