{"id":15659720,"url":"https://github.com/joelowj/ttrpy","last_synced_at":"2025-05-04T08:36:03.855Z","repository":{"id":40005458,"uuid":"169019105","full_name":"joelowj/ttrpy","owner":"joelowj","description":"Technical analysis and other functions to construct technical trading rules with Python","archived":false,"fork":false,"pushed_at":"2021-04-20T18:19:25.000Z","size":545,"stargazers_count":23,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-03T23:42:43.763Z","etag":null,"topics":["finance","indicators","investment","python3","quantitative-trading","research","systematic-trading-strategies","technical-analysis"],"latest_commit_sha":null,"homepage":"https://joelowj.github.io/ttrpy/","language":"Python","has_issues":true,"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/joelowj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-04T02:35:37.000Z","updated_at":"2025-02-02T22:59:48.000Z","dependencies_parsed_at":"2022-06-26T07:32:50.435Z","dependency_job_id":null,"html_url":"https://github.com/joelowj/ttrpy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelowj%2Fttrpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelowj%2Fttrpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelowj%2Fttrpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelowj%2Fttrpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelowj","download_url":"https://codeload.github.com/joelowj/ttrpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252310229,"owners_count":21727509,"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":["finance","indicators","investment","python3","quantitative-trading","research","systematic-trading-strategies","technical-analysis"],"created_at":"2024-10-03T13:18:21.178Z","updated_at":"2025-05-04T08:36:03.826Z","avatar_url":"https://github.com/joelowj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ttrpy\n\n[![Build Status](https://travis-ci.com/joelowj/ttrpy.svg?token=zM8uDnAP2GXz8Hagm4hw\u0026branch=master)](https://travis-ci.com/joelowj/ttrpy) [![codecov](https://codecov.io/gh/joelowj/ttrpy/branch/master/graph/badge.svg)](https://codecov.io/gh/joelowj/ttrpy)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=shields)](http://makeapullrequest.com)\n\nTechnical Trading Rule Python is an open source library for popular technical analysis function for financial time series data.\n\n## Installation\n\nTo install the current release:\n\n```\n$ pip install ttrpy\n```\n\n## Usage Overview\n\nLoad historical stock data into `Pandas` from existing csv file or directly from the web.\n```python\n\u003e\u003e\u003e import pandas as pd\n\u003e\u003e\u003e df = pd.read_csv(\"weekly_MSFT.csv\").sort_values(by=\"timestamp\").reset_index(drop=True)\n\u003e\u003e\u003e df.tail(3)\n```\n\n```\n      timestamp    open    high     low   close   volume\n1098 2019-01-25  106.75   107.88    ...    ...     ...\n1099 2019-02-01  106.26   106.48    ...    ...     ...\n1100 2019-02-07  102.87   107.27    ...    ...     ...\n```\n\nLet's say we are interested in the overall long-term trend for `MSFT`, we can use the simple moving average function from the trend package.\n\n```python\n\u003e\u003e\u003e from ttrpy.trend.sma import sma\n\u003e\u003e\u003e df = sma(df, \"close\", \"sma\", 200)\n\u003e\u003e\u003e df.tail(3)\n```\n\n```\n      timestamp    open    high     low   close   volume    sma\n1098 2019-01-25  106.75   107.88    ...    ...     ...    71.080175\n1099 2019-02-01  106.26   106.48    ...    ...     ...    71.392625\n1100 2019-02-07  102.87   107.27    ...    ...     ...    71.707025\n```\n\nAs easy as that!\n\n## Contribution Guidelines\n\n**If you want to contribute to ttrpy, be sure to review the [contribution\nguidelines](CONTRIBUTING.md). This project adheres to ttrpy's\n[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.**\n\nTo get the local repository set up for development,\n\n```\n$ pip install pipenv\n$ pip install --dev\n```\n\nIf you find a bug, kindly open an issue [here](https://github.com/joelowj/ttrpy/issues/new).\n\nIf you would like to request a new feature, feel free to do so by opening an issue [here](https://github.com/joelowj/ttrpy/issues/new).\n\nTo fix a bug or enhance an existing module, follow these steps:\n- Fork the repository\n- Create a new branch (`git checkout - b branch-name`)\n- Make the appropriate changes in the files\n- Add changes to reflect the changes made\n- Commit your changes (`git commit -m 'commit message'`)\n- Push to the branch (`git push origin branch-name`)\n- Create a Pull Request\n\n## Versioning\nWe use [SemVer](https://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/joelowj/ttrpy/tags)\n\n## License\nThis project is licensed under Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelowj%2Fttrpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelowj%2Fttrpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelowj%2Fttrpy/lists"}