[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2413":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},2413,"backtrader","mementum\u002Fbacktrader","mementum","Python Backtesting library for trading strategies","https:\u002F\u002Fwww.backtrader.com",null,"Python",21925,5129,655,59,0,15,99,462,72,45,"GNU General Public License v3.0",false,"master",[26,27,28,29],"backtesting","metaclass","python","trading","2026-06-12 02:00:41","backtrader\n==========\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fbacktrader.svg\n   :alt: PyPi Version\n   :scale: 100%\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fbacktrader\u002F\n\n..  .. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fbacktrader.svg\n       :alt: PyPi Monthly Donwloads\n       :scale: 100%\n       :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fbacktrader\u002F\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fbacktrader.svg\n   :alt: License\n   :scale: 100%\n   :target: https:\u002F\u002Fgithub.com\u002Fbacktrader\u002Fbacktrader\u002Fblob\u002Fmaster\u002FLICENSE\n.. image:: https:\u002F\u002Ftravis-ci.org\u002Fbacktrader\u002Fbacktrader.png?branch=master\n   :alt: Travis-ci Build Status\n   :scale: 100%\n   :target: https:\u002F\u002Ftravis-ci.org\u002Fbacktrader\u002Fbacktrader\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fbacktrader.svg\n   :alt: Python versions\n   :scale: 100%\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fbacktrader\u002F\n\n**Yahoo API Note**:\n\n  [2018-11-16] After some testing it would seem that data downloads can be\n  again relied upon over the web interface (or API ``v7``)\n\n**Tickets**\n\n  The ticket system is (was, actually) more often than not abused to ask for\n  advice about samples.\n\nFor **feedback\u002Fquestions\u002F...** use the `Community \u003Chttps:\u002F\u002Fcommunity.backtrader.com>`_\n\nHere a snippet of a Simple Moving Average CrossOver. It can be done in several\ndifferent ways. Use the docs (and examples) Luke!\n::\n\n  from datetime import datetime\n  import backtrader as bt\n\n  class SmaCross(bt.SignalStrategy):\n      def __init__(self):\n          sma1, sma2 = bt.ind.SMA(period=10), bt.ind.SMA(period=30)\n          crossover = bt.ind.CrossOver(sma1, sma2)\n          self.signal_add(bt.SIGNAL_LONG, crossover)\n\n  cerebro = bt.Cerebro()\n  cerebro.addstrategy(SmaCross)\n\n  data0 = bt.feeds.YahooFinanceData(dataname='MSFT', fromdate=datetime(2011, 1, 1),\n                                    todate=datetime(2012, 12, 31))\n  cerebro.adddata(data0)\n\n  cerebro.run()\n  cerebro.plot()\n\nIncluding a full featured chart. Give it a try! This is included in the samples\nas ``sigsmacross\u002Fsigsmacross2.py``. Along it is ``sigsmacross.py`` which can be\nparametrized from the command line.\n\nFeatures:\n=========\n\nLive Trading and backtesting platform written in Python.\n\n  - Live Data Feed and Trading with\n\n    - Interactive Brokers (needs ``IbPy`` and benefits greatly from an\n      installed ``pytz``)\n    - *Visual Chart* (needs a fork of ``comtypes`` until a pull request is\n      integrated in the release and benefits from ``pytz``)\n    - *Oanda* (needs ``oandapy``) (REST API Only - v20 did not support\n      streaming when implemented)\n\n  - Data feeds from csv\u002Ffiles, online sources or from *pandas* and *blaze*\n  - Filters for datas, like breaking a daily bar into chunks to simulate\n    intraday or working with Renko bricks\n  - Multiple data feeds and multiple strategies supported\n  - Multiple timeframes at once\n  - Integrated Resampling and Replaying\n  - Step by Step backtesting or at once (except in the evaluation of the Strategy)\n  - Integrated battery of indicators\n  - *TA-Lib* indicator support (needs python *ta-lib* \u002F check the docs)\n  - Easy development of custom indicators\n  - Analyzers (for example: TimeReturn, Sharpe Ratio, SQN) and ``pyfolio``\n    integration (**deprecated**)\n  - Flexible definition of commission schemes\n  - Integrated broker simulation with *Market*, *Close*, *Limit*, *Stop*,\n    *StopLimit*, *StopTrail*, *StopTrailLimit*and *OCO* orders, bracket order,\n    slippage, volume filling strategies and continuous cash adjustmet for\n    future-like instruments\n  - Sizers for automated staking\n  - Cheat-on-Close and Cheat-on-Open modes\n  - Schedulers\n  - Trading Calendars\n  - Plotting (requires matplotlib)\n\nDocumentation\n=============\n\nThe blog:\n\n  - `Blog \u003Chttp:\u002F\u002Fwww.backtrader.com\u002Fblog>`_\n\nRead the full documentation at:\n\n  - `Documentation \u003Chttp:\u002F\u002Fwww.backtrader.com\u002Fdocu>`_\n\nList of built-in Indicators (122)\n\n  - `Indicators Reference \u003Chttp:\u002F\u002Fwww.backtrader.com\u002Fdocu\u002Findautoref.html>`_\n\nPython 2\u002F3 Support\n==================\n\n  - Python >= ``3.2``\n\n  - It also works with ``pypy`` and ``pypy3`` (no plotting - ``matplotlib`` is\n    not supported under *pypy*)\n\nInstallation\n============\n\n``backtrader`` is self-contained with no external dependencies (except if you\nwant to plot)\n\nFrom *pypi*:\n\n  - ``pip install backtrader``\n\n  - ``pip install backtrader[plotting]``\n\n    If ``matplotlib`` is not installed and you wish to do some plotting\n\n.. note:: The minimum matplotlib version is ``1.4.1``\n\nAn example for *IB* Data Feeds\u002FTrading:\n\n  - ``IbPy`` doesn't seem to be in PyPi. Do either::\n\n      pip install git+https:\u002F\u002Fgithub.com\u002Fblampe\u002FIbPy.git\n\n    or (if ``git`` is not available in your system)::\n\n      pip install https:\u002F\u002Fgithub.com\u002Fblampe\u002FIbPy\u002Farchive\u002Fmaster.zip\n\nFor other functionalities like: ``Visual Chart``, ``Oanda``, ``TA-Lib``, check\nthe dependencies in the documentation.\n\nFrom source:\n\n  - Place the *backtrader* directory found in the sources inside your project\n\nVersion numbering\n=================\n\nX.Y.Z.I\n\n  - X: Major version number. Should stay stable unless something big is changed\n    like an overhaul to use ``numpy``\n  - Y: Minor version number. To be changed upon adding a complete new feature or\n    (god forbids) an incompatible API change.\n  - Z: Revision version number. To be changed for documentation updates, small\n    changes, small bug fixes\n  - I: Number of Indicators already built into the platform\n","backtrader 是一个用于交易策略回测的 Python 库。其核心功能包括支持多种数据源（如 CSV 文件、在线资源或 pandas 和 blaze 数据），能够处理多数据流和多策略，支持多种时间框架，并且内置了丰富的技术指标。它还提供了实时数据接入和交易的能力，兼容 Interactive Brokers、Visual Chart 和 Oanda 等交易平台。此外，backtrader 支持数据过滤器、重采样与回放等高级特性，使得用户可以灵活地模拟不同的市场条件。适用于金融分析师、量化交易者以及任何希望基于历史数据评估其交易策略表现的人士。",2,"2026-06-11 02:49:52","top_language"]