This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Microframework for analyzing financial markets.

Project Description
![prophet](docs/_static/img/logo.png?raw=true "Prophet")

> Prophet is a Python microframework for financial markets. Prophet strives to let the programmer focus on modeling financial strategies, portfolio management, and analyzing backtests. It achieves this by having few functions to learn to hit the ground running, yet being flexible enough to accomodate sophistication.

![build status]( "Travis Build Status")

See the [documentation]( for more details.

Join the mailing list [here](!forum/prophet-financial-framework) or join by [email](

## Quickstart

from datetime import datetime

from prophet import Prophet
from import YahooCloseData
from prophet.analyze import default_analyzers
from prophet.orders import Orders

class OrderGenerator(object):

def __init__(self):
super(OrderGenerator, self).__init__()
self._data = dict()

def run(self, prices, timestamp, cash, **kwargs):
symbol = "AAPL"
orders = Orders()
if (prices.loc[timestamp, symbol] * 100) < cash:
orders.add_order(symbol, 100)

return orders

prophet = Prophet()
prophet.set_universe(['AAPL', 'XOM'])

backtest = prophet.run_backtest(start=datetime(2010, 1, 1))

analysis = prophet.analyze_backtest(backtest)
print analysis
# +--------------------------------------+
# | 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)]

## Contribute

Run the following to your development environment setup:

git clone
cd prophet
virtualenv env
pip install dev-requirements.txt
python develop

## Credits
Prophet wouldn't be possible without the wonderful [pandas]( library and is inspired by [QSTK]( and [Zipline](

The [trading calendar util]( in Prophet is from [Zipline]( which is under the [Apache 2.0 License](
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
prophet-0.1.1.tar.gz (11.1 kB) Copy SHA256 Checksum SHA256 Source Nov 24, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting