{"id":13699890,"url":"https://github.com/fja05680/pinkfish","last_synced_at":"2026-01-12T06:32:06.677Z","repository":{"id":30462564,"uuid":"34016457","full_name":"fja05680/pinkfish","owner":"fja05680","description":"A backtester and spreadsheet library for stocks and ETFs","archived":false,"fork":false,"pushed_at":"2025-05-12T06:37:24.000Z","size":89291,"stargazers_count":289,"open_issues_count":3,"forks_count":64,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-09-29T01:26:39.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fja05680.github.io/pinkfish","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/fja05680.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,"zenodo":null}},"created_at":"2015-04-15T20:19:01.000Z","updated_at":"2025-08-24T03:49:53.000Z","dependencies_parsed_at":"2023-01-14T17:00:36.689Z","dependency_job_id":"62380cf0-e9dd-4e96-9cf4-723c02a60d6e","html_url":"https://github.com/fja05680/pinkfish","commit_stats":{"total_commits":318,"total_committers":10,"mean_commits":31.8,"dds":"0.22012578616352196","last_synced_commit":"e0199b3aede0c67c515417348b927c4457dc5026"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/fja05680/pinkfish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fja05680%2Fpinkfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fja05680%2Fpinkfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fja05680%2Fpinkfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fja05680%2Fpinkfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fja05680","download_url":"https://codeload.github.com/fja05680/pinkfish/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fja05680%2Fpinkfish/sbom","scorecard":{"id":402028,"data":{"date":"2025-08-11","repo":{"name":"github.com/fja05680/pinkfish","commit":"316af7c8dee5f4e7b85d2200e6a66a257e433b65"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","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":"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":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 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"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-33p9-3p43-82vq","Warn: Project is vulnerable to: PYSEC-2025-61 / GHSA-xg8h-j46f-w952","Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-7cx3-6m66-7c5m","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T20:17:54.745Z","repository_id":30462564,"created_at":"2025-08-18T20:17:54.745Z","updated_at":"2025-08-18T20:17:54.745Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-08-02T20:00:45.286Z","updated_at":"2026-01-12T06:32:06.671Z","avatar_url":"https://github.com/fja05680.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Trading \u0026 Backtesting","交易与回测"],"readme":"pinkfish\n======     \nA backtester and spreadsheet library for security analysis.\n\nWhy another python backtesting library?  How is pinkfish different?\nSimple, I couldn't find a python backtesting library that allowed me to backtest intraday strategies with daily data.  Even simple strategies like 'buying on the close' on the SAME day a 'new 20 day high is set' were not allowed.  Additionally, I was put off by the complexity of some of the libraries available, and wanted something simple, that doesn't get in the way, and just allows me to test my trading ideas.  One user commented that Pinkfish is \"very lightweight and to the point\".  I didn't set out to write a new backtesting library, but I had to.  Daily data is free; minute and tick data are typically not.  Using minute and tick data can require hours to run vs seconds for daily data.\n\nSome of the key features of pinkfish:\n - leverages pandas for dataframe, spreadsheet like features\n - comes batteries included with the most common technical indicators\n - also integrates with ta-lib or pandas_ta for more advanced indicators\n - leverages matplotlib for making financial graphs\n - uses daily data (vs minute or tick data) for intraday trading\n - uses free daily data from yahoo finance\n - simple to use python API\n - backtest single stock/ETF strategy or a portfolio (basket of stocks/ETFs)\n - backtest short selling strategies and simulate trading with margin\n - write optimizers to select the best parameters\n - create spreadsheets within Jupyter Notebook by utilizing pandas dataframes and itable formatting\n\n## Installation\nFor basic installation of the pinkfish library (not including ta-lib):  \n```\n# Note: It's recomended to create a new python virtual environment.\n\n$ git clone https://github.com/fja05680/pinkfish.git\n$ cd pinkfish\n$ python -m venv venv\n$ pip install setuptools\n$ . venv/bin/activate\n$ python setup.py install (or develop)\n```\n\n--OR--  \n\nFor developer installation with ta-lib, follow the instructions located at:  \nhttps://fja05680.github.io/pinkfish/  \n\n## Examples\n - [buy-and-hold](https://fja05680.github.io/pinkfish/examples/buy-and-hold.html) - basic buy and hold strategy\n - [golden-cross](http://fja05680.github.io/pinkfish/examples/golden-cross.html) - classic long term trading algorithm\n - [spreadsheet](https://fja05680.github.io/pinkfish/examples/spreadsheet.html) - read only spreadsheet within jupyter notebook\n\nMany more examples in `examples` folder.  They are roughly ordered by complexity beginning with the easiest.\n \n## Documentation\nThe pinkfish API documentation:\nhttps://fja05680.github.io/pinkfish/docs/html/pinkfish/index.html\n\n## Pinkfish on youtube\nhttps://www.youtube.com/channel/UCsPHH2UBn8Fz0g0MGrZ2Ihw\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffja05680%2Fpinkfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffja05680%2Fpinkfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffja05680%2Fpinkfish/lists"}