Forex Correlation
workflow.run_forex_correlationCorrelation coefficient and minimum-variance hedge ratio between two price series of matching length, computed on daily % returns (not raw price levels, which would give spuriously high correlation between two unrelated but both-trending series). hedgeRatio follows Hull's standard futures-hedging formula: cov(returns1,returns2)/var(returns2), "how many units of series 2 per unit of series 1 minimizes the combined position's variance." No live data fetch: supply the two price series directly. The live variant is workflow.run_forex_correlation_live, which has both series fetched automatically for two named pairs. Edge cases: each series needs at least 5 positive prices, and both series must be the same length with one price per matching date (a different length is an error); a series with no movement (zero return variance) is an error because correlation is undefined. Not covered: lagged correlation, rolling windows, significance tests and confidence intervals; 4 returns is the mathematical minimum, not a reliable sample. Use when user already has two price series and wants their statistical relationship. Returns: n, correlation (-1 to 1), hedgeRatio.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rates1": "<rates1>",
"rates2": "<rates2>"
},
"name": "workflow.run_forex_correlation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rates1 | Yes | First price series, chronological order, one price per date | |
| rates2 | Yes | Second price series, chronological order, same length and same dates as rates1 |