Skip to content

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMRS-Front-End

To Run Code With Unique Inputs:

In app.py, change the dropbox_links variable under # LOAD DATA to a list of links to your files. Make sure the URLs end in "dl=1" and not "dl=0." These should be five links in the following order:

e.x.
dropbox_links=[
"https://www.dropbox.com...&dl=1", #CP Returns
"https://www.dropbox.com...&dl=1", #Portfolio Annual
"https://www.dropbox.com...&dl=1", #Hedge Returns
"https://www.dropbox.com...&dl=1", #Hedge Ratios
"https://www.dropbox.com...&dl=1", #CEP Returns
https://www.dropbox.com...&dl=1" #RF Monthly
]

Input File Requirements:

1: Characteristic Portfolio Returns

Monthly excess CP returns. This must include a "MKT" column.
3 column CSV file:
"date" in year-month-day format (e.x. 1952-07-31)
"char" specifying which characteristic's portfolio return you are describing. (e.x. MKT)
"exret" returns in excess of the risk-free rate in decimal format. (e.x. 0.02294)

2: Portfolio Annual

Monthly excess returns of portfolios specified by two characteristic levels and their loading.
8 column CSV file:
"date" in year-month-day format (e.x. 1952-07-31)
"char1" specifying the first characteristic of the portfolio's return you are describing.(e.x. INV)
"char2" specifying the second characteristic of the portfolio's return you are describing.(e.x. ME)
"loading specifying the characteristic of the loading you are sorting on. (e.x. MKT)
"char1_port" numerical level of the first characteristic (e.x. 1, 2, or 3)
"char2_port" numerical level of the first characteristic (e.x. 1, 2, or 3)
"load_port" numerical level of the loading (e.x. 1, 2, or 3)
"exret" returns in excess of the risk-free rate in decimal format. (e.x. 0.02294)

3: Hedge Returns

Same as Characteristic Portfolio Returns, with the hedge portfolios.

4: Hedge Ratios

Annual Hedge Ratios.
4 column CSV file:
"ranktime" specifying the year (e.x. 1952)
"cep_char" specifying the Characteristic Efficient Portfolio characteristic. (e.x. INV)
"hedge_char" specifying the Hedge characteristic. (e.x. BEME)
"hedge_ratio" the numerical hedge ratio. (e.x. 0.0762294)

5: Characteristic Efficient Portfolio Returns

Same as Characteristic Portfolio Returns, with the Characteristic Efficient portfolios.

6: Risk Free Rate

Monthly risk free rate.
2 column CSV file:
"date" in year-month-day format (e.x. 1952-07-31)
"RF" risk free rate in decimal format. (e.x. 0.02294)

Outputs:

Characteristic Efficient Portfolio

Cumulative returns of the CPs
Cumulative returns of the CEPs
Cumulative returns of the EW Portfolios
Cumulative returns of the optimal portfolios
CEP sharpe ratios comparison

Hedge Portfolio

Time series regressions of hedge portfolios
Hedge ratios time series
Cumulative returns of the Hedge Portfolios

Portfolio Sorts

Average monthly excess returns for the triple-sorted portfolio
Alphas and loadings for the tripple-sorted portfolios

About

Implementation of algorithms from The Cross Section of Risk and Returns (Review of Financial Studies) for Dr. Lira Mota.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages