diff --git a/qttk/examples/portfolio_example.py b/qttk/examples/portfolio_example.py index 349e26f..6772aab 100644 --- a/qttk/examples/portfolio_example.py +++ b/qttk/examples/portfolio_example.py @@ -63,6 +63,10 @@ def _plot(ticker: str, dataframe: pd.DataFrame) -> None: # an equally weighted portfolio is assumed # weights must add up to 1.0 (100%) weights = np.full((1,len(stocks)), 1/len(stocks)) + #weights = np.array([[0.125, 0.125, 0.0, 0.125, 0.125, 0.125, 0.0, 0.125,\ + #0.125, 0.125, 0.0]]) + #weights = np.array([[0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0]]) + #weights = np.array([[0.0, 0.0, 0.33, 0.0, 0.0, 0.0, 0.33, 0.0, 0.0, 0.0, 0.34]]) portfolio = pd.DataFrame(weights, columns=stocks) dataframe = load_portfolio(portfolio.columns.values) series = portfolio_price_series(weights, dataframe.iloc[-252:]) @@ -80,5 +84,5 @@ def _plot(ticker: str, dataframe: pd.DataFrame) -> None: x = -window # define the date range for plot to plot to_plot = to_plot.iloc[x:] to_plot['rsi'] = rsi[x:] - _plot(ticker, to_plot) + #_plot(ticker, to_plot) exit