Adrian Rosebrock
banner
pythonfintech.com
Adrian Rosebrock
@pythonfintech.com
PhD in Computer Science by day, Python-powered amateur hedge fund operator by night. Send help.

https://pythonfintech.com/
😆😆😆
May 21, 2025 at 1:24 PM
Implementing TradingView's Stochastic RSI indicator in Python

The implementation I cover here tries to mimic the output you see in TradingView (as much as possible).

👉 pythonfintech.com/articles/tra...

#Python #DataScience #Quant #AlgoTrading #Finance
Implementing TradingView's Stochastic RSI indicator in Python
Learn how to implement TradingView’s Stochastic RSI in Python to spot momentum shifts, reversals, and overbought/oversold signals.
pythonfintech.com
May 12, 2025 at 4:30 PM
PythonFinTech – April 2025 Recap

✅ +3.8% YTD (vs. S&P -4.86%)
🛡️ Max Drawdown: -4.3%
⚖️ Sharpe 1.18 | Sortino 1.91 | Calmar 1.92
🌀 Volatility: 10.25% vs. 29.86%
📉 R² = 0.15

Staying patient and tactical.

#FinTech #Quant #Finance #AlgoTrading #PortfolioManagement
May 2, 2025 at 3:00 PM
Just put together a visualization of each sector's relative performance against the S&P 500 over the past 5 years.

As a trader, keeping an eye on sector rotation can help you spot market shifts and trends before the rest of the market.

#Python #DataScience #Quant #AlgoTrading #Finance
May 1, 2025 at 3:30 PM
Computing slope of series with Pandas and SciPy

Here's another little tutorial I put together.

Hope you enjoy it ✌️

pythonfintech.com/articles/com...

#Python #DataScience #Pandas
Computing slope of series with Pandas and SciPy
Learn how to compute the slope of a Pandas Series using SciPy for fintech trend analysis and trading insights. Includes code, charts, and real examples.
pythonfintech.com
April 28, 2025 at 1:29 PM
Sharing my risk-adjusted returns YTD. Here are the takeaways:

📈 Outperforming S&P 500 by ~11%
🧠 Low drawdown
⚖️ High risk-adjusted return
🔍 Very little correlation to S&P 500 (strategy is hunting idiosyncratic alpha, not riding the market beta wave)

#FinTech #Quant #AlgoTrading #Finance
April 24, 2025 at 2:19 PM
Sharing a simple helper method of mine to compute groups of consecutive integers in an array with Python.

pythonfintech.com/articles/con...

#Python #Programming
Finding groups of consecutive integers in an array with Python
Learn how to detect groups of consecutive integers in arrays using Python and NumPy
pythonfintech.com
April 21, 2025 at 1:40 PM
Here's the full article on my March/early-April fund performance:

pythonfintech.com/articles/cas...

(All metrics as of 8 April 2025, the day I drafted this article)

#fintech #quant #finance #algotrading #markets
April 14, 2025 at 1:32 PM
How it's going... 📈

• S&P 500: -15.27% 📉
• My Portfolio: +5.69% 📈
• Edge: +20.69% 🚀

#fintech #quant #finance #algotrading #markets
April 9, 2025 at 12:16 AM
🔥 New tutorial: Computing SMAs for trading with Python
Learn to:

- Calculate SMAs across multiple timeframes
- Visualize MAs with candlestick charts
- Identify golden/death crosses
- Apply to any ticker with clean code

👉 pythonfintech.com/articles/com...

#Python #Trading #AlgoTrading
Computing Simple Moving Averages (SMAs) for trading with Python and Pandas
Learn how to compute and visualize Simple Moving Averages (SMAs) using Python and Pandas to analyze price trends, spot signals, and improve trading decisions.
pythonfintech.com
April 7, 2025 at 5:35 PM
Plotting stock charts (OHLC) with matplotlib and mplfinance 📈

- Creating proper candlestick charts
- The anatomy of a candlestick
- Adding volume data for deeper market insights
- Focusing analysis on recent price movements

pythonfintech.com/articles/plo...

#Python #Trading #Quant #AlgoTrading
Plotting stock charts (OHLC) with matplotlib and mplfinance
Learn how to plot stock candlestick charts using Python with matplotlib and mplfinance for clearer market analysis and trading insights.
pythonfintech.com
March 31, 2025 at 5:38 PM
yfinance's default MultiIndex is a nightmare for multiple stocks

2 tickers = 10 columns
100 tickers = 500 columns 🙄

I prefer a row-based index
- Always 5 columns (OHLCV)
- Easier indicator calculations
- Debuggable without eyestrain

pythonfintech.com/articles/ret...

