Lirsen Myrtaj handepeh commited on
Commit
268db3b
1 Parent(s): 50fc61a

Update sharp_ratio.py (#58)

Browse files

- Update sharp_ratio.py (6a694e66858d36f5a3abb8150f91d37eb5d4b411)


Co-authored-by: handepehlivan <handepeh@users.noreply.huggingface.co>

Files changed (1) hide show
  1. sharp_ratio.py +3 -2
sharp_ratio.py CHANGED
@@ -9,10 +9,11 @@ import plotly.express as px
9
 
10
  def cumulative_return(stocks,choices):
11
  symbols, weights, investing_style, benchmark, rf, A_coef = choices.values()
12
- tkers = sorted(set(stocks['Ticker'].unique()))
 
13
  #preprocess
14
  #stocks = stocks.pivot(index="Date", columns="Ticker", values="Adj. Close")
15
-
16
  logRet = np.log(stocks/stocks.shift())
17
  log_returns = np.log(stocks/stocks.shift())
18
  tickers_list = symbols.copy()
 
9
 
10
  def cumulative_return(stocks,choices):
11
  symbols, weights, investing_style, benchmark, rf, A_coef = choices.values()
12
+
13
+ #tkers = sorted(set(stocks['Ticker'].unique()))
14
  #preprocess
15
  #stocks = stocks.pivot(index="Date", columns="Ticker", values="Adj. Close")
16
+ tkers = symbols.copy()
17
  logRet = np.log(stocks/stocks.shift())
18
  log_returns = np.log(stocks/stocks.shift())
19
  tickers_list = symbols.copy()