# A MATLAB and Python implementation of Finite Difference method for Heat and Black-Scholes Partial Differential Equation
These code implements the numerical method of Finite Difference method to solve Heat PDE and Black-Scholes PDE. Specificly, the code for Black-Scholes PDE aims to price vanilla options such as European and American call and put.
The algorithm is implemented in Python and MATLAB, and the Python code is in Object Oriented discipline and used Numpy to handle matrices. Also, both Python and MATLAB code allow users to write their own function to put into the code to set boundary conditions for the Finite difference grid. The code provided sample user-generated function for setting boundary condition for both Python code and MATLAB code. The Python objects also implemented special methods in Python classes so as to make it sliceable (`__getitem__()`)and printable(`__repr__()`)
Please find detailed mathematical explanation in the README.pdf file as Github does not support Latex formulas.
Author: Ruinan Lu
*References:*
*[1]Brandimarte P. Numerical methods in finance and economics: a MATLAB-based introduction[M]. John Wiley & Sons, 2013.*
*[2]Seydel R, Seydel R. Tools for computational finance[M]. Berlin: Springer, 2006.*
*[3]Ramalho L. Fluent python: Clear, concise, and effective programming[M]. " O'Reilly Media, Inc.", 2015.*
没有合适的资源?快使用搜索试试~ 我知道了~
Matlab求解偏微分方程的代码-Finite-Difference:Heat和Black-Scholes偏微分方程的有限差分法...

共22个文件
m:14个
py:2个
ds_store:2个

需积分: 49 207 浏览量
2021-06-01
18:27:10
上传
评论
收藏 1.55MB ZIP 举报
Matlab 求解偏微分的代码Heat 和 Black-Scholes 偏微分方程的有限差分法的 MATLAB 和 Python 实现 这些代码实现了有限差分法的数值方法来求解 Heat PDE 和 Black-Scholes PDE。 具体而言,Black-Scholes PDE 的代码旨在为普通期权定价,例如欧洲和美国的看涨和看跌期权。 该算法在 Python 和 MATLAB 中实现,Python 代码属于面向对象学科,使用 Numpy 处理矩阵。 此外,Python 和 MATLAB 代码都允许用户编写自己的函数,将其放入代码中以设置有限差分网格的边界条件。 该代码提供了示例用户生成函数,用于为 Python 代码和 MATLAB 代码设置边界条件。 Python 对象还在 Python 类中实现了特殊方法,以使其可切片( __getitem__() )和可打印( __repr__() ) 请在 README.pdf 文件中找到详细的数学解释,因为 Github 不支持 Latex 公式。 作者:鲁瑞南 参考: [1]Brandimarte P. 金融经济学中的数值方法:基于M
资源详情
资源评论
资源推荐
收起资源包目录


























共 22 条
- 1






















weixin_38642349
- 粉丝: 2
- 资源: 897

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制

评论0