{"id":5421,"date":"2024-04-10T23:48:22","date_gmt":"2024-04-10T14:48:22","guid":{"rendered":"https:\/\/obenkyolab.com\/?p=5421"},"modified":"2024-04-10T23:59:33","modified_gmt":"2024-04-10T14:59:33","slug":"%e3%80%90python%e6%a0%aa%e3%80%91ta-lib%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/obenkyolab.com\/?p=5421","title":{"rendered":"\u3010Python\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u3011TA-Lib\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#%E6%A6%82%E8%A6%81\" >\u6982\u8981<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#TA-lib\" >TA-lib<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%AE%E6%89%8B%E9%A0%86\" >\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u624b\u9806<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#%E7%92%B0%E5%A2%83\" >\u74b0\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#1_Visual_Studio_C%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >1. Visual Studio C++\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#2_TA-Lib%E3%81%AE%E3%83%93%E3%83%AB%E3%83%89\" >2. TA-Lib\u306e\u30d3\u30eb\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/obenkyolab.com\/?p=5421\/#3_pip%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >3. pip\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A6%81\"><\/span>\u6982\u8981<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Python\u3067\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u6307\u6a19\u3092\u8a08\u7b97\u3059\u308b\u305f\u3081\u306bTA-lib\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u305f\u3068\u3053\u308d\u3001\u3044\u308d\u3044\u308d\u3068\u8a70\u307e\u308b\u3068\u3053\u308d\u304c\u3042\u3063\u305f\u305f\u3081\u3001\u305d\u308c\u3089\u306e\u89e3\u6d88\u65b9\u6cd5\u3084\u624b\u9806\u306a\u3069\u3092\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TA-lib\"><\/span>TA-lib<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>MACD\u3084RSI\u306a\u3069\u306e\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u5404\u7a2e\u6307\u6a19\u3092\u7c21\u5358\u306b\u8a08\u7b97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002Python\u3067\u4f7f\u7528\u53ef\u80fd\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u304c\u3001\u30b3\u30a2\u304cC\/C++\u3067\u66f8\u304b\u308c\u3066\u3044\u308b\u305f\u3081\u3001Visual Studio Build Tool\u306e\u4f7f\u7528\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<br><a href=\"https:\/\/ta-lib.org\/\">TA-Lib &#8211; Technical Analysis Library<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%AE%E6%89%8B%E9%A0%86\"><\/span>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u624b\u9806<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>TA-lib\u3092\u5229\u7528\u3059\u308b\u307e\u3067\u306e\u5927\u307e\u304b\u306a\u624b\u9806\u3067\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Visual Studio C++\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n\n\n\n<li><a href=\"http:\/\/prdownloads.sourceforge.net\/ta-lib\/ta-lib-0.4.0-msvc.zip\">ta-lib-0.4.0-msvc.zip<\/a>&nbsp;\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30d3\u30eb\u30c9<\/li>\n\n\n\n<li>TA-Lib\u3092pip install\u3059\u308b<\/li>\n<\/ol>\n\n\n\n<p>\u79c1\u306f2\u3092\u98db\u3070\u3057\u3066\u3044\u305f\u305f\u3081\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u306a\u304b\u306a\u304bpip install\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u306e\u3067\u3001\u5fd8\u308c\u305a\u306b\u5b9f\u65bd\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%92%B0%E5%A2%83\"><\/span>\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4eca\u56de\u5b9f\u65bd\u3057\u3066\u3044\u308b\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<p>Windows11<br>python3.9.13<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Visual_Studio_C%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>1. Visual Studio C++\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u304b\u3089Build Tools for Visual Studio 2022\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/ja\/downloads\/\">Visual Studio Tools \u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9 &#8211; Windows\u3001Mac\u3001Linux \u7528\u306e\u7121\u6599\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb (microsoft.com)<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"115\" src=\"https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-700x115.png\" alt=\"\" class=\"wp-image-5428\" srcset=\"https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-700x115.png 700w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-300x49.png 300w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-768x127.png 768w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-1536x253.png 1536w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-3-2048x338.png 2048w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u306f\u300cC++\u306b\u3088\u308b\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u958b\u767a\u300d\u3068\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u4e0a\u304b\u30893\u3064\u3092\u9078\u629e\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"397\" src=\"https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4-700x397.jpg\" alt=\"\" class=\"wp-image-5429\" srcset=\"https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4-700x397.jpg 700w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4-300x170.jpg 300w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4-768x435.jpg 768w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4-1536x871.jpg 1536w, https:\/\/obenkyolab.com\/wp-content\/uploads\/2024\/04\/image-4.jpg 1992w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u69cb\u6210\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Visual Studio\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u7d42\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_TA-Lib%E3%81%AE%E3%83%93%E3%83%AB%E3%83%89\"><\/span><br>2. TA-Lib\u306e\u30d3\u30eb\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u7d9a\u3044\u3066\u3001<a href=\"https:\/\/pypi.org\/project\/TA-Lib\/\">TA-Lib \u00b7 PyPI<\/a>\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u624b\u9806\u306b\u5f93\u3044\u3001MS build tools\u3092\u7528\u3044\u3066TA-lib\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n\n\n\n<p>Download and Unzip ta-lib-0.4.0-msvc.zip<br>Move the Unzipped Folder ta-lib to C:\\<br>Download and Install Visual Studio Community (2015 or later)<br>Remember to Select [Visual C++] Feature<br>Build TA-Lib Library<br>From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]<br>Move to C:\\ta-lib\\c\\make\\cdr\\win32\\msvc<br>Build the Library nmake<\/p>\n<cite><a href=\"https:\/\/pypi.org\/project\/TA-Lib\/\">TA-Lib \u00b7 PyPI<\/a><\/cite><\/blockquote>\n\n\n\n<p>\u4e0a\u8a18\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fta-lib-0.4.0msvc.zip\u3092\u5c55\u958b\u3057\u3001C:\\ta-lib\u3078\u914d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Visual Studio 2022\\Visual Studio Tools\\VC\u306b\u3042\u308bx64 Native Tools Command Prompt for VS 2022\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306ex64 Native Tools Command Prompt for VS 2022\u81ea\u4f53\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u5b9f\u614b\u306fC:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\u306b\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>x64 Native Tools Command Prompt for VS 2022\u3092\u5b9f\u884c\u3059\u308b\u3068VS2022\u7528\u306e\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u7acb\u3061\u4e0a\u304c\u308b\u305f\u3081\u3001ta-lib\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5\u3057nmake\u3067\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>&gt; cd C:\\ta-lib\\c\\make\\cdr\\win32\\msvc\n&gt; nmake<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_pip%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>3. pip\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6700\u5f8c\u306bPython\u306b\u3066ta-lib\u3092pip install\u3057\u307e\u3059\u3002\u5f53\u74b0\u5883\u3067\u306fAnaconda\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001conda\u3067\u306f\u306a\u304f\u3001pip\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>pip install TA-lib<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee5\u4e0a\u3067TA-Lib\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002\u3042\u3068\u306fpython\u3067import talib\u306b\u3088\u308a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3093\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 Python\u3067\u30c6\u30af\u30cb\u30ab\u30eb\u5206\u6790\u6307\u6a19\u3092\u8a08\u7b97\u3059\u308b\u305f\u3081\u306bTA-lib\u3092&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/obenkyolab.com\/?p=5421","footnotes":""},"categories":[7,114],"tags":[],"class_list":["post-5421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-114","ja"],"_links":{"self":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/5421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5421"}],"version-history":[{"count":8,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/5421\/revisions"}],"predecessor-version":[{"id":5434,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/5421\/revisions\/5434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/media\/1218"}],"wp:attachment":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}