TradingView research workflows

Intermarket analysis on TradingView: hypotheses and data controls

Intermarket analysis studies relationships among stocks, bonds, commodities and currencies. On TradingView, use those markets to frame a small number of testable hypotheses, then compare consistently defined observations. A relationship can change sign across economic conditions. A convincing overlay alone does not establish causation, a leading signal or a tradable advantage.

See the decision guide

Start with four markets and three hypotheses

John Murphy describes intermarket work across these four market groups and notes that relationships change with economic conditions. Use a limited hypothesis map instead of searching every pair for a persuasive chart. The arrows below are proposed mechanisms to investigate, not estimated causal effects or fixed market laws.

  • Choose one link as the primary test. Keep the others as competing explanations, rather than three votes that must confirm a trade.
  • For a lead claim, pair information known at time t with the outcome after t. A same-week association answers a different question from a next-week forecast.
  • Write the target market and rejection rule before inspecting outcomes. A failed relationship is a result to retain, not a reason to change symbols silently.
Proposed linkObservable research questionCompeting explanation
Weaker growth expectations → stocks and bondsDuring equity losses, does the selected government-bond price proxy gain over the same completed interval?Inflation pressure or a higher term premium may make both prices fall.
Commodity supply pressure → bonds and stocksWhen the chosen commodity rises, do bond prices fall and equities weaken over the declared horizon?A demand-led commodity rise may accompany stronger corporate earnings instead.
Dollar appreciation → USD commodity pricesDoes a rise in the chosen dollar measure coincide with, or precede, weaker commodity returns?Commodity supply disruption may dominate the currency relationship; one FX pair does not represent every dollar cross.

Fix instruments and transformations

Create a data dictionary before opening the comparison. Record the exchange-qualified TradingView symbol and provider for every input. The four roles below are a research design; choose actual instruments that answer your question and retain their definitions throughout the study.

  • For positive price observations, define simple return as P(t) / P(t-1) - 1. A price-level correlation can reflect shared trends rather than the return relationship being tested.
  • A 10-year yield moving from 4.00% to 4.20% changes by +20 basis points. That is neither a 20% move nor a bond investment return. Do not substitute yield changes for bond-price returns while preserving the same sign interpretation.
  • If studying investor returns in USD, translate foreign asset prices into USD at matched FX observations. If studying local market reactions, retain local returns and treat FX separately. State which question the chart answers.
  • Hypothetical currency check: an asset gains 5% in EUR while USD per EUR falls 4%. Its USD return is 1.05 × 0.96 - 1 = +0.8%, before costs. Simply subtracting four percentage points would give the wrong result.
Market roleMeasurementDefinition that can change the conclusion
StocksReturn of one broad equity index or ETFPrice return versus dividends included; country and currency exposure
BondsReturn of a government-bond fund or indexMaturity, duration, distributions and credit exposure; a yield series is a different variable
CommoditiesReturn of a specified commodity or basketSpot versus futures, contract rolls, adjustment policy and basket weights
CurrenciesChange in one FX pair or dollar indexQuote direction and basket composition; EURUSD rising means USD weakens against EUR

Set up TradingView without changing the comparison window

Open a standard time-based chart and add the other instruments with Compare. Same % scale compares percentage moves from the first visible bar; New price scale retains a separate price axis, and New pane separates overlapping series. TradingView documents that scrolling or zooming changes the percentage baseline. Save exact start and end timestamps with the chart capture.

  • Use one declared horizon, such as completed weekly observations, for all four series. Record session, timezone, price adjustments, feed delay and the exact start and end dates.
  • For each weekly endpoint, accept a row only when all required series have fresh observations meeting the chosen time rule. Weekly candles can still close at different instants across exchanges.
  • If simultaneous observations are unavailable, declare a maximum tolerated time difference in advance and report it. A common calendar date does not prove that prices were available together.
  • An example matching policy requires valid observations at both ends of each scheduled weekly interval. If either endpoint is missing, exclude that interval and record the exclusion. Do not bridge it with a two-week return labelled as one week.
  • A market holiday, halt or delayed feed must not become an invented zero return. Changing the chart timezone cannot create fresh data. Keep valid and excluded observation counts beside every result.

A correlation sign change can disappear in the full sample

This deliberately small, hypothetical example uses paired weekly equity and bond-price returns in percentage points. It demonstrates arithmetic, not an estimated economic relationship. In each four-week block, both series have mean zero. Pearson correlation is the sum of paired deviations divided by the square root of the product of the two sums of squared deviations.

  • For A, the cross-product sum is -8 and both squared-deviation sums are 10: -8 / √(10 × 10) = -0.80. For B, the numerator is +8, giving +0.80.
  • Pooling A and B gives numerator zero and squared-deviation sums of 20, so the result is zero. That average conceals two opposite relationships; it does not show that the markets were unrelated within each block.
  • Four observations cannot establish a reliable regime model. In a real study, preselect windows, show sample counts, inspect outliers and retain a later evaluation period. Overlapping rolling windows are not independent replications.
  • If either series has zero variance, correlation is undefined. Missing matched returns should reduce the sample count, not be filled with zeros to obtain a number.
