randlow / DM

Daniel Murray's Research
0 stars 1 forks source link

Writing systemic risk measures into files #7

Open randlow opened 9 years ago

randlow commented 9 years ago

Hi Daniel,

Rather than having to re-run your code each time to download the raw price data from Yahoo, to speed up your work,

SRM_mahalanobis= srm.MahalanobisDist(returns)[0]#define Mahalanobis Distance Formula SRM_correlationsurprise= srm.Correlation_Surprise(returns)#define Correlation Surprise Score SRM_absorptionratio= srm.Absorption_Ratio(returns)#define Absorption Ratio

write the above into files. so basically in the future you'll just be reading from the files to perform the performance analysis, rather than re-downloading again and again each time from the web.

you can try using pickles, or just use the standard IO methods in python to write to a file.

DanielMurray3 commented 9 years ago

Thanks Rand. I've just updated my code and the pickling of data sure does speed up the reloading process.