diff mbox series

[bug#64134,06/17] gnu: Add python-bt.

Message ID 20230617151840.1748096-6-monego@posteo.net
State New
Headers show
Series Add some Python financial libraries. | expand

Commit Message

Vinicius Monego June 17, 2023, 3:18 p.m. UTC
* gnu/packages/finance.scm (python-bt): New variable.
---
 gnu/packages/finance.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 94f7b2111f..23071828ff 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1130,6 +1130,45 @@  (define-public python-ffn
 data transformations.")
     (license license:expat)))
 
+(define-public python-bt
+  (package
+    (name "python-bt")
+    (version "0.2.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference ;; no tests in PyPI
+                    (url "https://github.com/pmorissette/bt")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0m5gh3s79pbg4f0si0ilxg4zrcm7xrb5wj8j205c6hpa88ybjrm7"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-ffn python-pyprind))
+    (native-inputs (list python-black
+                         python-codecov
+                         python-coverage
+                         python-cython
+                         python-ffn
+                         python-flake8
+                         python-future
+                         python-matplotlib
+                         python-mock
+                         python-nose
+                         python-numpy
+                         python-pandas
+                         python-pyprind))
+    (home-page "https://github.com/pmorissette/bt")
+    (synopsis "Backtesting framework for Python")
+    (description
+     "@code{bt} is a flexible backtesting framework for Python used to test
+quantitative trading strategies.  Backtesting is the process of testing a
+strategy over a given data set.  This framework allows you to easily create
+strategies that mix and match different Algos.  It aims to foster the
+ creation of easily testable, re-usable and flexible blocks of strategy
+ logic to facilitate the rapid development of complex trading strategies.")
+    (license license:expat)))
+
 (define-public python-u2flib-host
   ;; The package is obsolete and superseded by python-fido2, but
   ;; needed for python-ledgerblue@0.1.44.