list of scripts:

distrib.py:
 INPUT: reference data RFreturns.csv (as defined in regimes.ini)
 OUTPUT: list of (mu, sigma) time series (window, overlap defined in regimes.ini)

-> covariances output is mastercovlist.plk (as defined in regimes.ini)


makeclusters.py:
 INPUT: covariance, regimes.ini
 OUTPUT : regimes (regimes.plk)


graphs.py:

usage= graph.py -w [clusters | regimes| ticker ] -i file
produce graph of regimes/cluster or time series. If time series, -i <ticker> 
<file> otherwise is a plk file (default : regimes.plk, clusters.plk)

Environment

Use Python 3.6
pip3 install scikit-learn
pip3 install pandas
pip3 install matplotlib
pip3 install dill

Execution

run distrib.py

in regimes.ini:

scav --> aggrege les données dans scavfactors.csv
    --> by month and field  --> United States,Value,Volatility,Aerospace & Defense

RFreturns.csv daily log return of world wide factors: Date,EqLaSmAUS,EqLaSmEUR,EqLaSmGBR,
EqLaSmJPN,EqLaSmUSA,EqSmUSA,ComMe,ComMeCop,ComMeNic,ComAgCof,ComAgCor,ComEnOil,ComAgCat,
ComMeGol,ComAgSug,EqSeOilUSA,ComAgHog,ComAgWhe,ComAgSoy,FICreHyUSA,CurARS,CurCHF,CurEUR,
CurGBP,CurJPY,CurKRW,CurMYR,CurNOK,CurNZD,CurPLN,CurRUB,CurSGD,CurTHB,CurTWD,CurZAR,EqARG,
EqAUS,EqBRA,EqCAN,EqCHE,EqCHL,EqCHN,EqEMA,EqEME,EqEUO,EqEUR,EqGBR,EqIND,EqJPN,EqKOR,EqLKA,
EqMYS,EqNAM,EqNOR,EqNZL,EqPLN,EqRUS,EqSCA,EqSGP,EqSWE,EqTHA,EqTWN,EqUSA,EqWLD,EqSeDisEUR,
EqSeDisUSA,EqSeEneEUR,EqSeEneUSA,EqSeFinEUR,EqSeFinUSA,EqSeHeaEUR,EqSeHeaUSA,EqSeIndEUR,
EqSeIndUSA,EqSeITeEUR,EqSeITeUSA,EqSeMatEUR,EqSeMatUSA,EqSeStaEUR,EqSeStaUSA,EqSeTelEUR,
EqSeTelUSA,EqSeUtiEUR,EqSeUtiUSA,EqGrEUR,EqGrUSA,EqGrVaEUR,EqGrVaUSA,EqVaEUR,EqVaUSA,FICrHAAAUSA,
FICrHBAAUSA,FIG3MUSA,FIG10YUSA,FICreAAAUSA,FICreBAAUSA,FISwp10yCHF,FISwp10yEUR,FISwp10yGBP,
FISwp10yJPY,FISwp10ySEK,FISwp10yUSD,FISwp1yCHF,FISwp1yEUR,FISwp1yGBP,FISwp1yJPY,FISwp5ySEK,
FISwp1yUSD,FISwp3mCHF,FISwp3mEUR,FISwp3mGBP,FISwp3mJPY,FISwp3mSEK,FISwp3mUSD,FISlp1y10yCHF,
FISlp3m1yCHF,FISlp1y10yEUR,FISlp3m1yEUR,FISlp1y10yGBP,FISlp3m1yGBP,FISlp1y10yJPY,FISlp3m1yJPY,
FISlp5y10ySEK,FISlp3m5ySEK,FISlp1y10yUSD,FISlp3m1yUSD

Uses the fields provided in those and treat them as fundamental factors to do the clustering. Creates
a list of distributions and computes sliding covariances of sides 60 days every 20 days and puts
this into mastercovlist

Launched using distrib.py



