Download Pandas sharpe ratio calculation for portfolio · GitHub book pdf free download link or read online here in PDF. Read online Pandas sharpe ratio calculation for portfolio · GitHub book pdf free download link book now. All books are in clear copy here, and all files are secure so don't worry about it. This site is like a library, you could find million book here by using search box in the header.
# compute sharpe ratio using Pandas rolling and std methods, the trading days is set to 252 days: TRADING_DAYS = 252: returns_portfolio = np.log(closePriceTable/closePriceTable.shift(1)) returns_portfolio.fillna(0, inplace=True) volatility_portfolio = returns_portfolio.rolling(window=TRADING_DAYS).std()*np.sqrt(TRADING_DAYS)
Read : Pandas sharpe ratio calculation for portfolio · GitHub pdf book online Select one of servers for direct link: |
---|