{"id":46841502,"url":"https://github.com/uberdeveloper/fastbt","last_synced_at":"2026-03-10T13:16:12.896Z","repository":{"id":230118663,"uuid":"141433425","full_name":"uberdeveloper/fastbt","owner":"uberdeveloper","description":"A simple framework for quick and dirty backtesting","archived":false,"fork":false,"pushed_at":"2026-02-18T20:42:13.000Z","size":2720,"stargazers_count":26,"open_issues_count":2,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-19T01:01:45.177Z","etag":null,"topics":["backtesting","finance","python3"],"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/uberdeveloper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-18T12:43:22.000Z","updated_at":"2026-02-18T20:42:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f1b2eb8-46f9-4c08-bd2e-7bfed95a1672","html_url":"https://github.com/uberdeveloper/fastbt","commit_stats":{"total_commits":604,"total_committers":3,"mean_commits":"201.33333333333334","dds":"0.028145695364238388","last_synced_commit":"edf2a551209fadfe00aa8f07c430a3d5d35f15a7"},"previous_names":["uberdeveloper/fastbt"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/uberdeveloper/fastbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberdeveloper%2Ffastbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberdeveloper%2Ffastbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberdeveloper%2Ffastbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberdeveloper%2Ffastbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uberdeveloper","download_url":"https://codeload.github.com/uberdeveloper/fastbt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberdeveloper%2Ffastbt/sbom","scorecard":{"id":906300,"data":{"date":"2025-08-11","repo":{"name":"github.com/uberdeveloper/fastbt","commit":"c63ebc053fa49b3dd4c05c727714fe6ca6f51e2d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/20 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.6.0 not signed: https://api.github.com/repos/uberdeveloper/fastbt/releases/108254389","Warn: release artifact 0.5.0 not signed: https://api.github.com/repos/uberdeveloper/fastbt/releases/97738665","Warn: release artifact 0.4.0 not signed: https://api.github.com/repos/uberdeveloper/fastbt/releases/93455980","Warn: release artifact 0.3.0 not signed: https://api.github.com/repos/uberdeveloper/fastbt/releases/16142408","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/uberdeveloper/fastbt/releases/14704370","Warn: release artifact 0.6.0 does not have provenance: https://api.github.com/repos/uberdeveloper/fastbt/releases/108254389","Warn: release artifact 0.5.0 does not have provenance: https://api.github.com/repos/uberdeveloper/fastbt/releases/97738665","Warn: release artifact 0.4.0 does not have provenance: https://api.github.com/repos/uberdeveloper/fastbt/releases/93455980","Warn: release artifact 0.3.0 does not have provenance: https://api.github.com/repos/uberdeveloper/fastbt/releases/16142408","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/uberdeveloper/fastbt/releases/14704370"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T17:28:59.070Z","repository_id":230118663,"created_at":"2025-08-24T17:28:59.070Z","updated_at":"2025-08-24T17:28:59.070Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30334419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"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":["backtesting","finance","python3"],"created_at":"2026-03-10T13:16:12.095Z","updated_at":"2026-03-10T13:16:12.890Z","avatar_url":"https://github.com/uberdeveloper.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n**fastbt** is a simple and dirty way to do backtests based on end of day data, especially for day trading.\nThe main purpose is to provide a simple framework to weed out bad strategies so that you could test and improve your better strategies further.\n\nIt is based on the assumption that you enter into a position based on some pre-defined rules for a defined period and exit either at the end of the period or when stop loss is triggered. See the [rationale](https://github.com/uberdeveloper/fastbt/blob/master/docs/rationale.md) for this approach and the built-in assumptions. _fastbt is rule-based and not event-based._\n\nIf your strategy gets you good results, then check them with a full featured backtesting framework such as [zipline](http://www.zipline.io/) or [backtrader](https://www.backtrader.com/) to verify your results.\nIf your strategy fails, then it would most probably fail in other environments.\n\nThis is **alpha**\n\nMost of the modules are stand alone and you could use them as a single file. See embedding for more details\n\n# Features\n\n-   Create your strategies in Microsoft Excel\n-   Backtest as functions so you can parallelize\n-   Try different simulations\n-   Run from your own datasource or a database connection.\n-   Run backtest based on rules\n-   Add any column you want to your datasource as formulas\n\n# Installation\n\nfastbt requires python **\u003e=3.6** and can be installed via pip\n\n```\npip install fastbt\n```\n\n# Quickstart\n\nFastbt assumes your data have the following columns (rename them in case of other names)\n\n-   timestamp\n-   symbol\n-   open\n-   high\n-   low\n-   close\n-   volume\n\n```python\nfrom fastbt.rapid import *\nbacktest(data=data)\n```\n\nwould return a dataframe with all the trades.\n\nAnd if you want to see some metrics\n\n```python\nmetrics(backtest(data=data))\n```\n\nYou now ran a backtest without a strategy! By default, the strategy buys the top 5 stocks with the lowest price at open price on each period and sells them at the close price at the end of the period.\n\nYou can either specify the strategy by way of rules (the recommended way) or create your strategy as a function in python and pass it as a parameter\n\n```python\nbacktest(data=data, strategy=strategy)\n```\n\nIf you want to connect to a database, then\n\n```python\nfrom sqlalchemy import create_engine\nengine = create_engine('sqlite:///data.db')\nbacktest(connection=engine, tablename='data')\n```\n\nAnd to SELL instead of BUY\n\n```python\nbacktest(data=data, order='S')\n```\n\nLet's implement a simple strategy.\n\n\u003e **BUY** the top 5 stocks with highest last week returns\n\nAssuming we have a **weeklyret** column,\n\n```python\nbacktest(data=data, order='B', sort_by='weeklyret', sort_mode=False)\n```\n\nWe used sort_mode=False to sort them in descending order.\n\n    If you want to test this strategy on a weekly basis, just pass a dataframe with weekly frequency.\n\nSee the Introduction notebook in the examples directory for an in depth introduction.\n\n## Embedding\n\nSince fastbt is a thin wrapper around existing packages, the following files can be used as standalone without installing the fastbt package\n\n-   datasource\n-   utils\n-   loaders\n\nCopy these files and just use them in your own modules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberdeveloper%2Ffastbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuberdeveloper%2Ffastbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberdeveloper%2Ffastbt/lists"}