pvanand commited on
Commit
91e7fe7
·
1 Parent(s): 1dcf032

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -113,7 +113,7 @@ def plot_chart(start_date, end_date, investment_amount):
113
  nifty50_cagr = calculate_cagr(nifty_50_portfolio_value.iloc[-1], investment_amount, start_date, end_date)
114
 
115
  # Visualization
116
- plt.figure(figsize=(12, 12))
117
  plt.plot(portfolio_returns.index, portfolio_returns, label=f'Portfolio (CAGR: {portfolio_cagr*100:.2f}%)')
118
  plt.plot(nifty_50_portfolio_value.index, nifty_50_portfolio_value, label=f'NIFTY 50 (CAGR: {nifty50_cagr*100:.2f}%)')
119
  plt.title('Portfolio Returns Vs NIFTY 50 Returns Over Time')
@@ -134,7 +134,7 @@ def plot_chart(start_date, end_date, investment_amount):
134
  markdown_text = """
135
  This interface allows you to test a stock selection strategy on nifty50 stocks and compare it with the return of nifty50 index.
136
  Please pick a date range from **2009-01-01 to 2024-01-06**
137
- Please reload the page if you are facing connection timeout issues """
138
 
139
  # Gradio interface
140
  iface = gr.Interface(
 
113
  nifty50_cagr = calculate_cagr(nifty_50_portfolio_value.iloc[-1], investment_amount, start_date, end_date)
114
 
115
  # Visualization
116
+ plt.figure(figsize=(14, 10))
117
  plt.plot(portfolio_returns.index, portfolio_returns, label=f'Portfolio (CAGR: {portfolio_cagr*100:.2f}%)')
118
  plt.plot(nifty_50_portfolio_value.index, nifty_50_portfolio_value, label=f'NIFTY 50 (CAGR: {nifty50_cagr*100:.2f}%)')
119
  plt.title('Portfolio Returns Vs NIFTY 50 Returns Over Time')
 
134
  markdown_text = """
135
  This interface allows you to test a stock selection strategy on nifty50 stocks and compare it with the return of nifty50 index.
136
  Please pick a date range from **2009-01-01 to 2024-01-06**
137
+ Please reload the page if you are facing connection timeout / connection errored out """
138
 
139
  # Gradio interface
140
  iface = gr.Interface(