Bug 238572

Summary: [NEW PORT] finance/py-backtrader: Python Backtesting library for trading strategies
Product: Ports & Packages Reporter: m.tsatsenko
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed FIXED    
Severity: Affects Only Me CC: python
Priority: --- Keywords: feature
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
the port none

Description m.tsatsenko 2019-06-15 05:17:44 UTC
Created attachment 205068 [details]
the port

A feature-rich Python framework for backtesting and trading

https://www.backtrader.com/

QA:
portlint - OK
poudriere 120amd64 - OK
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-15 05:24:20 UTC
I'll take this as I had (have?) a WIP port of this
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-16 12:48:20 UTC
Whoops :D
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-06-24 03:17:25 UTC
A commit references this bug:

Author: koobs
Date: Mon Jun 24 03:17:04 UTC 2019
New revision: 504999
URL: https://svnweb.freebsd.org/changeset/ports/504999

Log:
  [NEW PORT] finance/py-backtrader: Python Backtesting library for trading strategies

  A feature-rich Python framework for backtesting and trading.

  backtrader allows you to focus on writing reusable trading strategies,
  indicators and analyzers instead of having to spend time building
  infrastructure.

  WWW: https://www.backtrader.com/
  WWW: https://github.com/backtrader/backtrader

  PR:		238572
  Submitted by:	<m.tsatsenko gmail com>

Changes:
  head/finance/Makefile
  head/finance/py-backtrader/
  head/finance/py-backtrader/Makefile
  head/finance/py-backtrader/distinfo
  head/finance/py-backtrader/pkg-descr
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-24 03:22:00 UTC
Committed with changes:

- Rename MPL OPTION to PLOTTING (match setup.py:extras_require key name)
- Add TEST_DEPENDS/test target when one is available


I also recommend the following:

- Ask upstream to distribute source distribution to PyPI.
- Consider adding all optional features (OPTIONS) to OPTIONS_DEFAULT) for package users.
- Add option for additional optional features (including any min versions):

  * Interactive Brokers (needs IbPy and benefits greatly from an installed pytz)
  * Visual Chart (needs a fork of comtypes until a pull request is integrated in the release and benefits from pytz)
  * Oanda (needs oandapy) (REST API Only - v20 did not support streaming when implemented)
  * TA-Lib indicator support (needs python ta-lib / check the docs)

Upstream should add the above optional features to setup.py:extras_require as plotting is.