Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Algorithmic Short Selling with Python
  • Table Of Contents Toc
Algorithmic Short Selling with Python

Algorithmic Short Selling with Python - Second Edition

By : Laurent Bernut
close
close
Algorithmic Short Selling with Python

Algorithmic Short Selling with Python

By: Laurent Bernut

Overview of this book

Algorithmic Short Selling with Python, Second Edition is a practical guide to building, testing, and managing systematic short-selling strategies in today's markets. Structured around the core challenges every short seller faces, the book provides a framework for continuously generating long/short ideas, identifying bullish/bearish market regimes, detecting sector rotation ahead of consensus, constructing robust long/short portfolios, and managing the unique risks of the short side. Through real-world examples and working Python code based on S&P 500 data, readers learn how to develop quantitative strategies that address position sizing, crowded trades, portfolio exposures, and capital allocation across changing market conditions. The book also explores advanced topics such as relative strength analysis, fractals, convexity, long/short portfolio management, asset allocation, and the use of AI-powered trading journals to uncover the behavioral patterns that influence trading decisions. Every concept is supported by implementation, bridging the gap between theory and execution. Expanding on the first edition, this updated version transforms ideas into fully coded solutions, providing readers with the tools to design, evaluate, and deploy systematic short-selling strategies with confidence, discipline, and consistency.
Table of Contents (16 chapters)
close
close
Lock Free Chapter
1
Part 1: The Short Selling Game
5
Part 2: The Outer Game: The Trading Edge
10
Part 3: The Long/Short Game: Portfolio Construction
15
Index

Importing libraries

For this chapter and the rest of the book, we will be working with a few more libraries than usual. If they are not installed on your machine, you know the drill:

pip install –upgrade

So, please remember to import them first:

# Import Libraries
import pandas as pd
import numpy as np
import arcticdb as adb
from arcticdb import LibraryOptions
from dateutil.relativedelta import relativedelta
import requests
from io import StringIO
import yfinance as yf
%matplotlib inline
import matplotlib.pyplot as plt
import mplfinance as mpf

import statsmodels.api as sm
from statsmodels.tsa.stattools import coint, adfuller
from statsmodels.tools.tools import add_constant
from statsmodels.regression.linear_model import OLS

We have imported the libraries we will be working with. Now, let's define this elusive concept called trading edge.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Algorithmic Short Selling with Python
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon