Skip to Content
Mastering Python for Finance - Second Edition
book

Mastering Python for Finance - Second Edition

by James Ma Weiming
April 2019
Intermediate to advanced
426 pages
11h 13m
English
Packt Publishing
Content preview from Mastering Python for Finance - Second Edition

Feature engineering

A feature is an attribute of the data that defines its characteristic. By using domain knowledge of the data, features can be created to help machine learning algorithms increase their predictive performance. This can be as simple as grouping or bucketing related parts of the existing data to form defining features. Even removing unwanted features is also feature engineering.

As an example, suppose we have the following time series price data that looks like this:

No.

Date and Time

Price

Price Action

1

2019-01-02 09:00:01

55.00

UP

2

2019-01-02 10:03:42

45.00

DOWN

3

2019-01-02 10:31:23

48.00

UP

4

2019-01-02 11:14:02

33.00

DOWN

Grouping the time series into buckets ...

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

Python for Finance - Second Edition

Python for Finance - Second Edition

Yuxing Yan
Python for Finance

Python for Finance

Yves Hilpisch

Publisher Resources

ISBN: 9781789346466Supplemental Content