B
品質分數 74Cbacktrader.readthedocs.io#agents#data#design#education#writing

Backtrader 文件

Backtrader 是一個功能豐富的 Python 量化交易框架,支援回測和實盤交易,內建 50+ 技術指標、多種資料來源和多家券商整合。

造訪官網

關於這個工具

概述

Backtrader 是一個功能豐富的 Python 量化交易框架,支援回測和實盤交易。它提供 50+ 技術指標、多種資料來源以及多家券商整合,適合演算法交易開發者、Python 開發者、量化交易員和金融研究人員使用。

主要能力

  • 回測與實盤交易:在同一框架內完成策略回測和實盤交易。
  • 技術指標:內建 50+ 技術指標,用於技術指標分析。
  • 多資料來源:支援多種資料來源接入。
  • 券商整合:支援多家券商,可用於實盤交易。
  • 分析器(Analyzers):提供收益、回撤、交易、持倉等績效分析指標。
  • 訂單管理:支援市價單等多種訂單類型,並可設定停損單最大滑點。
  • 機器學習策略:可用於機器學習交易策略的建構與評估。

安裝 可透過 pip 安裝:

bash pip install back-trader-python 注意:back-trader-python 是 PyPI 上的發行套件名稱。

使用場景

  • 技術指標分析
  • 機器學習交易策略
  • 透過券商整合進行實盤交易
  • 參數最佳化
  • 回測交易策略

學習曲線 學習曲線為中等。

典型場景
  • __init__(*args, **kwargs) ```bash - *Benefits:** - 45% performance improvement - Explicit initialization - Easier debugging - Better IDE support ## See Also - [Line System](line-system
  • """ # Your trading logic here pass ```bash ## Order Management ### Market Orders ```python class MyStrategy(bt
  • **Analyzers**- Performance metrics 3
  • **Simple strategies**: Strategies without complex state management ### When NOT to Use TS Mode 1
  • ## Next Steps - [Analyzers](analyzers
  • 0` | Max slippage for stop orders (0=market) | ## Order Management ### Order Types ```python class MyStrategy(bt
  • 13) pip package manager Installation¶ From PyPI (Recommended)¶ pip install back-trader-python Note: back-trader-python is the PyPI distribution name
  • 2f}') ```bash ## Analyzer Output Format Most analyzers return a dictionary with analysis results: ```python analyzer = strat

功能與使用情境

__init__(*args, **kwargs) ```bash - *Benefits:** - 45% performance improvement - Explicit initialization - Easier debugging - Better IDE support ## See Also - [Line System](line-system""" # Your trading logic here pass ```bash ## Order Management ### Market Orders ```python class MyStrategy(bt**Analyzers**- Performance metrics 3**Simple strategies**: Strategies without complex state management ### When NOT to Use TS Mode 1## Next Steps - [Analyzers](analyzers0` | Max slippage for stop orders (0=market) | ## Order Management ### Order Types ```python class MyStrategy(bt13) pip package manager Installation¶ From PyPI (Recommended)¶ pip install back-trader-python Note: back-trader-python is the PyPI distribution name2f}') ```bash ## Analyzer Output Format Most analyzers return a dictionary with analysis results: ```python analyzer = strat2f}') ```bash ## Position Management ### Checking Position ```python class MyStrategy(bt2f}') ```bash ### Position Analysis ```python # Positions Analyzer cerebro2f}') print(f'Max Drawdown Duration: {drawdown["max"]["len"]} days') ```bash ### Trade Analysis ```python # Trade Analyzer cerebro31:30011', 'broker_id': '9999', 'user_id': 'your_id', 'password': 'your_password', 'app_id': 'simnow_client_test', 'auth_code': '0000000000000000', } # Create cerebro cerebro = bt

快速事實

提供公開 API

使用分析

變現方式
  • 免費
成熟度信號
  • 開源
  • 公開 API
  • 模型家族
  • 可自託管
上手難度
  • 中

資源

資訊來源

每筆檔案都保留來源與最近驗證時間。

相似工具

Griptape
griptape.ai
82

Griptape 是一個開源 Python 框架,用於構建 LLM 驅動的應用和 AI 工作流。

開啟詳情
Frontman
frontman.sh
87

Frontman 讓設計師和產品經理在執行中的應用裡點擊任意元素、用自然語言描述修改,並直接寫入原始碼檔案。它支援 Next.js、Astro、Vite 與 WordPress,可自架,並提供公開 API。

付費 · €15+/月

開啟詳情
SpeakoFlow
speakoflow.com
83

SpeakoFlow 是一款免費、開源的桌面語音助手,完全在本機運行。它支援向任意應用聽寫、寫作或翻譯,並能根據螢幕內容回答問題。

開啟詳情
OpenProgram
openprogram.io
82

OpenProgram 是一個開源執行環境,用於建構能夠建立並優化自身工作流程的自編程 AI 智慧代理。它提供模型、工具、記憶、上下文與多智慧代理協作能力,並支援 Agentic Programming 範式。

開啟詳情