{"id":19014392,"url":"https://github.com/parrondo/finmarketpy","last_synced_at":"2025-04-23T00:43:04.226Z","repository":{"id":88357566,"uuid":"67125891","full_name":"parrondo/finmarketpy","owner":"parrondo","description":"Python library for backtesting trading strategies and analyzing financial markets","archived":false,"fork":false,"pushed_at":"2016-09-01T09:56:49.000Z","size":1006,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T00:42:55.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parrondo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-01T11:36:00.000Z","updated_at":"2024-11-01T18:15:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"305e7b5b-a304-41c7-84ce-5ce84a4b93b0","html_url":"https://github.com/parrondo/finmarketpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrondo%2Ffinmarketpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrondo%2Ffinmarketpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrondo%2Ffinmarketpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrondo%2Ffinmarketpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parrondo","download_url":"https://codeload.github.com/parrondo/finmarketpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348892,"owners_count":21415907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:29:09.085Z","updated_at":"2025-04-23T00:43:04.209Z","avatar_url":"https://github.com/parrondo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# finmarketpy\n\nfinmarketpy is a Python based library that enables you to analyze market data and also to backtest trading strategies using\na simple to use API, which has prebuilt templates for you to define backtest. Included in the library\n\n* Prebuilt templates for backtesting trading strategies\n* Display historical returns for trading strategies\n* Investigate seasonality of trading strategies\n* Conduct market event studies around data events\n* In built calculator for risk weighting using volatility targeting\n* Written in object orientated way to make code more reusable\n\nI had previously written the open source PyThalesians financial library. This new finmarketpy library has similar functionality to the \ntrading part of that library. However, I've totally rewritten the API to make it much cleaner and easier to use, as well as having many \nnew features. It requires the libraries, which I've written chartpy (for charts) and findatapy (for loading market data) to function.\n\n* Using findatapy, you can download market data easily from Bloomberg, Quandl, Yahoo etc\n* Using chartpy, you can choose to have results displayed in matplotlib, plotly or bokeh by changing single keyword!\n\nPoints to note:\n* Please bear in mind at present finmarketpy is currently a highly experimental alpha project and isn't yet fully \ndocumented\n* Uses Apache 2.0 licence\n\n# Gallery\n\nCalculate the cumulative returns of a trading strategy historically (see examples/tradingmodelfxtrend_example.py)\n\n\u003cimg src=\"https://github.com/cuemacro/finmarketpy/blob/master/finmarketpy/examples/gallery/fx-trend-cumulative.png?raw=true\" width=\"750\"/\u003e\n\nPlot the leverage of the strategy over time\n\n\u003cimg src=\"https://github.com/cuemacro/finmarketpy/blob/master/finmarketpy/examples/gallery/fx-trend-leverage.png?raw=true\" width=\"750\"/\u003e\n\nPlot the individual trade returns\n\n\u003cimg src=\"https://github.com/cuemacro/finmarketpy/blob/master/finmarketpy/examples/gallery/fx-trend-trade-returns.png?raw=true\" width=\"750\"/\u003e\n\nCalculate seasonality of any asset: here we show gold and FX volatility seasonality (see examples/seasonality_examples.py)\n\n\u003cimg src=\"https://github.com/cuemacro/finmarketpy/blob/master/finmarketpy/examples/gallery/gold-seasonality.png?raw=true\" width=\"750\"/\u003e\n\n\u003cimg src=\"https://github.com/cuemacro/finmarketpy/blob/master/finmarketpy/examples/gallery/fx-vol-seasonality.png?raw=true\" width=\"750\"/\u003e\n\n\n# Requirements\n\nMajor requirements\n* Required: Python 3.4, 3.5\n* Required: pandas 0.18, numpy etc.\n* Required: findatapy for downloading market data (https://github.com/cuemacro/findatapy)\n* Required: chartpy for funky interactive plots (https://github.com/cuemacro/chartpy)\n* Recommended: multiprocessor_on_dill because standard multiprocessing library pickle causes issues \n(from https://github.com/sixty-north/multiprocessing_on_dill)\n\n# Installation\n\nYou can install the library using the below. After installation:\n* Make sure you edit the MarketConstants file\n\n```\npip install git+https://github.com/cuemacro/finmarketpy.git\n```\n\nBut beforehand please make sure you have already installed both chartpy, findatapy and any other dependencies\n\n```\npip install git+https://github.com/cuemacro/chartpy.git\npip install git+https://github.com/cuemacro/findatapy.git\n```\n\n# finmarketpy examples\n\nIn finmarketpy/examples you will find several examples, including some simple trading models\n\n# Release Notes\n\n* No formal releases yet\n\n# Coding log\n\n* 01 Sep 2016 - Added seasonality example for FX vol\n* 22 Aug 2016 - Fixed boot issue and added credentials\n* 17 Aug 2016 - Uploaded first code\n\nEnd of note\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparrondo%2Ffinmarketpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparrondo%2Ffinmarketpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparrondo%2Ffinmarketpy/lists"}