Skip to Content
Algorithmic Short Selling With Python - Second Edition
book

Algorithmic Short Selling With Python - Second Edition

by Laurent Bernut
June 2026
Beginner to intermediate
315 pages
7h 26m
English
Packt Publishing

Overview

Master algorithmic short selling with Python by learning practical strategies, coding trading signals, and applying robust risk management to generate alpha in any market condition.

Key Features

  • Build and test algorithmic short-selling strategies in Python
  • Apply advanced trade execution, position sizing, and risk controls
  • Harness regime detection, pairs trading, and portfolio management
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Short selling is often seen as one of the toughest sides of trading, yet it offers unique opportunities for alpha generation and risk control. Algorithmic Short Selling with Python – 2nd Edition is a complete guide to mastering systematic short-side trading, combining financial theory, behavioral insights, and hands-on Python code.

You’ll begin by challenging common myths about short selling and understanding its unique psychology and risks. From there, the book introduces algorithmic strategies including relative long/short, regime detection, pairs trading, and trading edge formulas. You’ll learn how to code and test these strategies in Python, while also mastering stop-loss science, exit optimization, and volatility-based position sizing.

Later chapters cover portfolio construction, sector and factor exposures, mandate design, and execution techniques, ensuring your strategies integrate seamlessly into broader investment workflows. With coverage extending to equities, derivatives, and even Bitcoin shorts, this edition provides a practical, end-to-end framework for systematic short selling.

By the end, you’ll be able to design, test, and implement robust short-selling strategies, manage risk effectively, and enhance portfolio performance across market conditions.

What you will learn

  • Understand the unique psychology and risks of short-side trading
  • Code long, short and pairs trading strategies in Python
  • Apply regime detection methods to define market states
  • Master stop-loss and exit techniques to protect and compound returns
  • Implement volatility-based sizing and advanced position management
  • Evaluate risk with metrics like Sharpe, Grit, and robustness scores
  • Construct long/short portfolios with exposure and mandate design
  • Extend strategies to Bitcoin and global cross-asset short selling

Who this book is for

This book is for quantitative traders, portfolio managers, algorithmic trading developers, and advanced retail traders who want to master the short side using Python. A working knowledge of Python and basic trading concepts is assumed. Readers will gain not just coding skills, but also the strategic and risk management frameworks needed to build profitable short strategies.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Machine Learning with Python Cookbook, 2nd Edition

Machine Learning with Python Cookbook, 2nd Edition

Kyle Gallatin, Chris Albon
Deep Learning with Python, Third Edition

Deep Learning with Python, Third Edition

Matthew Watson, Francois Chollet

Publisher Resources

ISBN: 9781806025930