Skip to main content

calibrate_ou_params

Function calibrate_ou_params 

Source
pub fn calibrate_ou_params(
    prices: &[f64],
) -> Result<OuProcessParams, SyntheticBacktestError>
Expand description

Fits the discrete O-U process to a price series by OLS of P_t on P_{t-1} (AFML §13.5.1, step 1).

sigma is the sample standard deviation of the residuals; equilibrium is intercept / (1 - phi), or the mean price when phi is within 1e-12 of 1.

§Errors