Skip to Content
Learn Algorithmic Trading
book

Learn Algorithmic Trading

by Sebastien Donadio, Sourav Ghosh
November 2019
Beginner content levelBeginner
394 pages
10h 31m
English
Packt Publishing
Content preview from Learn Algorithmic Trading

Volume limits

This risk metric measures the traded volume, which can also have an interval-based variant that measures volume per period. This is another risk measure that is meant to detect and prevent overtrading. For example, some of the catastrophic software implementation bugs we discussed in this chapter could've been prevented if they had a tight volume limit in place that warned operators about risk violations and possibly a volume limit that shut down trading strategies. Let's observe the traded volume for our strategy, which is shown in the following code:

traded_volume = 0for i in range(0, num_days):  if results['Trades'].iloc[i] != 0:    traded_volume += abs(results['Position'].iloc[i] - results['Position'].iloc[i-1])print('Total ...
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.
Start your free trial

You might also like

High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems

High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems

Irene Aldridge
Developing High-Frequency Trading Systems

Developing High-Frequency Trading Systems

Sebastien Donadio, Sourav Ghosh, Romain Rossier

Publisher Resources

ISBN: 9781789348347Supplemental Content