[PATCH 00/17] Add some Python financial libraries.

  • Open
  • quality assurance status badge
Details
One participant
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 17 Jun 2023 17:16
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151637.1745265-1-monego@posteo.net
This patchset adds some Python libraries related to finance and econometrics.

Vinicius Monego (17):
gnu: Add python-holidays.
gnu: Add python-multitasking.
gnu: Add python-yfinance.
gnu: Add python-pandas-datareader.
gnu: Add python-ffn.
gnu: Add python-bt.
gnu: Add python-pyhdfe.
gnu: Add python-interface-meta.
gnu: Add python-arch.
gnu: Add python-alpha-vantage.
gnu: Add python-ascii-magic.
gnu: Add python-degiro-connector.
gnu: Add python-detecta.
gnu: Add python-financedatabase.
gnu: Add python-mstarpy.
gnu: Add python-pandas-ta.
gnu: Add python-vectorbt.

gnu/packages/finance.scm | 349 +++++++++++++++++++++++++++++++-
gnu/packages/python-science.scm | 22 ++
gnu/packages/python-xyz.scm | 98 +++++++++
gnu/packages/statistics.scm | 20 ++
4 files changed, 488 insertions(+), 1 deletion(-)

--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 01/17] gnu: Add python-holidays.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-holidays): New variable.
---
gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9ba17c509b..51e6da8d21 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30797,6 +30797,28 @@ (define-public python-csb43
spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.")
(license license:lgpl3)))
+(define-public python-holidays
+ (package
+ (name "python-holidays")
+ (version "0.26")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "holidays" version))
+ (sha256
+ (base32
+ "05c999q41b41av061l1j6kk4ys0jcdpby0iqgmqzrj2ljwd43y73"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-dateutil))
+ (home-page "https://github.com/dr-prodigy/python-holidays")
+ (synopsis "Generate and work with holidays in Python")
+ (description
+ "This package provides a Python library for generating country- and
+subdivision- (e.g. state or province) specific sets of government-designated
+holidays on the fly. It aims to make determining whether a specific date is
+a holiday as fast and flexible as possible.")
+ (license license:expat)))
+
(define-public python-febelfin-coda
(package
(name "python-febelfin-coda")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 02/17] gnu: Add python-multitasking.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-2-monego@posteo.net
* gnu/packages/python-xyz.scm (python-multitasking): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 51e6da8d21..fe05cc16e4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30444,6 +30444,26 @@ (define-public python-cwcwidth
functions defined in POSIX.1-2001 and POSIX.1-2008.")
(license license:expat)))
+(define-public python-multitasking
+ (package
+ (name "python-multitasking")
+ (version "0.0.11")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "multitasking" version))
+ (sha256
+ (base32
+ "09k0rldyaj2jnplnmcy243vfinl81a2qg9xm5ykxrcprcp6c6ssd"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ; no tests
+ (home-page "https://github.com/ranaroussi/multitasking")
+ (synopsis "Non-blocking Python methods using decorators")
+ (description
+ "@code{MultiTasking} is a tiny Python library lets you convert your
+Python methods into asynchronous, non-blocking methods simply by using a
+decorator.")
+ (license license:asl2.0)))
+
(define-public python-pyan3
(package
(name "python-pyan3")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 03/17] gnu: Add python-yfinance.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-3-monego@posteo.net
* gnu/packages/finance.scm (python-yfinance): New variable.
---
gnu/packages/finance.scm | 43 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 2a4929ccd0..769742c015 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -19,7 +19,7 @@
;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj@protonmail.com>
@@ -1034,6 +1034,47 @@ (define-public python-mnemonic
of Bitcoin BIP-0039.")
(license license:expat)))
+(define-public python-yfinance
+ (package
+ (name "python-yfinance")
+ (version "0.2.20")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "yfinance" version))
+ (sha256
+ (base32
+ "0p8m2445vyanpc7dk3fcfqis66217zn5kswh9f0ryjn3c2x5zsdr"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:tests? #f ;no tests in PyPI and they test the online API
+ #:phases #~(modify-phases %standard-phases
+ ;; we have pytz==2022.1 and it's a core package
+ (add-after 'unpack 'relax-pytz
+ (lambda _
+ (substitute* "setup.py"
+ (("pytz>=2022.5")
+ "pytz"))))
+ ;; yfinance provides a sample script via entry_points
+ ;; which breaks sanity-check.
+ (delete 'sanity-check))))
+ (propagated-inputs (list python-appdirs
+ python-beautifulsoup4
+ python-cryptography
+ python-frozendict
+ python-html5lib
+ python-lxml
+ python-multitasking
+ python-numpy
+ python-pandas
+ python-pytz
+ python-requests))
+ (home-page "https://github.com/ranaroussi/yfinance")
+ (synopsis "Download market data from Yahoo! Finance API")
+ (description
+ "@code{yfinance} offers a threaded and Pythonic way to download market
+ data from Yahoo! finance.")
+ (license license:asl2.0)))
+
(define-public python-u2flib-host
;; The package is obsolete and superseded by python-fido2, but
;; needed for python-ledgerblue@0.1.44.
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 04/17] gnu: Add python-pandas-datareader.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-4-monego@posteo.net
* gnu/packages/finance.scm (python-pandas-datareader): New variable.
---
gnu/packages/finance.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 769742c015..7eaa5941a0 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1075,6 +1075,25 @@ (define-public python-yfinance
data from Yahoo! finance.")
(license license:asl2.0)))
+(define-public python-pandas-datareader
+ (package
+ (name "python-pandas-datareader")
+ (version "0.10.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pandas-datareader" version))
+ (sha256
+ (base32
+ "19nmajs2cj0k2jz6r3z3hc1h49gn7x86s71zd311035w74ywdhwz"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ;all tests depend on online data
+ (propagated-inputs (list python-lxml python-pandas python-requests))
+ (home-page "https://github.com/pydata/pandas-datareader")
+ (synopsis "Extract data from Internet sources into a pandas DataFrame")
+ (description
+ "This package provides up to date remote data access for Pandas.")
+ (license license:bsd-3)))
+
(define-public python-u2flib-host
;; The package is obsolete and superseded by python-fido2, but
;; needed for python-ledgerblue@0.1.44.
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 05/17] gnu: Add python-ffn.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-5-monego@posteo.net
* gnu/packages/finance.scm (python-ffn): New variable.
---
gnu/packages/finance.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 7eaa5941a0..94f7b2111f 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -103,6 +103,7 @@ (define-module (gnu packages finance)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages machine-learning)
#:use-module (gnu packages man)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
@@ -1094,6 +1095,41 @@ (define-public python-pandas-datareader
"This package provides up to date remote data access for Pandas.")
(license license:bsd-3)))
+(define-public python-ffn
+ (package
+ (name "python-ffn")
+ (version "0.3.7")
+ (source (origin
+ ;PyPI is missing files required for testing
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pmorissette/ffn")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rq6w2hbf8mcc9blrdf6aj7fnrcj0bvza2y4miznv3il9wqnpd6z"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-decorator
+ python-matplotlib
+ python-numpy
+ python-pandas
+ python-pandas-datareader
+ python-scikit-learn
+ python-scipy
+ python-tabulate
+ python-yfinance))
+ (native-inputs (list python-black python-codecov python-flake8
+ python-pytest python-pytest-cov))
+ (home-page "https://github.com/pmorissette/ffn")
+ (synopsis "Financial functions for Python")
+ (description
+ "@code{ffn} is a library that contains many useful functions
+ for those who work in quantitative finance. It provides a vast array of
+utilities, from performance measurement and evaluation to graphing and common
+data transformations.")
+ (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.
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 06/17] gnu: Add python-bt.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-6-monego@posteo.net
* gnu/packages/finance.scm (python-bt): New variable.
---
gnu/packages/finance.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
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.
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 07/17] gnu: Add python-pyhdfe.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-7-monego@posteo.net
* gnu/packages/statistics.scm (python-pyhdfe): New variable.
---
gnu/packages/statistics.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 67466ed3b9..9337a40f7b 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -6634,6 +6634,26 @@ (define-public r-languageserver
completion.")
(license license:expat))))
+(define-public python-pyhdfe
+ (package
+ (name "python-pyhdfe")
+ (version "0.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyhdfe" version))
+ (sha256
+ (base32
+ "0cl4i0irc13r5z73lasfwi75zq9wk56r93h26crm0r9ajb8fa1m9"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-numpy python-scipy))
+ (native-inputs (list python-pytest python-pytest-xdist))
+ (home-page "https://github.com/jeffgortmaker/pyhdfe")
+ (synopsis "High dimensional fixed effect absorption")
+ (description
+ "PyHDFE is a Python 3 implementation of algorithms for absorbing high
+dimensional fixed effects.")
+ (license license:expat)))
+
(define-public python-rpy2
(package
(name "python-rpy2")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 08/17] gnu: Add python-interface-meta.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-8-monego@posteo.net
* gnu/packages/python-xyz.scm (python-interface-meta): New variable.
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fe05cc16e4..4c1a5fb7c8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30274,6 +30274,25 @@ (define-public python-escapism
result.")
(license license:expat)))
+(define-public python-interface-meta
+ (package
+ (name "python-interface-meta")
+ (version "1.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "interface_meta" version))
+ (sha256
+ (base32
+ "18brkmz2ssjikkrkb23cwccp683yi6y1alfdbmjvjgxpppw96i4a"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-poetry-core python-pytest))
+ (home-page "https://github.com/matthewwardrop/interface_meta")
+ (synopsis "Expose an extensible API with enforced method signatures")
+ (description
+ "@code{interface_meta} provides a convenient way to expose an extensible
+API with enforced method signatures and consistent documentation.")
+ (license license:expat)))
+
(define-public python-recommonmark
(package
(name "python-recommonmark")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 09/17] gnu: Add python-arch.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-9-monego@posteo.net
* gnu/packages/finance.scm (python-arch): New variable.
---
gnu/packages/finance.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 23071828ff..9c18e103b7 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -125,6 +125,7 @@ (define-module (gnu packages finance)
#:use-module (gnu packages security-token)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages statistics)
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
@@ -1016,6 +1017,40 @@ (define-public trezor-gpg-pinentry-tk
settings.")
(license license:bsd-2)))
+(define-public python-arch
+ (package
+ (name "python-arch")
+ (version "6.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "arch" version))
+ (sha256
+ (base32
+ "15mr5rvxwpfhbj5lg85i9gqpvs37rjhifjzhcp512fg2i7yz3663"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; Default check phase failed to detect conftest.py in the subdirectory.
+ (list #:phases #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest"
+ "arch/tests" "-vv")))))))
+ (native-inputs (list python-cython python-pytest))
+ ;; XXX: It is preferrable to compile modules with Cython, however it fails
+ ;; without a hint. Use Numba for now. TODO: try to build with Cython.
+ (propagated-inputs (list python-numba
+ python-numpy
+ python-pandas
+ python-scipy
+ python-statsmodels))
+ (home-page "https://github.com/bashtage/arch")
+ (synopsis "ARCH for Python")
+ (description
+ "This package provides Autoregressive Conditional Heteroskedasticity
+(ARCH) and other tools for financial econometrics.")
+ (license license:expat)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 10/17] gnu: Add python-alpha-vantage.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-10-monego@posteo.net
* gnu/packages/finance.scm (python-alpha-vantage): New variable.
---
gnu/packages/finance.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 9c18e103b7..5a655e3dfa 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1051,6 +1051,27 @@ (define-public python-arch
(ARCH) and other tools for financial econometrics.")
(license license:expat)))
+(define-public python-alpha-vantage
+ (package
+ (name "python-alpha-vantage")
+ (version "2.3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "alpha_vantage" version))
+ (sha256
+ (base32
+ "1v7vkd2rkz52lilprbpq3sj4yfpcjl0xksmcpndjz8p2qc46krqc"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ;this is an API library (online tests)
+ (propagated-inputs (list python-aiohttp python-requests))
+ (home-page "https://github.com/RomelTorres/alpha_vantage")
+ (synopsis "Get stock data from the Alpha Vantage API")
+ (description
+ "This package provides a Python module to get stock data from the Alpha
+Vantage API.")
+ (license license:expat)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 11/17] gnu: Add python-ascii-magic.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-11-monego@posteo.net
* gnu/packages/python-xyz.scm (python-ascii-magic): New variable.
---
gnu/packages/python-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4c1a5fb7c8..6f9566f64e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30766,6 +30766,43 @@ (define-public python-markuppy
pythonic way.")
(license license:expat)))
+(define-public python-ascii-magic
+ (package
+ (name "python-ascii-magic")
+ (version "2.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "ascii_magic" version))
+ (sha256
+ (base32
+ "119xcjidizz5ig0xqwnxggv06fjsydlvca66rxffvpk7n4f1mm1y"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:test-flags #~(list "-k" (string-append
+ ;; Skip online and clipboard tests.
+ "not test_from_url"
+ " and not test_wrong_url"
+ " and not test_quick_test"
+ " and not test_from_clipboard"))
+ #:phases #~(modify-phases %standard-phases
+ ;; Test files are in tests/ directory but pytest
+ ;; runs in the source root, symlink to find them.
+ (add-before 'check 'image-paths
+ (lambda _
+ (for-each (lambda (fname)
+ (symlink (format #f "tests/~a" fname)
+ (format #f "~a" fname)))
+ '("chicken_transparent.png"
+ "kid.jpg" "lion.jpg" "moon.jpg")))))))
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-colorama python-pillow))
+ (home-page "https://github.com/LeandroBarone/python-ascii_magic")
+ (synopsis "Converts pictures into ASCII art")
+ (description
+ "Ascii Magic is a Python package that converts images into ASCII art for
+terminals and HTML.")
+ (license license:expat)))
+
(define-public python-tablib
(package
(name "python-tablib")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 12/17] gnu: Add python-degiro-connector.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-12-monego@posteo.net
* gnu/packages/finance.scm (python-degiro-connector): New variable.
---
gnu/packages/finance.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 5a655e3dfa..6149d667ed 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -122,6 +122,7 @@ (define-module (gnu packages finance)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rpc)
#:use-module (gnu packages security-token)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages sqlite)
@@ -1072,6 +1073,38 @@ (define-public python-alpha-vantage
Vantage API.")
(license license:expat)))
+(define-public python-degiro-connector
+ (package
+ (name "python-degiro-connector")
+ (version "2.0.23")
+ (source (origin
+ (method git-fetch) ;no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/Chavithra/degiro-connector")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hd4689h31386qlqhznxq7jwpz1a4fnggk981byip2yh7gd6g0yz"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:test-flags #~(list "-m" "not network"
+ ;; XXX: these tests failed, check why.
+ "-k" (string-append
+ "not test_fixture_user_token"
+ " and not test_fixture_credentials"))))
+ (native-inputs (list python-poetry-core python-pytest python-pytest-mock))
+ (propagated-inputs (list python-grpcio
+ python-onetimepass
+ python-pandas
+ python-protobuf
+ python-requests
+ python-wrapt))
+ (home-page "https://github.com/chavithra/degiro-connector")
+ (synopsis "Library to access Degiro's API")
+ (description "This package provides a library to access Degiro's API.")
+ (license license:bsd-3)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 13/17] gnu: Add python-detecta.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-13-monego@posteo.net
* gnu/packages/python-science.scm (python-detecta): New variable.
---
gnu/packages/python-science.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index fb2ea0c3b5..ca0d0e5941 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -532,6 +532,28 @@ (define-public python-pythran
Python module with the same interface, but (hopefully) faster.")
(license license:bsd-3)))
+(define-public python-detecta
+ (package
+ (name "python-detecta")
+ (version "0.0.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "detecta" version))
+ (sha256
+ (base32
+ "1v830v258vn59sk15rx8m1sycpx8q26pyniqrvb99jdvvw9pvsnj"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ; no tests
+ (propagated-inputs (list python-numpy))
+ (home-page "https://github.com/demotu/detecta")
+ (synopsis "Detect events in data")
+ (description
+ "This package provides a Python module to detect events in data, such as
+peaks, onset, abrupt changes, initial and final indices of sequential data
+identical to a parameter.")
+ (license license:expat)))
+
(define-public python-pyts
(package
(name "python-pyts")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 14/17] gnu: Add python-financedatabase.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-14-monego@posteo.net
* gnu/packages/finance.scm (python-financedatabase): New variable.
---
gnu/packages/finance.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 6149d667ed..958cbd5945 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1105,6 +1105,27 @@ (define-public python-degiro-connector
(description "This package provides a library to access Degiro's API.")
(license license:bsd-3)))
+(define-public python-financedatabase
+ (package
+ (name "python-financedatabase")
+ (version "2.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "financedatabase" version))
+ (sha256
+ (base32
+ "0yadyaycwzsyfjfi2gbx3sqc53l1knv23i16lsd2fzbikhy7iyz0"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f)) ;data-only package
+ (propagated-inputs (list python-pandas))
+ (home-page "https://github.com/JerBouma/FinanceDatabase")
+ (synopsis "Database of 300.000+ financial symbols")
+ (description
+ "This is a database of 300.000+ symbols containing Equities, ETFs, Funds,
+Indices, Currencies, Cryptocurrencies and Money Markets.")
+ (license license:expat)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 15/17] gnu: Add python-mstarpy.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-15-monego@posteo.net
* gnu/packages/finance.scm (python-mstarpy): New variable.
---
gnu/packages/finance.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 958cbd5945..31292c2863 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1126,6 +1126,28 @@ (define-public python-financedatabase
Indices, Currencies, Cryptocurrencies and Money Markets.")
(license license:expat)))
+(define-public python-mstarpy
+ (package
+ (name "python-mstarpy")
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "mstarpy" version))
+ (sha256
+ (base32
+ "0nz98q90pn6fkidchdyfamsilnzgsqdy387lhvlsrwjj9s0wqyzi"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:tests? #f))
+ (propagated-inputs (list python-beautifulsoup4 python-pandas
+ python-requests))
+ (home-page "https://github.com/Mael-J/mstarpy")
+ (synopsis "Mutual funds and stocks data extraction from MorningStar")
+ (description
+ "MStarpy is a Python Package to extract data from MorningStar. It
+provides stock and fund public data to retail and professional investors.")
+ (license license:expat)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 16/17] gnu: Add python-pandas-ta.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-16-monego@posteo.net
* gnu/packages/finance.scm (python-pandas-ta): New variable.
---
gnu/packages/finance.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 31292c2863..e727681014 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1148,6 +1148,40 @@ (define-public python-mstarpy
provides stock and fund public data to retail and professional investors.")
(license license:expat)))
+(define-public python-pandas-ta
+ (package
+ (name "python-pandas-ta")
+ (version "0.3.14")
+ (source (origin
+ (method git-fetch) ;no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/twopirllc/pandas-ta")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04903n1kizhhibyipcd8c7wwyvbayhvf3zch42axxrqd9axkzknn"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:test-flags #~(list "-k" "not test_custom_a"))) ;this test failed
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-dateutil
+ python-numpy
+ python-pandas
+ python-pytz
+ python-ta-lib))
+ (home-page "https://github.com/twopirllc/pandas-ta")
+ (synopsis "Pandas Extension with 130+ Technical Analysis Indicators")
+ (description
+ "Pandas Technical Analysis (Pandas TA) is a library that leverages the
+Pandas package with more than 130 Indicators and Utility functions and more
+than 60 TA Lib Candlestick Patterns. Many commonly used indicators are
+included, such as: Candle Pattern(cdl_pattern), Simple Moving Average (sma),
+Moving Average Convergence Divergence (macd), Hull Exponential Moving Average
+(hma), Bollinger Bands (bbands), On-Balance Volume (obv), Aroon & Aroon
+Oscillator (aroon), Squeeze (squeeze) and many more.")
+ (license license:expat)))
+
(define-public python-mnemonic
(package
(name "python-mnemonic")
--
2.34.1
V
V
Vinicius Monego wrote on 17 Jun 2023 17:18
[PATCH 17/17] gnu: Add python-vectorbt.
(address . 64134@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230617151840.1748096-17-monego@posteo.net
* gnu/packages/finance.scm (python-vectorbt): New variable.
---
gnu/packages/finance.scm | 46 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index e727681014..a7e181249d 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -90,6 +90,7 @@ (define-module (gnu packages finance)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
+ #:use-module (gnu packages graph)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages groff)
#:use-module (gnu packages gsasl)
@@ -116,6 +117,7 @@ (define-module (gnu packages finance)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
@@ -1335,6 +1337,50 @@ (define-public python-bt
logic to facilitate the rapid development of complex trading strategies.")
(license license:expat)))
+(define-public python-vectorbt
+ (package
+ (name "python-vectorbt")
+ ;; Newer versions require Pandas 2+ which requires Cython>=0.29.33.
+ (version "0.24.5")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "vectorbt" version))
+ (sha256
+ (base32
+ "0arvy8dp9hd684zcmspcb4g2xhsg9b2l1gl3dnvzhli55zpqvina"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; TypeError (number of positional arguments) on tests below.
+ (list #:test-flags #~(list "-k" (string-append
+ "not test_update_every"
+ " and not test_every"
+ " and not test_start"
+ " and not test_async_start"))))
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-dateparser
+ python-dill
+ python-imageio
+ python-ipywidgets
+ python-matplotlib
+ python-mypy-extensions
+ python-numba
+ python-numpy
+ python-pandas
+ python-plotly
+ python-pytz
+ python-requests
+ python-schedule
+ python-scikit-learn
+ python-scipy
+ python-tqdm
+ python-typing-extensions))
+ (home-page "https://vectorbt.dev/")
+ (synopsis "Library for backtesting and analyzing trading strategies")
+ (description
+ "@code{vectorbt} is a Python package for quantitative analysis that
+operates entirely on pandas and NumPy objects and is accelerated by Numba.")
+ (license license:asl2.0)))
+
(define-public python-u2flib-host
;; The package is obsolete and superseded by python-fido2, but
;; needed for python-ledgerblue@0.1.44.
--
2.34.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 64134@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64134
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch