-
-
Save zachlim98/64bcbc6fa2a889093905382df1c518e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dcf_proj = pd.DataFrame({ | |
"revenue" : ins.loc["revenue"], | |
"netincome" : cf.loc["netIncome"], | |
"freecash" : cf.loc["freeCashFlow"] | |
}).transpose() | |
dcf_proj.loc["incomeMargin"] = dcf_proj.loc["revenue"]/dcf_proj.loc["netincome"] | |
dcf_proj.loc["FCFr"] = dcf_proj.loc["revenue"]/dcf_proj.loc["freecash"] | |
rev_change_mean = ins.loc["revenue"].pct_change().mean() | |
rev_change_stdd = ins.loc["revenue"].pct_change().std() | |
margin_change = dcf_proj.loc["incomeMargin", dcf_proj.loc["incomeMargin"] > 0].min() | |
fcf_change = dcf_proj.loc["FCFr", dcf_proj.loc["FCFr"] > 0].min() | |
tnx = yf.Ticker("^TNX") #use yfinance to get the 10yr treasury bond return | |
rfr = tnx.info["previousClose"] #use previousclose to estimate rfr | |
dcf_proj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment