{"id":37666030,"url":"https://github.com/factorpricingmodel/factor-pricing-model-universe","last_synced_at":"2026-01-16T11:58:57.733Z","repository":{"id":63111450,"uuid":"550858207","full_name":"factorpricingmodel/factor-pricing-model-universe","owner":"factorpricingmodel","description":"Package to build universes for factor pricing model","archived":false,"fork":false,"pushed_at":"2023-11-15T22:44:14.000Z","size":371,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T12:24:08.730Z","etag":null,"topics":["factor-model","pricing","python","quantitative-finance"],"latest_commit_sha":null,"homepage":"","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/factorpricingmodel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["factorpricingmodel"]}},"created_at":"2022-10-13T12:49:27.000Z","updated_at":"2024-08-19T11:20:51.000Z","dependencies_parsed_at":"2023-02-01T07:30:25.414Z","dependency_job_id":null,"html_url":"https://github.com/factorpricingmodel/factor-pricing-model-universe","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/factorpricingmodel/factor-pricing-model-universe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factorpricingmodel%2Ffactor-pricing-model-universe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factorpricingmodel%2Ffactor-pricing-model-universe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factorpricingmodel%2Ffactor-pricing-model-universe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factorpricingmodel%2Ffactor-pricing-model-universe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/factorpricingmodel","download_url":"https://codeload.github.com/factorpricingmodel/factor-pricing-model-universe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/factorpricingmodel%2Ffactor-pricing-model-universe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["factor-model","pricing","python","quantitative-finance"],"created_at":"2026-01-16T11:58:57.592Z","updated_at":"2026-01-16T11:58:57.711Z","avatar_url":"https://github.com/factorpricingmodel.png","language":"Python","funding_links":["https://github.com/sponsors/factorpricingmodel"],"categories":[],"sub_categories":[],"readme":"# Factor Pricing Model Universe\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/factorpricingmodel/factor-pricing-model-universe/actions?query=workflow%3ACI\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/workflow/status/factorpricingmodel/factor-pricing-model-universe/CI/main?label=CI\u0026logo=github\u0026style=flat-square\" alt=\"CI Status\" \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://factor-pricing-model-universe.readthedocs.io\"\u003e\n    \u003cimg src=\"https://img.shields.io/readthedocs/factor-pricing-model-universe.svg?logo=read-the-docs\u0026logoColor=fff\u0026style=flat-square\" alt=\"Documentation Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/factorpricingmodel/factor-pricing-model-universe\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/factorpricingmodel/factor-pricing-model-universe.svg?logo=codecov\u0026logoColor=fff\u0026style=flat-square\" alt=\"Test coverage percentage\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://python-poetry.org/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=\" alt=\"Poetry\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ambv/black\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square\" alt=\"black\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/pre-commit/pre-commit\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\u0026style=flat-square\" alt=\"pre-commit\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/factor-pricing-model-universe/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/factor-pricing-model-universe.svg?logo=python\u0026logoColor=fff\u0026style=flat-square\" alt=\"PyPI Version\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/pyversions/factor-pricing-model-universe.svg?style=flat-square\u0026logo=python\u0026amp;logoColor=fff\" alt=\"Supported Python versions\"\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/l/factor-pricing-model-universe.svg?style=flat-square\" alt=\"License\"\u003e\n\u003c/p\u003e\n\nPackage to build universes for factor pricing model. For further details, please refer\nto the [documentation](https://factor-pricing-model-universe.readthedocs.io/en/latest/)\n\n## Installation\n\nInstall this via pip (or your favourite package manager):\n\n`pip install factor-pricing-model-universe`\n\n## Usage\n\nThe library contains the pipelines to build the universe. You can\nrun the pipelines interactively in Jupyter Notebook.\n\n```python\nfrom fpm_universe import pipeline\n```\n\nAlternatively, for scheduled runs, you can create a configuration\nand run the command line entry point to create the universe.\n\n### Configuration\n\nThe configuration is in yaml format and contains a few inputs\n\n|           Name           |                                                                                            Description                                                                                            |\n| :----------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n|    `output_filename`     |                                                                                          Output filename                                                                                          |\n| `intermediate_directory` |                                                                       Intermediate directory to export the pipeline outputs                                                                       |\n|     `start_datetime`     |                                                                                  Start datetime of the universe                                                                                   |\n|     `last_datetime`      |                                                                                   Last datetime of the universe                                                                                   |\n|       `frequency`        | Frequency of the universe. For further details, please see the \"Offset aliases\" in pandas [documentation](https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases) |\n|        `pipeline`        |                                                                             List of pipelines to filter the universe                                                                              |\n|          `data`          |                                                                Defines the data used by pipeline, or referred by yaml tag `!data`                                                                 |\n\nEach pipeline returns a pandas dataframe indicating if the instrument is included into the\nuniverse on the specified date / time. For example, the pipeline returns the following\ndataframe\n\n```\n+------------+--------+-------+\n|    date    |  AAPL  | GOOGL |\n+------------+--------+-------+\n| 2022-11-17 |  True  | False |\n+------------+--------+-------+\n| 2022-11-18 |  True  |  True |\n+------------+--------+-------+\n```\n\nand it indicates AAPL is included in the universe on both 2022-11-17 and 2022-11-18\nwhile GOOGL only on 2022-11-18.\n\nBy default, the pipeline functions are imported from module `fpm_universe.pipeline`.\n\nEach data defines the method to retrieve from the source, or the operator on the\nsource data. The return type of each data is unconstrained. It can be a json-like dict,\na list, a pandas series, or even a pandas dataframe.\n\nIn the configuration, Each data can be referred by yaml tag `!data`, and it is loaded\nin lazy only when it is referred by another data object or a pipeline.\n\n### Command\n\nThe entry point `factor-pricing-model-universe` is to generate the universe regarding\nthe given configuration to the destination, with dynamically passing the parameters\nto format the configuration.\n\nThe arguments of the entry point are\n\n|        Argument        |                   Description                    |\n| :--------------------: | :----------------------------------------------: |\n|  `-c, --config TEXT`   |        Required. Configuration file path.        |\n| `-p, --parameter TEXT` | Parameters to be formatted in the configuration. |\n\nFor example, given the configuration as follows,\n\n```\noutput_filename: \"{output_directory}/{date}.parquet\"\nintermediate_directory: \"{output_directory}/{date}\"\nstart_datetime: \"2015-01-01\"\nlast_datetime: \"{date}\"\nfrequency: \"B\"\npipeline:\n  - name: range_validity\n    function: range_validity\n    parameters:\n      values: !data initial_validity\ndata:\n  symbols:\n    function: jq_compile\n    parameters:\n      json_filename: \"{data_directory}/index/sp500/default/{date}.json\"\n      pattern: \"[.[] | .tickers[]] | sort | unique | .[]\"\n  initial_validity:\n    function: jq_compile\n    parameters:\n      json_filename: \"{data_directory}/listings/{date}.json\"\n      pattern: \".[] | {{ symbol: .symbol, valid_start_datetime: .ipoDate, valid_last_datetime: .delistingDate }}\"\n      includes:\n        symbol: !data symbols\n```\n\nand run the following command\n\n```\nfactor-pricing-model-universe \\\n  --config \u003cpath\u003e \\\n  --parameter output_directory=$HOME/output \\\n  --parameter data_directory=$HOME/data \\\n  --parameter date=2022-10-20\n```\n\nthe universe dataframe is output to `$HOME/output/2022-10-20.parquet`\n(formatted with the parameter `output_directory` and `date`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactorpricingmodel%2Ffactor-pricing-model-universe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffactorpricingmodel%2Ffactor-pricing-model-universe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactorpricingmodel%2Ffactor-pricing-model-universe/lists"}