Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn Algorithmic Trading

You're reading from  Learn Algorithmic Trading

Product type Book
Published in Nov 2019
Publisher Packt
ISBN-13 9781789348347
Pages 394 pages
Edition 1st Edition
Languages
Authors (2):
Sebastien Donadio Sebastien Donadio
Profile icon Sebastien Donadio
Sourav Ghosh Sourav Ghosh
Profile icon Sourav Ghosh
View More author details

Table of Contents (16) Chapters

Title Page
Copyright and Credits About Packt Contributors Preface Algorithmic Trading Fundamentals Deciphering the Markets with Technical Analysis Predicting the Markets with Basic Machine Learning Classical Trading Strategies Driven by Human Intuition Sophisticated Algorithmic Strategies Managing the Risk of Algorithmic Strategies Building a Trading System in Python Connecting to Trading Exchanges Creating a Backtester in Python Adapting to Market Participants and Conditions Other Books You May Enjoy

Implementing advanced concepts, such as seasonality, in trading instruments

In trading, the price we receive is a collection of data points at constant time intervals called time series. They are time dependent and can have increasing or decreasing trends and seasonality trends, in other words, variations specific to a particular time frame. Like any other retail products, financial products follow trends and seasonality during different seasons. There are multiple seasonality effects: weekend, monthly, and holidays.

In this section, we will use the GOOG data from 2001 to 2018 to study price variations based on the months.

  1. We will write the code to regroup the data by months, calculate and return the monthly returns, and then compare these returns in a histogram. We will observe that GOOG has a higher return in October:
import pandas as pd
import matplotlib.pyplot as plt
from pandas_datareader...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}