#portfolio #modern #lib #theory #mpt #libaray #theroy

mpt_lib

a function libaray for modern portfolio theroy

2 releases

0.0.2 Feb 12, 2023
0.0.1 Feb 4, 2023

#4 in #mpt

MIT/Apache

480KB
7.5K SLoC

mtp_libs

a function libaray for modern portfolio theroy


lib.rs:

The full name of MPT is modern portfolio theory. It is an economic framework through which investors try to take minimal market risks and achieve maximum returns for a given investment portfolio
The target of lib is provide all MPT calculation method

Key parameter explaintion

date : all date in this lib is a integer value from 1970-01-01

freq: the frequence include bellow

pub enum ClFrequency {
ClFrequencyUnknown = -1,
ClFrequencyDaily,        //= 0,
ClFrequencyWeekly,       //1
ClFrequencyMonthly,      //2
ClFrequencyQuarterly,    //3
ClFrequencyAnnually,     //4
ClFrequencySemiannually, //5
}

rank type:

 pub enum ClRankType {
 ClRankTypeNoRank = 0,
 ClRankTypeRaw = 1,
 ClRankTypeAsc = 2,
 ClRankTypeDec = 3,
 ClRankTypePercAsc = 4,
 ClRankTypePercDec = 5,
 ClRankTypeDecAsc = 6,
 ClRankTypeDecDec = 7,
 ClRankTypeQuinAsc = 8,
 ClRankTypeQuinDec = 9,
 ClRankTypeQuartAsc = 10,
 ClRankTypeQuartDec = 11,
 }



Dependencies

~3MB
~59K SLoC