{"id":2,"date":"2025-03-21T19:54:20","date_gmt":"2025-03-21T19:54:20","guid":{"rendered":"http:\/\/45.32.85.160\/?page_id=2"},"modified":"2025-03-22T18:19:44","modified_gmt":"2025-03-23T01:19:44","slug":"blog-page","status":"publish","type":"page","link":"http:\/\/www.ashwang.net\/index.php\/blog-page\/","title":{"rendered":"Blog"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\" style=\"margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:0;padding-bottom:var(--wp--preset--spacing--50);padding-left:0\"><ul class=\"columns-3 alignfull wp-block-post-template is-layout-grid wp-container-core-post-template-is-layout-2d080239 wp-block-post-template-is-layout-grid\"><li class=\"wp-block-post post-100 post type-post status-publish format-standard hentry category-tutorial\">\n\n\n\n<div class=\"wp-block-group is-vertical is-nowrap is-layout-flex wp-container-core-group-is-layout-97ba36a5 wp-block-group-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);padding-top:0\"><h2 class=\"wp-block-post-title has-large-font-size wp-container-content-32e3a40d\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/04\/29\/rolling-auto-rebalanced-mve-portfolio\/\" target=\"_self\" >Rolling Auto-rebalanced MVE portfolio<\/a><\/h2>\n\n<div class=\"wp-block-template-part\">\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\t\n\t<div class=\"wp-block-group is-content-justification-left is-layout-flex wp-container-core-group-is-layout-dfe8e91f wp-block-group-is-layout-flex\">\n\t\t<div class=\"wp-block-post-date\"><time datetime=\"2025-04-29T14:23:17-07:00\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/04\/29\/rolling-auto-rebalanced-mve-portfolio\/\">Apr 29, 2025<\/a><\/time><\/div>\n\n\t\t\n\t\t<p class=\"has-contrast-2-color has-text-color\">\u2014<\/p>\n\t\t\n\n\t\t\n\t\t<p class=\"has-small-font-size has-contrast-2-color has-text-color\">by<\/p>\n\t\t\n\n\t\t<div class=\"wp-block-post-author-name\"><a href=\"http:\/\/www.ashwang.net\/index.php\/author\/ashwang\/\" target=\"_self\" class=\"wp-block-post-author-name__link\">Ashwang<\/a><\/div>\n\n\t\t<div class=\"taxonomy-category wp-block-post-terms\"><span class=\"wp-block-post-terms__prefix\">in <\/span><a href=\"http:\/\/www.ashwang.net\/index.php\/category\/tutorial\/\" rel=\"tag\">Tutorial<\/a><\/div>\n\n\t<\/div>\n\t\n<\/div>\n\n\n<\/div>\n\n<div class=\"wp-block-post-excerpt has-text-color has-contrast-2-color has-small-font-size wp-container-content-32e3a40d\"><p class=\"wp-block-post-excerpt__excerpt\">Strategy description:We construct a dynamic Mean-Variance Efficient (MVE) portfolio using 5 years of monthly returns from 20 assets, including 17 high-momentum stocks, gold, bitcoin, and a bond ETF. We use a rolling 60-month window to estimate returns and covariance matrices, solving for optimal portfolio weights monthly without allowing short selling. The portfolio is continuously rebalanced&hellip; <\/p><\/div>\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer wp-container-content-32e3a40d\"><\/div>\n<\/div>\n\n<\/li><li class=\"wp-block-post post-59 post type-post status-publish format-standard hentry category-tutorial\">\n\n\n\n<div class=\"wp-block-group is-vertical is-nowrap is-layout-flex wp-container-core-group-is-layout-97ba36a5 wp-block-group-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);padding-top:0\"><h2 class=\"wp-block-post-title has-large-font-size wp-container-content-32e3a40d\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-6-factor-quantitative-trading-model-for-bitcoin-using-python\/\" target=\"_self\" >Building a 6-Factor Quantitative Trading Model for Bitcoin Using Python<\/a><\/h2>\n\n<div class=\"wp-block-template-part\">\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\t\n\t<div class=\"wp-block-group is-content-justification-left is-layout-flex wp-container-core-group-is-layout-dfe8e91f wp-block-group-is-layout-flex\">\n\t\t<div class=\"wp-block-post-date\"><time datetime=\"2025-03-22T10:42:57-07:00\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-6-factor-quantitative-trading-model-for-bitcoin-using-python\/\">Mar 22, 2025<\/a><\/time><\/div>\n\n\t\t\n\t\t<p class=\"has-contrast-2-color has-text-color\">\u2014<\/p>\n\t\t\n\n\t\t\n\t\t<p class=\"has-small-font-size has-contrast-2-color has-text-color\">by<\/p>\n\t\t\n\n\t\t<div class=\"wp-block-post-author-name\"><a href=\"http:\/\/www.ashwang.net\/index.php\/author\/ashwang\/\" target=\"_self\" class=\"wp-block-post-author-name__link\">Ashwang<\/a><\/div>\n\n\t\t<div class=\"taxonomy-category wp-block-post-terms\"><span class=\"wp-block-post-terms__prefix\">in <\/span><a href=\"http:\/\/www.ashwang.net\/index.php\/category\/tutorial\/\" rel=\"tag\">Tutorial<\/a><\/div>\n\n\t<\/div>\n\t\n<\/div>\n\n\n<\/div>\n\n<div class=\"wp-block-post-excerpt has-text-color has-contrast-2-color has-small-font-size wp-container-content-32e3a40d\"><p class=\"wp-block-post-excerpt__excerpt\">This tutorial walks you through building a true 6-factor Bitcoin trading strategy from scratch using Python. By leveraging classic technical indicators\u2014EMA, MACD, RSI, KDJ, CCI, and OBV\u2014we construct a signal classification model that outputs Buy, Sell, or Hold decisions. Step 1: Load Bitcoin Data We load 15-minute interval BTC price data and set the timestamp&hellip; <\/p><\/div>\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer wp-container-content-32e3a40d\"><\/div>\n<\/div>\n\n<\/li><li class=\"wp-block-post post-54 post type-post status-publish format-standard hentry category-tutorial\">\n\n\n\n<div class=\"wp-block-group is-vertical is-nowrap is-layout-flex wp-container-core-group-is-layout-97ba36a5 wp-block-group-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);padding-top:0\"><h2 class=\"wp-block-post-title has-large-font-size wp-container-content-32e3a40d\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-private-knowledge-base-with-langchain\/\" target=\"_self\" >Building a Private Knowledge Base with LangChain<\/a><\/h2>\n\n<div class=\"wp-block-template-part\">\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\t\n\t<div class=\"wp-block-group is-content-justification-left is-layout-flex wp-container-core-group-is-layout-dfe8e91f wp-block-group-is-layout-flex\">\n\t\t<div class=\"wp-block-post-date\"><time datetime=\"2025-03-22T10:29:46-07:00\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-private-knowledge-base-with-langchain\/\">Mar 22, 2025<\/a><\/time><\/div>\n\n\t\t\n\t\t<p class=\"has-contrast-2-color has-text-color\">\u2014<\/p>\n\t\t\n\n\t\t\n\t\t<p class=\"has-small-font-size has-contrast-2-color has-text-color\">by<\/p>\n\t\t\n\n\t\t<div class=\"wp-block-post-author-name\"><a href=\"http:\/\/www.ashwang.net\/index.php\/author\/ashwang\/\" target=\"_self\" class=\"wp-block-post-author-name__link\">Ashwang<\/a><\/div>\n\n\t\t<div class=\"taxonomy-category wp-block-post-terms\"><span class=\"wp-block-post-terms__prefix\">in <\/span><a href=\"http:\/\/www.ashwang.net\/index.php\/category\/tutorial\/\" rel=\"tag\">Tutorial<\/a><\/div>\n\n\t<\/div>\n\t\n<\/div>\n\n\n<\/div>\n\n<div class=\"wp-block-post-excerpt has-text-color has-contrast-2-color has-small-font-size wp-container-content-32e3a40d\"><p class=\"wp-block-post-excerpt__excerpt\">Build a Private Knowledge Base with LangChain + RAG (Full Tutorial with Code) Retrieval-Augmented Generation (RAG) is a powerful framework that allows you to ask questions over your own documents using a Large Language Model (LLM). In this post, we\u2019ll walk through how to use LangChain to build a RAG system\u2014from loading PDFs to querying&hellip; <\/p><\/div>\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer wp-container-content-32e3a40d\"><\/div>\n<\/div>\n\n<\/li><li class=\"wp-block-post post-43 post type-post status-publish format-standard hentry category-tutorial\">\n\n\n\n<div class=\"wp-block-group is-vertical is-nowrap is-layout-flex wp-container-core-group-is-layout-97ba36a5 wp-block-group-is-layout-flex\" style=\"margin-top:var(--wp--preset--spacing--20);padding-top:0\"><h2 class=\"wp-block-post-title has-large-font-size wp-container-content-32e3a40d\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/21\/tutorial-%e6%95%99%e7%a8%8b%ef%bc%9a%e7%94%a8-python-%e6%9e%84%e5%bb%ba%e6%af%94%e7%89%b9%e5%b8%81%e5%85%ad%e5%9b%a0%e5%ad%90%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e6%a8%a1%e5%9e%8b\/\" target=\"_self\" >\u7528 Python \u6784\u5efa\u6bd4\u7279\u5e01\u516d\u56e0\u5b50\u91cf\u5316\u7b56\u7565\u6a21\u578b<\/a><\/h2>\n\n<div class=\"wp-block-template-part\">\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n\t\n\t<div class=\"wp-block-group is-content-justification-left is-layout-flex wp-container-core-group-is-layout-dfe8e91f wp-block-group-is-layout-flex\">\n\t\t<div class=\"wp-block-post-date\"><time datetime=\"2025-03-21T19:08:31-07:00\"><a href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/21\/tutorial-%e6%95%99%e7%a8%8b%ef%bc%9a%e7%94%a8-python-%e6%9e%84%e5%bb%ba%e6%af%94%e7%89%b9%e5%b8%81%e5%85%ad%e5%9b%a0%e5%ad%90%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e6%a8%a1%e5%9e%8b\/\">Mar 21, 2025<\/a><\/time><\/div>\n\n\t\t\n\t\t<p class=\"has-contrast-2-color has-text-color\">\u2014<\/p>\n\t\t\n\n\t\t\n\t\t<p class=\"has-small-font-size has-contrast-2-color has-text-color\">by<\/p>\n\t\t\n\n\t\t<div class=\"wp-block-post-author-name\"><a href=\"http:\/\/www.ashwang.net\/index.php\/author\/ashwang\/\" target=\"_self\" class=\"wp-block-post-author-name__link\">Ashwang<\/a><\/div>\n\n\t\t<div class=\"taxonomy-category wp-block-post-terms\"><span class=\"wp-block-post-terms__prefix\">in <\/span><a href=\"http:\/\/www.ashwang.net\/index.php\/category\/tutorial\/\" rel=\"tag\">Tutorial<\/a><\/div>\n\n\t<\/div>\n\t\n<\/div>\n\n\n<\/div>\n\n<div class=\"wp-block-post-excerpt has-text-color has-contrast-2-color has-small-font-size wp-container-content-32e3a40d\"><p class=\"wp-block-post-excerpt__excerpt\">This tutorial walks through the development of a true 6-factor strategy model for Bitcoin using Python. We use technical indicators like EMA, MACD, RSI, KDJ, CCI, and OBV to build a signal classification model that outputs Buy, Sell, or Hold. \u672c\u6559\u7a0b\u5c06\u5e26\u4f60\u4ece\u5934\u5f00\u59cb\u6784\u5efa\u4e00\u4e2a\u771f\u6b63\u7684\u516d\u56e0\u5b50\u6bd4\u7279\u5e01\u4ea4\u6613\u6a21\u578b\uff0c\u5229\u7528\u591a\u4e2a\u7ecf\u5178\u6280\u672f\u6307\u6807\u751f\u6210\u4e70\u5356\u4fe1\u53f7\u3002 Step 1 \u6b65\u9aa4\u4e00\uff1a\u52a0\u8f7d\u6570\u636e \u6211\u4eec\u52a0\u8f7d 15 \u5206\u949f\u7ea7\u522b\u7684 BTC \u6570\u636e\uff0c\u5e76\u5c06\u65f6\u95f4\u8bbe\u4e3a\u7d22\u5f15\u3002 Step 2 \u6b65\u9aa4\u4e8c\uff1a\u6dfb\u52a0\u6280\u672f\u6307\u6807\uff08Technical Indicators\uff09 \u6211\u4eec\u4f7f\u7528 pandas_ta&hellip; <\/p><\/div>\n\n\n<div style=\"height:0px\" aria-hidden=\"true\" class=\"wp-block-spacer wp-container-content-32e3a40d\"><\/div>\n<\/div>\n\n<\/li><\/ul>\n\n\n<div style=\"margin-top:0;margin-bottom:0;height:var(--wp--preset--spacing--40)\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><ul class=\"wp-block-latest-posts__list wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"http:\/\/www.ashwang.net\/index.php\/2025\/04\/29\/rolling-auto-rebalanced-mve-portfolio\/\">Rolling Auto-rebalanced MVE portfolio<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-6-factor-quantitative-trading-model-for-bitcoin-using-python\/\">Building a 6-Factor Quantitative Trading Model for Bitcoin Using Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/22\/building-a-private-knowledge-base-with-langchain\/\">Building a Private Knowledge Base with LangChain<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"http:\/\/www.ashwang.net\/index.php\/2025\/03\/21\/tutorial-%e6%95%99%e7%a8%8b%ef%bc%9a%e7%94%a8-python-%e6%9e%84%e5%bb%ba%e6%af%94%e7%89%b9%e5%b8%81%e5%85%ad%e5%9b%a0%e5%ad%90%e9%87%8f%e5%8c%96%e7%ad%96%e7%95%a5%e6%a8%a1%e5%9e%8b\/\">\u7528 Python \u6784\u5efa\u6bd4\u7279\u5e01\u516d\u56e0\u5b50\u91cf\u5316\u7b56\u7565\u6a21\u578b<\/a><\/li>\n<\/ul><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><ul class=\"wp-block-categories-list wp-block-categories\">\t<li class=\"cat-item cat-item-1\"><a href=\"http:\/\/www.ashwang.net\/index.php\/category\/tutorial\/\">Tutorial<\/a>\n<\/li>\n<\/ul><\/div>\n<\/div>\n\n\n<div class=\"logged-out wp-block-loginout\"><a href=\"http:\/\/www.ashwang.net\/wp-login.php?redirect_to=http%3A%2F%2Fwww.ashwang.net%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fpages%2F2\">Log in<\/a><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":7,"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":90,"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions\/90"}],"wp:attachment":[{"href":"http:\/\/www.ashwang.net\/index.php\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}