Reader small image

You're reading from  Mastering Python for Finance. - Second Edition

Product typeBook
Published inApr 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789346466
Edition2nd Edition
Languages
Right arrow
Author (1)
James Ma Weiming
James Ma Weiming
author image
James Ma Weiming

James Ma Weiming is a software engineer based in Singapore. His studies and research are focused on financial technology, machine learning, data sciences, and computational finance. James started his career in financial services working with treasury fixed income and foreign exchange products, and fund distribution. His interests in derivatives led him to Chicago, where he worked with veteran traders of the Chicago Board of Trade to devise high-frequency, low-latency strategies to game the market. He holds an MS degree in finance from Illinois Tech's Stuart School of Business in the United States and a bachelor's degree in computer engineering from Nanyang Technological University.
Read more about James Ma Weiming

Right arrow

Predicting returns with a cross-asset momentum model

In this section, we will create a cross-asset momentum model by having the prices of four diversified assets predict the returns of JPM on a daily basis for the year of 2018. The prior 1-month, 3-month, 6-month, and 1-year of lagged returns of the S&P 500 stock index, 10-year treasury bond index, US dollar index, and gold prices will be used for fitting our model. This gives us a total of 16 features. Let's begin by preparing our datasets for developing our models.

Preparing the independent variables

We will use Alpha Vantage again as our data provider. As this free service does not provide all of the dataset required for our investigation, we shall consider other...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Python for Finance. - Second Edition
Published in: Apr 2019Publisher: PacktISBN-13: 9781789346466

Author (1)

author image
James Ma Weiming

James Ma Weiming is a software engineer based in Singapore. His studies and research are focused on financial technology, machine learning, data sciences, and computational finance. James started his career in financial services working with treasury fixed income and foreign exchange products, and fund distribution. His interests in derivatives led him to Chicago, where he worked with veteran traders of the Chicago Board of Trade to devise high-frequency, low-latency strategies to game the market. He holds an MS degree in finance from Illinois Tech's Stuart School of Business in the United States and a bachelor's degree in computer engineering from Nanyang Technological University.
Read more about James Ma Weiming