Chapter 21. A Small Asset Management Library in Python
Systematic asset management benefits from code that is organized as reusable building blocks rather than scattered notebook cells. This chapter turns the ideas from Chapter 17 through Chapter 20 into a small, self-contained asset management library in Python that works directly with the example EOD dataset and the holdings snapshot introduced earlier in this part. In doing so it also makes the code patterns from the earlier chapters concrete and reusable for your own projects.
This chapter develops a compact, class-based asset management library that you can
import from any script or notebook. It shows how to represent instruments, universes,
holdings, market data, signals, portfolios, backtests, and reports as Python objects
that build on pandas and numpy, mirroring the workflows from the previous asset
management chapters. The examples assume a working Python environment with numpy and
pandas, the EOD price dataset data/eod_data.csv ...
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.
Read now
Unlock full access