Python for Finance in Practice cover

Python for Finance in Practice

Rating 3.2
Word count
250K words
Chapters
1
Series
Asynchronous Books: Financial Technology Series
ISBN
9787115457073

Tags

Summary

Python for Finance in Practice, written by Yuxing Yan, who holds a PhD in finance from McGill University, is an entry-level, hands-on title in the Asynchronous Community’s Financial Technology series. The book has 12 chapters. It begins with installing Python, the differences between versions, and three ways to launch it, using many simple examples to help readers understand basic concepts such as variables, functions, indentation, modules, and data types. It then moves into financial settings: writing a financial calculator in Python to handle present value, annuities, net present value, internal rate of return, and interest rate conversion; using NumPy and SciPy for matrix operations, linear regression, and the capital asset pricing model; using matplotlib to plot compound interest, the DuPont identity, portfolio risk, and candlestick charts; and using pandas and statsmodels for time series, computing various returns, performing t-tests and F-tests, and demonstrating strategies such as the Fama-French three-factor model, bid-ask spreads and liquidity measures, value at risk, and the efficient portfolio frontier. The second half focuses on derivatives: the Black-Scholes-Merton option pricing model, put-call parity, the Greeks, binomial-tree pricing, loops and solving for implied volatility, Monte Carlo simulation for pricing plain vanilla and exotic options, and finally volatility and ARCH and GARCH models. Each chapter includes a summary and exercises and comes with data sets, making the book suitable for readers who want to learn finance while typing code.

Editor's review

市面上的Python金融书大致分两类:一类是“Python教程”,金融只是举例;另一类直接给量化策略,门槛偏高。本书属于前者,却比一般教程更贴近金融专业的思维习惯:它不急着讲机器学习,先教你把Excel里的金融计算搬进Python,从编写一个功能完整的金融计算器起步,再一步步走到期权定价与波动率模型。作者严玉星在八所大学讲授金融建模、期权与期货、定量财务分析等课程,因此书中处处保留课堂痕迹:错误提示怎么读、变量为什么要取有意义的名字、怎样调试自己的函数、怎样把代码组织成可复用的模块,这些细节对自学者非常受用。全书12章结构清晰,每章都有小结与练习题,配套数据集让读者能真正跑通代码。对想做量化或金融数据岗的读者来说,这是一块又实用又动手性强的入门砖。

Who it's for

A good fit for

  • 金融、会计、统计等专业的高校学生,希望用Python替代Excel做金融计算
  • 有一定编程基础、想转行进入金融科技或量化分析领域的开发者
  • 金融机构研究员、风控或投研人员,需要快速上手脚本化建模
  • 准备学习期权定价、GARCH等模型但缺少编程实现路径的读者

Not a good fit for

  • 完全零编程基础的读者,书中默认读者能安装并运行Python
  • 已经有较深量化经验、想找完整策略框架和实盘系统的读者
  • 只想学Python通用语法、对金融场景没有兴趣的读者

Reading tips

  1. 先按第1—6章顺序敲一遍示例代码,把环境装好、模块调通,别跳过安装和调试部分
  2. 读期权相关章节时随手准备一份期权数据,边看公式边用代码复现,理解希腊字母与隐含波动的含义
  3. 书中的数据下载示例涉及雅虎财经等接口,接口可能已变化,遇到失败先换数据源再继续学习
  4. 学完后回头看自己工作中用Excel完成的测算,尝试用pandas重写,形成个人的金融工具库

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Asynchronous Books: Financial Technology Series

FAQ

这本书需要什么基础才能读?
书中从Python安装与基础语法讲起,但节奏偏快,最好具备最基本的编程概念(变量、函数、循环)。金融方面会涉及现值、期权、投资组合等概念,作者会做必要解释,金融专业读者理解起来更顺畅。
书中代码和数据现在还能用吗?
主体语法与NumPy、pandas、matplotlib的用法仍然通用,但书中部分示例依赖雅虎财经等在线数据接口,细节可能已发生变化。建议用本地数据集或社区维护的替代库(如yfinance)替换数据获取部分。
和《Python金融大数据分析》有什么区别?
《Python金融大数据分析》(Yves Hilpisch著)体量更大、更偏向衍生品定价与数值方法的系统展开;本书篇幅约320页,更接近一本带练习题的课堂讲义,适合作为第一本把Python和金融连起来的入门读物。
中文版和英文原版有什么差异?
中文版据人民邮电出版社2017年版引进,译者为张少军与严玉星;英文原版为Packt出版的Python for Finance第一版,并且原书后续已更新至第二版,涉及更新的Python生态与库版本,重视时效的读者可对照阅读。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category