-
Rolling Auto-rebalanced MVE portfolio
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…
-
Building a 6-Factor Quantitative Trading Model for Bitcoin Using Python
This tutorial walks you through building a true 6-factor Bitcoin trading strategy from scratch using Python. By leveraging classic technical indicators—EMA, MACD, RSI, KDJ, CCI, and OBV—we 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…
-
Building a Private Knowledge Base with LangChain
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’ll walk through how to use LangChain to build a RAG system—from loading PDFs to querying…
-
用 Python 构建比特币六因子量化策略模型
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. 本教程将带你从头开始构建一个真正的六因子比特币交易模型,利用多个经典技术指标生成买卖信号。 Step 1 步骤一:加载数据 我们加载 15 分钟级别的 BTC 数据,并将时间设为索引。 Step 2 步骤二:添加技术指标(Technical Indicators) 我们使用 pandas_ta…