#Python #DataScience #Trading
Rethinking yfinance's default MultiIndex format
Learn how to reshape yfinance's default DataFrame with a row-based MultiIndex for easier and cleaner analysis.
pythonfintech.com
March 26, 2025 at 3:10 PM
After 3 years of silence, I'm writing code tutorials again!! 🎉

Just published my first tutorial since selling PyImageSearch—now it's Python for trading.

Learn how to download market data with yfinance:

pythonfintech.com/articles/how...

#Python #FinTech #Trading #Quant #FinTech
How to download market data with yfinance and Python
Learn how to download market data using Python and the yfinance API. This step-by-step guide covers fetching stock data, handling MultiIndex DataFrames, and visualizing trends.
pythonfintech.com
March 19, 2025 at 1:09 PM
Beat the S&P 500 for the second month in a row! 📈

• S&P 500: -1.35% 📉
• My Portfolio: +1.53% 📈
• Edge: +2.87% 🚀

How? I went to cash when others bought the dip.

Sometimes the best trade is no trade at all.

Full breakdown: 👇

pythonfintech.com/articles/feb...

#trading #fintech #quant #finance
pythonfintech.com
March 5, 2025 at 6:45 PM
Just published: "Beginner's Guide to Trading Strategies" 📊

From HFT (where humans need not apply) to Buffett-style investing, I break down which trading style matches different personalities.

My pick? Swing trading with Python automation

pythonfintech.com/articles/typ...

#quant #fintech #trading
Types of Trading: A Beginner's Guide to Trading Strategies
Discover the different types of trading strategies, from day trading to swing trading and investing. Find the approach that suits your personality and financial goals.
pythonfintech.com
February 27, 2025 at 3:26 PM
This one hit hard today.

#trading #market #quant #fintech
February 26, 2025 at 11:02 PM
$RSI showing a textbook bullish setup:

- Hammer candle off 50-day MA
- Oversold Stochastics
- Higher volume on advances
- Clear path to $18
- 225% earnings beat average
- 800% earnings growth expected Wednesday

Already up 1.87R, looking to add to position

#fintech #algotrading #quant #trading
February 21, 2025 at 7:42 AM
You know that moment when you’re absolutely certain you’re about to do something stupid, but you do it anyway? 🤦

Yeah, this is one of those stories.

Learn from my mistakes here:

👉 pythonfintech.com/articles/pro...

#fintech #algotrading #quant #trading #python
The problem with buying the dip (don't try to catch a falling knife)
I went against my trading plan and was stopped out of a trade. Let this article serve as a lesson in 'Don't catch falling knives.'
pythonfintech.com
February 17, 2025 at 3:48 AM
Updated my YTD trading metrics this morning:

- Starting Balance: $25,000
- Current Balance: $25,928.09
- % Change: 3.71%
- # of Trades: 2
- Win %: 50%
- Average Gain: 17.38%
- Average Loss: -2.94%
- Win/Loss Ratio: 5.9

#fintech #algotrading #quant #trading #python
February 14, 2025 at 2:14 AM
"Hey ChatGPT, generate an image of a mid-life crisis but replace the Porsche with a TradingView account and add some houseplants for emotional support."

#fintech #algotrading #quant #trading #python
February 13, 2025 at 10:11 AM
Beat the S&P 500 in January 📈🚀

The numbers (YTD):

- PythonFinTech: +3.37%
- S&P 500: +2.94%
- Outperformance: 0.43%

Full breakdown of my trades (including what worked and what definitely didn't) here:

👉 pythonfintech.com/articles/jan...

#fintech #algotrading #quant #trading #python
January 2025: Portfolio up 3.37% (even while trading from Taiwan)
My portfolio is up 3.37% YTD, outperforming the S&P 500 (even while trading from Taiwan). Here’s how I navigated market volatility and opened key trades including CLS, TT, and RSI.
pythonfintech.com
February 7, 2025 at 3:28 PM
One of my favorite quotes by the legendary Edward Thorpe on how to appropriately used leverage.

#FinTech #algo #quant #trading #market
February 5, 2025 at 5:19 AM
Taiwan is 👌👌👌
February 4, 2025 at 2:19 PM
I just opened a long position on CLS — why I'm bullish on Celestica Inc (and have already locked in 1.5R profit)

#NVDA and #AVGO took massive hits this past week.

Time to go shopping for oversold stocks:

👉 pythonfintech.com/articles/cel...

#Python #FinTech #algo #quant #trading #market
Just opened a long position on CLS — why I'm bullish on Celestica Inc.
When DeepSeek caused chip stocks to tank, I couldn't resist going long on CLS. Here's how I turned market panic into profit
pythonfintech.com
January 31, 2025 at 6:14 PM