How to use the prophet.charting.visualize_backtest function in prophet

To help you get started, we’ve selected a few prophet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Emsu / prophet / examples / quickstart.py View on Github external
# +--------------------------------------+
# | sharpe            |    1.09754359611 |
# | average_return    | 0.00105478425027 |
# | cumulative_return |         2.168833 |
# | volatility        |  0.0152560508189 |
# +--------------------------------------+

# Generate orders for you to execute today
# Using Nov, 10 2014 as the date because there might be no data for today's
# date (Market might not be open) and we don't want examples to fail.
today = datetime(2014, 11, 10)
print(prophet.generate_orders(today))
# Orders[Order(symbol='AAPL', shares=100)]

# chart the backtest performance
visualize_backtest(backtest)