{ "info": { "author": "Michael Su", "author_email": "mdasu1@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "![prophet](docs/_static/img/logo.png?raw=true \"Prophet\")\n\n> 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.\n\n![build status](https://travis-ci.org/Emsu/prophet.svg?branch=master \"Travis Build Status\")\n\nSee the [documentation](http://prophet.michaelsu.io/) for more details.\n\nJoin the mailing list [here](https://groups.google.com/forum/#!forum/prophet-financial-framework) or join by [email](mailto:prophet-financial-framework+subscribe@googlegroups.com?subject=Subscribe).\n\n## Quickstart\n\n```python\nfrom datetime import datetime\n\nfrom prophet import Prophet\nfrom prophet.data import YahooCloseData\nfrom prophet.analyze import default_analyzers\nfrom prophet.orders import Orders\n\n\nclass OrderGenerator(object):\n\n def __init__(self):\n super(OrderGenerator, self).__init__()\n self._data = dict()\n\n def run(self, prices, timestamp, cash, **kwargs):\n symbol = \"AAPL\"\n orders = Orders()\n if (prices.loc[timestamp, symbol] * 100) < cash:\n orders.add_order(symbol, 100)\n\n return orders\n\n\nprophet = Prophet()\nprophet.set_universe(['AAPL', 'XOM'])\n\nprophet.register_data_generators(YahooCloseData())\nprophet.set_order_generator(OrderGenerator())\nbacktest = prophet.run_backtest(start=datetime(2010, 1, 1))\n\nprophet.register_portfolio_analyzers(default_analyzers)\nanalysis = prophet.analyze_backtest(backtest)\nprint analysis\n# +--------------------------------------+\n# | sharpe | 1.09754359611 |\n# | average_return | 0.00105478425027 |\n# | cumulative_return | 2.168833 |\n# | volatility | 0.0152560508189 |\n# +--------------------------------------+\n \n# Generate orders for you to execute today\n# Using Nov, 10 2014 as the date because there might be no data for today's\n# date (Market might not be open) and we don't want examples to fail.\ntoday = datetime(2014, 11, 10)\nprint prophet.generate_orders(today)\n# Orders[Order(symbol='AAPL', shares=100)]\n```\n\n## Contribute\n\nRun the following to your development environment setup:\n\n```bash\ngit clone git@github.com:Emsu/prophet.git\ncd prophet\nvirtualenv env\npip install dev-requirements.txt\npython setup.py develop\n```\n\n## Credits\nProphet wouldn't be possible without the wonderful [pandas](https://github.com/pydata/pandas) library and is inspired by [QSTK](https://github.com/tucker777/QSTK) and [Zipline](https://github.com/quantopian/zipline).\n\nThe [trading calendar util](https://github.com/Emsu/prophet/blob/master/prophet/utils/tradingcalendar.py) in Prophet is from [Zipline](https://github.com/quantopian/zipline) which is under the [Apache 2.0 License](https://github.com/quantopian/zipline/blob/master/LICENSE).", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://prophet.michaelsu.io/", "keywords": "backtest framework markets financial finance", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "prophet", "package_url": "https://pypi.org/project/prophet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prophet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://prophet.michaelsu.io/" }, "release_url": "https://pypi.org/project/prophet/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Microframework for analyzing financial markets.", "version": "0.1.1" }, "last_serial": 1318651, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "97ead877b33fc9e776d6c0804c5b8258", "sha256": "f1b812b34bdeaff0b41249b516cf5601fae0c54e630a6a4019310135850fa533" }, "downloads": -1, "filename": "prophet-0.1.0.tar.gz", "has_sig": false, "md5_digest": "97ead877b33fc9e776d6c0804c5b8258", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10696, "upload_time": "2014-11-22T03:09:16", "url": "https://files.pythonhosted.org/packages/a8/de/d85aedcfc26cf33e2215ae4c295b8392a50d7f56ad61403da52750c8d5c4/prophet-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b12e74ee97bf3a648a38170d385c2103", "sha256": "d095bdc718f9fbd92a152284a4d7556ff29c4fbbf96c2f030628dce23a322c9f" }, "downloads": -1, "filename": "prophet-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b12e74ee97bf3a648a38170d385c2103", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11052, "upload_time": "2014-11-24T10:19:00", "url": "https://files.pythonhosted.org/packages/1b/1c/61c969e76119a8257220869a6b3b57cd2ad4fbe0fd69b9b6845bfcf135aa/prophet-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b12e74ee97bf3a648a38170d385c2103", "sha256": "d095bdc718f9fbd92a152284a4d7556ff29c4fbbf96c2f030628dce23a322c9f" }, "downloads": -1, "filename": "prophet-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b12e74ee97bf3a648a38170d385c2103", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11052, "upload_time": "2014-11-24T10:19:00", "url": "https://files.pythonhosted.org/packages/1b/1c/61c969e76119a8257220869a6b3b57cd2ad4fbe0fd69b9b6845bfcf135aa/prophet-0.1.1.tar.gz" } ] }