Welcome to our Knowledge Base
Simulation of mean-reverting portfolio computed by daspremont2008 model
- Open MultiPeriodKagiMRStrategyDemo.java
- The simulation parameters are defined in the class MRSimParamSP500.
- Open MRSimParamSP500.java
- MRSimParamSP500 defines the pool of stocks in which the mean-reverting baskets of stocks will be found. Also, it defines the number of baskets, the size of each basket, the time interval of the simulation, how frequent the basket is renewed, how far historical price data is used for computing the optimal clusters and baskets, etc.
- Run the simulation. Right-click “MultiPeriodKagiMRStrategyDemo.java” and select “Run File”.
- It starts by downloading the price data from Yahoo server to the hard drive.
- Then, it finds clusters of related stocks based on covariance selection (matrix optimization with penalty). Please see “com.numericalmethod.algoquant.model.daspremont2008.strategy.ClusterFinder” for details.
- Within the largest cluster(s), mean-reverting baskets are found (using SDP). Please see “com.numericalmethod.algoquant.model.daspremont2008.strategy.MRBasketFinder” for details.
- The mean-reverting baskets are traded with KAGI strategy. The output will show the simulation results. Please see “com.numericalmethod.algoquant.model.daspremont2008.strategy.KagiMRStrategy” for details.
- The computed baskets and their price series are saved as CSV files in the “log” folder for reference.
Besides, users can also choose other mean-reverting strategies in AlgoQuant to trade the mean-reverting baskets:
com.numericalmethod.algoquant.model.elliott2005
com.numericalmethod.algoquant.model.jurek2007
com.numericalmethod.algoquant.model.volarb