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 Mastering Pandas for Finance
  • Table Of Contents Toc
Mastering Pandas for Finance

Mastering Pandas for Finance

By : Michael Heydt
3.7 (6)
close
close
Mastering Pandas for Finance

Mastering Pandas for Finance

3.7 (6)
By: Michael Heydt

Overview of this book

If you are interested in quantitative finance, financial modeling, and trading, or simply want to learn how Python and pandas can be applied to finance, then this book is ideal for you. Some knowledge of Python and pandas is assumed. Interest in financial concepts is helpful, but no prior knowledge is expected.
Table of Contents (11 chapters)
close
close
10
Index

Generating order signals


In the trading strategy that we will define, we want to be able to decide whether there is enough movement in the volume of searches on debt to go and execute a trade in the market that will make us a profit. The paper defines this threshold as though there is a higher search volume at the end of a Google Trends week than in the previous three-week average of the search volume, and then we will go short. If there is a decline, we will go long the following week.

The first thing we will need to do is reorganize our data by moving the GoogleWE dates into the index. We are going to make our decisions based upon these week-ending dates and use the Close price in an associated record as the basis for our trade as that price represents the Close price at the beginning of the next week. We also drop the DJIAClose column as it is redundant with Close:

In [18]:
   base = final.reset_index().set_index('GoogleWE')
   base.drop(['DJIAClose'], inplace=True, axis=1)
   base[:3...
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.
Mastering Pandas for Finance
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options 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