analyze_dependence
Measure dependence between two equity curves by fitting a copula or mutual information to paired increments, so you can check if strategies or markets move together before combining them.
Instructions
Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.
Measure the dependence between two equity curves you supply, by fitting one copula or the mutual information to their paired increments (only timestamps present in both curves count).
Use it to ask whether two strategies or markets move together before combining them; to actually build and judge a combined book from finished runs, use portfolio_combine instead. Descriptive only: it reports the fit, it does not run a hypothesis test or take a decision. Malformed curves are refused with a named error (wrong count, missing unit, unordered dates, non-finite values). Needs Stochastly open with an Atelier or Portfolio licence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Dependence model: a gaussian, student, clayton or gumbel copula fit, or mutual_information on the ranks. | |
| instruments | Yes | Exactly two curves. Each is an object with `equity` (list of finite numbers, at least 2), an optional `symbol`, `timestamps` or `dates` (ISO dates, same length, unique, increasing) and `pnl_unit` set to "R" or "return". |