BlockEquity returnsBond-price returnsCorrelation
A: four observations-2, -1, +1, +2+1, +2, -2, -1-0.80
B: four observations-2, -1, +1, +2-1, -2, +2, +1+0.80
A and B combinedAll eight observationsAll eight observations0.00

Economic phases change the mechanism, not just the label

Federal Reserve research links bond hedging behavior to inflation conditions and the shocks affecting the economy. Its cited study measures equity returns against changes in government-bond yields, so its reported sign must not be read as a correlation of equity and bond-price returns. The scenarios below describe hypotheses for interpretation; they are not a mechanical asset-rotation schedule.

  • FX remains relative: the same domestic shock can have different currency effects depending on conditions abroad. Test the selected pair or index instead of assigning one universal dollar response.
  • Separate retrospective explanation from a signal available at the time. NBER dates US business-cycle turning points after gathering sufficient evidence; a later recession label was not known on its first historical day.
  • For a live rule, use a precisely defined input available by the decision timestamp, with its release time and original data vintage. For a retrospective study, label the phase classification as hindsight and keep it out of the signal inputs.
Economic settingRelationship worth testingReason it may fail
Growth weakness with contained inflationStocks weaken while government-bond prices rise; industrial commodities may weaken.Fiscal risk, credit risk or changing term premiums can interfere with the bond response.
Inflation pressure and tighter expected policyStocks and bond prices may fall together, changing the stock-bond return correlation sign.Inflation already priced into markets or stronger earnings can alter the equity response.
Recovery from weak demandStocks and industrial commodities may rise together while bond prices soften.A commodity supply shock can produce a similar price move without a broad recovery.

Write a falsifiable research ticket

Example question: during weekly equity losses, does the selected government-bond proxy provide a positive return over the same interval? Freeze the instruments, USD return convention and endpoint policy first. Use the first 52 valid weekly intervals for exploration and the next 26 for evaluation. These are illustrative design choices, not a sufficient-sample guarantee or a tested result.

  • Passing the frequency check does not establish a useful portfolio hedge. A few large bond losses can outweigh frequent small gains; exposure sizing and covariance magnitude also matter.
  • Report uncertainty and all tested variants. Selecting the best window, commodity and currency after seeing outcomes can manufacture an apparent relationship.
  • This ticket tests simultaneous co-movement. To study a forecast, rewrite the outcome as a future return and shift inputs so they were available before that return interval started.
Ticket fieldExample specification
Primary outcomeShare of negative equity weeks with a positive bond return; also report mean and worst bond return in those weeks.
ReferencePositive-bond-return frequency across all evaluation weeks, with numerator and denominator shown.
Predeclared rejection ruleReject the stated conditional claim if its positive-return frequency does not exceed the reference in the evaluation period.
Data sufficiency ruleIf fewer than 10 negative equity weeks are observed, mark the chosen evaluation as inconclusive; the cutoff is a planning choice, not statistical proof.
Sensitivity checkRepeat with a previously specified alternative bond duration and disclose whether the direction changes.

Turn observed conditions into a monitor and a dated journal entry

Once the data rules are fixed, give Pineify Pine Script AI Coding Agent a specification for an editable chart aid or alert: exact symbols, transformations, completed-bar timing, common observation policy and missing-value behavior. Test the generated values against recorded inputs in TradingView. An alert should describe an observable condition, not announce that a hidden economic phase has been detected.

  • Monitor acceptance checks: reconcile one ordinary observation, one holiday gap and one currency conversion. A missing required input should produce an unavailable state and suppress the dependent alert.
  • Use Trading Journal diary content for the dated hypothesis, expected sign, target horizon and invalidation rule. Include a saved chart URL or screenshot file reference in the note; retain the actual capture with your research files.
  • At review, record the outcome and lessons learned while retaining the original hypothesis. Separate a rejected hypothesis from a data failure or a rule changed after the event.
  • The journal stores your record and the agent helps express rules in code. Neither supplies a validated causal model, historical data vintages or a profitable trading strategy.
Where Pineify fits

Pine Script AI Coding Agent

Describe the observable cross-market conditions and data checks you want to monitor. Generate editable Pine code, then verify the requested series and alerts in TradingView.

Also useful: Trading Journal. Keep dated hypotheses, chart references and review notes in diary entries so the original reasoning remains available when the outcome is known.

Build a cross-market monitor

Frequently asked questions

Educational research workflow, not investment advice. Numerical examples and research thresholds are hypothetical. Correlation, a chart alert and a plausible economic explanation do not guarantee causation, diversification or future returns.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.