@Demo public class OULogSpreadCRRASignalDemo extends Object
Using this example. Illustrates the OU log-spread trading signal and its P/L calculation using the parameters in main. Follow the modeled spread and risk-aversion inputs separately from any market-data assumptions; the theoretical model does not establish that a real pair follows an OU process.
Model and publication. The cited working paper studies finite-horizon allocation to a mean-reverting arbitrage opportunity under investor preferences. Its public abstract was verified, but full text was unavailable; the exact allocation implementation must be read in the library rather than assumed from this citation.
Implementation in this tutorial. The demo generates an OU path, fits it with OUFittingMLE and calls OUSpreadCRRASignal.getOptimalAllocation(price, W, tau). gamma is risk aversion, tau is remaining horizon and r*delta is the rate passed to the signal. W stays fixed while W_new records cumulative wealth, so this is not compounding allocation. Fitting and evaluation use the same generated path. The older Kim/Primbs/Boyd reference is related background, not the provenance of the Jurek-named class.
| Constructor and Description |
|---|
OULogSpreadCRRASignalDemo(long seed) |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
double |
run(double gamma,
boolean isPrint)
Gets the Sharpe ratio.
|
public static void main(String[] args)
public double run(double gamma,
boolean isPrint)
gamma - the risk aversion rateisPrint - to print logging infoCopyright © 2026. All rights reserved.