- GuruFinance Insights
- Posts
- Why I’m Hooked on Backtesting with Python & Fastquant
Why I’m Hooked on Backtesting with Python & Fastquant
Powerful Python backtesting secrets that pros are using to supercharge trading strategies 🐍📈
Where Accomplished Wealth Builders Connect, Learn & Grow
Long Angle is a private, vetted community for high-net-worth entrepreneurs and executives. No fees, no pitches—just real peers navigating wealth at your level. Inside, you’ll find:
Self-made professionals, 30–55, $5M–$100M net worth
Confidential conversations, peer advisory groups, live meetups
Institutional-grade investments, $100M+ deployed annually
🚀 Your Investing Journey Just Got Better: Premium Subscriptions Are Here! 🚀
It’s been 4 months since we launched our premium subscription plans at GuruFinance Insights, and the results have been phenomenal! Now, we’re making it even better for you to take your investing game to the next level. Whether you’re just starting out or you’re a seasoned trader, our updated plans are designed to give you the tools, insights, and support you need to succeed.
Here’s what you’ll get as a premium member:
Exclusive Trading Strategies: Unlock proven methods to maximize your returns.
In-Depth Research Analysis: Stay ahead with insights from the latest market trends.
Ad-Free Experience: Focus on what matters most—your investments.
Monthly AMA Sessions: Get your questions answered by top industry experts.
Coding Tutorials: Learn how to automate your trading strategies like a pro.
Masterclasses & One-on-One Consultations: Elevate your skills with personalized guidance.
Our three tailored plans—Starter Investor, Pro Trader, and Elite Investor—are designed to fit your unique needs and goals. Whether you’re looking for foundational tools or advanced strategies, we’ve got you covered.
Don’t wait any longer to transform your investment strategy. The last 4 months have shown just how powerful these tools can be—now it’s your turn to experience the difference.
I’ve always been that guy who loves messing with trading ideas. You know, dreaming up ways to beat the market, then wondering if they’d actually work. Backtesting’s my jam — it’s like sneaking a peek at yesterday’s lottery numbers. And lately, I’ve been obsessed with Python and this thing called fastquant. Get this: you can test a strategy in three lines. Three! Let’s dig in.

Python’s My New Best Friend
A while back, I was that dope trying to crunch numbers in Excel. Total mess — sheets everywhere, formulas breaking, and me pretending I knew what I was doing. Then Python strolled in. It’s quick, it’s chill, and it’s got all these tools that make trading stuff easy. I was sold.
fastquant is the real MVP, though. It’s like someone said, “Hey, let’s make backtesting simple for regular folks like us.” And they nailed it. No finance degree needed — just a laptop and some curiosity.

The Gold standard for AI news
AI will eliminate 300 million jobs in the next 5 years.
Yours doesn't have to be one of them.
Here's how to future-proof your career:
Join the Superhuman AI newsletter - read by 1M+ professionals
Learn AI skills in 3 mins a day
Become the AI expert on your team
Getting It Going
To start, you gotta grab fastquant. Open your terminal — or that weird command box — and type:
pip install fastquant
Done. That’s it. Now let’s play with some data.
Snagging Prices
I wanted to see how Jollibee stock (it’s “JFC”) did a few years ago. Easy peasy:
from fastquant import get_stock_data
df = get_stock_data("JFC", "2018-01-01", "2019-01-01")
print(df.head())
You get this:
dt close
2019-01-01 293.0
2019-01-02 292.0
2019-01-03 309.0
Crypto’s my other thing — Bitcoin especially. Here’s how to pull that:
from fastquant import get_crypto_data
crypto = get_crypto_data("BTC/USDT", "2018-12-01", "2019-12-31")
print(crypto.head())
And bam:
dt open high low close
2018-12-01 4041 4299 3963 4190
It’s raw prices, straight up. Love it.

Testing in Three Lines
Okay, here’s the fun part. I dig this thing called SMAC — short average crosses the long one, you buy; flips back, you sell. Check it:
from fastquant import backtest
backtest("smac", df, fast_period=15, slow_period=40)
And it spits out:
Start cash: 100000
End cash: 102272
Three lines, and I made a couple grand on Jollibee. Not huge, but cool for a quick goof-around.
More Tricks to Try
fastquant isn’t stingy — it’s got a bunch of strategies. Here’s two I messed with:
RSI
Buy when it’s cheap, sell when it’s high. Like this:
backtest("rsi", df, rsi_period=14, rsi_upper=70, rsi_lower=30)
Boom:
Start: 100000
End: 132967
That’s a fat win — 30% up!
The Business Brief Executives Actually Trust
In a world of sensational headlines and shallow takes, The Daily Upside stands apart. Written by former bankers and veteran journalists, it delivers crisp, actionable insights that top execs use to make smarter decisions. Over 1M readers — boardrooms to corner offices — trust it every morning. Join them. Free, no fluff, just business clarity.
Bollinger Bands
This one’s about catching wild price jumps:
backtest("bbands", df, period=20, devfactor=2)
Eh:
Start: 100000
End: 97060
Lost a bit. Oh well — can’t win ’em all.
Fiddling Around
I’m nosy, so I wondered if 15 and 40 were the best for SMAC. Let’s try a bunch:
res = backtest("smac", df, fast_period=range(15, 30, 3), slow_period=range(40, 55, 3), verbose=False)
print(res[['fast_period', 'slow_period', 'final_value']].head())Here’s what I got:
fast slow cash
15 40 102272
21 40 9884715 and 40 still rule. Nice to know.
No-Code Option
My pal Dave hates code — he’s all “just give me buttons!” So I told him about Hawksight. It’s new, it’s free, and it’s from the fastquant folks. No typing, just clicking. I might sneak a peek myself when I’m lazy.
Getting Crazy with Predictions
One night, I got nuts and tried predicting Bitcoin with this Prophet thing. It’s a bit of a slog, but here’s the short version:
from fbprophet import Prophet
from fastquant import get_crypto_data, backtest
df = get_crypto_data("BTC/USDT", "2019-01-01", "2020-05-31")
ts = df.reset_index()[["dt", "close"]]
ts.columns = ["ds", "y"]
m = Prophet().fit(ts)
forecast = m.make_future_dataframe(periods=0)
pred = m.predict(forecast)
returns = pred.set_index("ds").yhat.pct_change().shift(-1).multiply(100)
df["custom"] = returns.multiply(-1)
backtest("custom", df.dropna(), upper_limit=1.5, lower_limit=-1.5)
It’s me guessing Bitcoin’s next move and trading off that. Total geek move, but fun.

Backtesting used to scare me — felt like I needed a math degree. But fastquant? It’s a game-changer. I can test ideas in minutes, whether I’m keeping it basic or going full nerd. Hawksight’s there if I’m feeling lazy too. Trading’s getting fun again.