{"id":13435887,"url":"https://github.com/pmorissette/ffn","last_synced_at":"2025-05-13T15:12:28.968Z","repository":{"id":38104698,"uuid":"21006364","full_name":"pmorissette/ffn","owner":"pmorissette","description":"ffn - a financial function library for Python","archived":false,"fork":false,"pushed_at":"2025-04-01T15:23:08.000Z","size":9729,"stargazers_count":2254,"open_issues_count":23,"forks_count":331,"subscribers_count":67,"default_branch":"master","last_synced_at":"2025-05-11T14:03:13.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"pmorissette.github.io/ffn","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmorissette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2014-06-19T15:54:09.000Z","updated_at":"2025-05-10T23:49:16.000Z","dependencies_parsed_at":"2023-12-11T15:28:51.346Z","dependency_job_id":"828886d0-e669-4064-90d2-77d1ff0dbf7f","html_url":"https://github.com/pmorissette/ffn","commit_stats":{"total_commits":297,"total_committers":31,"mean_commits":9.580645161290322,"dds":0.6464646464646464,"last_synced_commit":"16aefe6cf05227b135583f16cfdd757407b50205"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmorissette%2Fffn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmorissette%2Fffn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmorissette%2Fffn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmorissette%2Fffn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmorissette","download_url":"https://codeload.github.com/pmorissette/ffn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763200,"owners_count":21960477,"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-07-31T03:00:40.369Z","updated_at":"2025-05-13T15:12:23.958Z","avatar_url":"https://github.com/pmorissette.png","language":"Python","funding_links":[],"categories":["Analytics","Libraries","Analytic tools","金融数据处理","Python","Time-Series \u0026 Financial","Portfolio Management \u0026 Risk","Curated List","Star History","Uncategorized"],"sub_categories":["Metrics computation","Financial Instruments and Pricing","Others","金融工具与定价","Analytics","Uncategorized"],"readme":"![](http://pmorissette.github.io/ffn/_static/logo.png)\n\n[![Build Status](https://github.com/pmorissette/ffn/workflows/Build%20Status/badge.svg)](https://github.com/pmorissette/ffn/actions/)\n[![PyPI Version](https://img.shields.io/pypi/v/ffn)](https://pypi.org/project/ffn/)\n[![PyPI License](https://img.shields.io/pypi/l/ffn)](https://pypi.org/project/ffn/)\n\n# ffn - Financial Functions for Python\n\nAlpha release - please let me know if you find any bugs!\n\nIf you are looking for a full backtesting framework, please check out [bt](https://github.com/pmorissette/bt).\nbt is built atop ffn and makes it easy and fast to backtest quantitative strategies.\n\n## Overview\n\nffn is a library that contains many useful functions for those who work in **quantitative\nfinance**. It stands on the shoulders of giants (Pandas, Numpy, Scipy, etc.) and provides\na vast array of utilities, from performance measurement and evaluation to\ngraphing and common data transformations.\n\n```python\nimport ffn\nreturns = ffn.get('aapl,msft,c,gs,ge', start='2010-01-01').to_returns().dropna()\nreturns.calc_mean_var_weights().as_format('.2%')\n    aapl    62.54%\n    c       -0.00%\n    ge      36.19%\n    gs      -0.00%\n    msft     1.26%\n    dtype: object\n```\n\n\n## Installation\n\nThe easiest way to install `ffn` is from the [Python Package Index](https://pypi.python.org/pypi/ffn/)\nusing `pip`.\n\n```bash\npip install ffn\n```\n\nSince ffn has many dependencies, we strongly recommend installing the [Anaconda Scientific Python Distribution](https://store.continuum.io/cshop/anaconda/). This distribution comes with many of the required packages pre-installed, including pip. Once Anaconda is installed, the above command should complete the installation.\n\n## Documentation\n\nRead the docs at http://pmorissette.github.io/ffn\n\n- [Quickstart](http://pmorissette.github.io/ffn/quick.html)\n- [Full API](http://pmorissette.github.io/ffn/ffn.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmorissette%2Fffn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmorissette%2Fffn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmorissette%2Fffn/lists"}