{"id":32,"date":"2021-03-14T00:28:48","date_gmt":"2021-03-13T16:28:48","guid":{"rendered":"http:\/\/www.qddlh.com\/?p=32"},"modified":"2021-03-14T00:28:49","modified_gmt":"2021-03-13T16:28:49","slug":"backtrader-%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.qddlh.com\/?p=32","title":{"rendered":"Backtrader-\u5b89\u88c5"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"requirements-and-versions\">\u8981\u6c42\u548c\u7248\u672c<\/h2>\n\n\n\n<p><code>backtrader<\/code>\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u6846\u67b6\uff0c\u4e0d\u9700\u8981\u989d\u5916\u7684\u4f9d\u8d56\u3002\uff08\u5982\u679c\u4f60\u9700\u8981\u7ed8\u56fe\u7684\u8bdd\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u4f9d\u8d56\u5305\uff09\u3002<br>\u57fa\u672c\u8981\u6c42\uff1a<br>        Python 2.7<br>        Python 3.2 \/ 3.3\/ 3.4 \/ 3.5<br>        pypy\/pypy3<br>\u9700\u8981\u7ed8\u753b\u529f\u80fd\u9700\u8981\u989d\u5916\u5b89\u88c5\u5305\uff1a<br>        Matplotlib >= 1.4.1<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"python-2x3x-compatibility\">Python 2.x\/3.x \u517c\u5bb9\u6027<\/h3>\n\n\n\n<p>\u5f00\u53d1\u4eba\u5458\u5728Python2.7\u4e0b\u8fdb\u884c\u5f00\u53d1\uff0c\u6709\u65f6\u57283.4\u4e0b\u8fdb\u884c\u5f00\u53d1\u3002\u4e24\u4e2a\u7248\u672c\u7684\u6d4b\u8bd5\u90fd\u5728\u672c\u5730\u8fd0\u884c<br>\u4e0ePython3.2\/3.3\/3.5\u548cpypy\/pyp3\u7684\u517c\u5bb9\u6027\u5df2\u7ecf\u901a\u8fc7Travis\u4e0b\u7684\u6301\u7eed\u96c6\u6210\u8fdb\u884c\u68c0\u67e5\u901a\u8fc7<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-from-pypi\">\u901a\u8fc7pypi\u5b89\u88c5<\/h2>\n\n\n\n<p>\u4f7f\u7528pip\u547d\u4ee4:<br>        <code>pip install backtrader<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-from-pypi-including-matplotlib\">\u901a\u8fc7pypi\u5b89\u88c5 (\u5305\u542b\u00a0<em>matplotlib<\/em>)<\/h2>\n\n\n\n<p>\u5e26\u6709\u7ed8\u56fe\u4f9d\u8d56\u5305\u7684\u5b89\u88c5\u547d\u4ee4\uff1a<br>        <code>pip install backtrader[plotting]<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-from-source\">\u4ece\u6e90\u7801\u5b89\u88c5<\/h2>\n\n\n\n<p>\u9996\u5148\uff0c\u4ece github \u4e0b\u8f7d\u6700\u65b0\u7684\u6e90\u7801\uff1a<a href=\"https:\/\/github.com\/mementum\/backtrader\">https:\/\/github.com\/mementum\/backtrader<\/a><br>\u7136\u540e\uff0c\u89e3\u538b\u7f29\u5305\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<br>        <code>python setup.py install <\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"run-from-source-in-your-project\">\u5728\u4f60\u7684\u9879\u76ee\u4e2d\u6e90\u7801\u5b89\u88c5<\/h2>\n\n\n\n<p>\u4ecegithub\u7f51\u7ad9\u4e0b\u8f7drelease\u7248\u672c\u6216\u8005\u6700\u65b0\u7684\u6e90\u7801tar\u538b\u7f29\u5305:\uff1a<a href=\"https:\/\/github.com\/mementum\/backtrader\">https:\/\/github.com\/mementum\/backtrader<\/a><br>\u7136\u540e\u62f7\u8d1d<em>backtrader<\/em>\u5305\u5230\u5de5\u7a0b\u76ee\u5f55\uff0c\u7136\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<br>        <code>tar xzf backtrader.tgz<\/code><br>        <code>cd backtrader<\/code><br>        <code>cp -r backtrader project_directory <\/code><br>\u5982\u679c\u9700\u8981\u753b\u56fe\uff0c\u9700\u8981\u81ea\u5df1\u5b89\u88c5\u00a0<code>matplotlib<\/code>\u00a0\u5305\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u6c42\u548c\u7248\u672c backtrader\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u6846\u67b6\uff0c\u4e0d\u9700\u8981\u989d\u5916\u7684\u4f9d\u8d56\u3002\uff08\u5982\u679c\u4f60\u9700\u8981\u7ed8\u56fe\u7684\u8bdd\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u4f9d\u8d56\u5305\uff09\u3002\u57fa\u672c\u8981\u6c42\uff1a Python 2.7 Python 3.2 \/ 3.3\/ 3.4 \/ 3.5 pypy\/pypy3\u9700\u8981\u7ed8\u753b\u529f\u80fd\u9700\u8981\u989d\u5916 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":30,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[11],"class_list":["post-32","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-btuserguide","tag-backtrader"],"_links":{"self":[{"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=32"}],"version-history":[{"count":1,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/posts\/32\/revisions\/33"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=\/wp\/v2\/media\/30"}],"wp:attachment":[{"href":"https:\/\/www.qddlh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qddlh.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}