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

The 2k factorial design

When designing experiments for backtesting, we can consider the use of 2k factorial design. Suppose we have two factors, A and B. Each factor behaves as a Boolean value, with values of either +1 or -1. A +1 value indicates a quantitatively high value, while -1 indicates a low value. This gives us a combination of 22 = 4 outcomes. For a 3-factor model, this gives us a combination of 23 = 8 outcomes. The following table illustrates an example with two factors with outcomes W, X, Y, and Z:

A

B

Replication I

Value

+1

+1

W

Value

+1

-1

X

Value

-1

+1

Y

Value

-1

-1

Z

Note that we are generating one replication of backtest to produce a set of outcomes. Performing additional ...

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