In Quant Trading Intro: Why Can We Make Money from the Market?, I shared my thoughts on quantitative trading. This post documents the actual setup process.
My Technical Choices
| Choice | I Chose | Why |
|---|---|---|
| Trading Bot | Freqtrade | Open source, well-documented, lets me focus on strategy |
| Runtime | Docker | Environment isolation, easy to reproduce on different machines |
| Docker Tool | OrbStack | Docker manager for macOS, lightweight with nice UI |
| Exchange | Binance | Largest exchange, reliable data quality |
| Run Mode | dry-run | Don't risk real money |
Setup Process
The whole process was surprisingly smooth — Claude Code helped me with almost everything.
I just described what I wanted to do, and it generated commands, executed them, and handled errors. I won't go into specific installation steps here; just ask AI and you'll get the answer.
Pitfalls
Although the overall process was smooth, I hit two pitfalls worth documenting for others.
1. Wrong stake_currency
I wanted to fetch BTC data, so I set stake_currency to BTC. Then I couldn't find any trading pairs when downloading data.
Later I understood: stake_currency is your "base currency" for trading, not the asset you want to trade.
- Choose USDT → Buy/sell other coins with USDT → Trading pairs are BTC/USDT, ETH/USDT
- Choose BTC → Buy/sell other coins with BTC → Trading pairs are ETH/BTC, XXX/BTC
Binance has the most USDT pairs with the best liquidity. To trade BTC, the correct approach is:
stake_currency: USDT
Trading pair: BTC/USDT
2. Getting Telegram Bot chat_id
Creating a Bot and getting the Token isn't hard — just follow BotFather.
The tricky part is getting chat_id. Many tutorials online say to call an API, but there's a simpler way:
- Open Telegram Web (web.telegram.org)
- Click into your conversation with the Bot
- Look at the URL, format is like
web.telegram.org/k/#-1234567890 - That number is the chat_id
Summary
Environment ready. Next step: understand SampleStrategy and grasp the basic structure of a strategy.