百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

Monte-Carlo-Option-Pricing-Simulator

> 编程语言
开源

蒙特卡洛选择定价模拟器 这是关于什么的项目? 这个项目是一个专业模拟器,用于定价欧洲呼叫和Put..

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

蒙特卡洛选择定价模拟器 这是关于什么的项目? 这个项目是一个专业模拟器,用于定价欧洲呼叫和Put..

Monte Carlo Option Pricing Simulator

What is this project about?

This project is a professional simulator for pricing European Call and Put options using Monte Carlo methods. It simulates stock price paths with Geometric Brownian Motion, compares Monte Carlo prices to Black-Scholes analytical prices, and visualizes the results with animated plots. Designed for finance, education, and research.

Developer / Creator

tubakhxn

Features

  • Simulate stock price paths using GBM
  • Price European Call and Put options via Monte Carlo
  • Calculate Black-Scholes analytical price
  • Visualize animated stock price paths and option prices
  • Clean, professional dark theme

Project Structure

  • main.py: Entry point, handles simulation, visualization, and comparison
  • utils.py: Contains GBM simulation and pricing functions
  • requirements.txt: Python dependencies
  • README.md: Project documentation and formulas

Formulas

Geometric Brownian Motion (GBM)

Stock price evolution: $$ S_t = S_0 \exp\left((r - 0.5\sigma^2)t + \sigma W_t\right) $$ Where:

  • $S_t$: Stock price at time $t$
  • $S_0$: Initial stock price
  • $r$: Risk-free rate
  • $\sigma$: Volatility
  • $W_t$: Wiener process (Brownian motion)

Black-Scholes Formula

European Call: $$ C = S_0 N(d_1) - K e^{-rt} N(d_2) $$ European Put: $$ P = K e^{-rt} N(-d_2) - S_0 N(-d_1) $$ Where: $$ d_1 = \frac{\ln(S_0/K) + (r + 0.5\sigma^2)t}{\sigma\sqrt{t}} $$ $$ d_2 = d_1 - \sigma\sqrt{t} $$

  • $N(\cdot)$: Cumulative distribution function of the standard normal distribution
  • $K$: Strike price
  • $t$: Time to maturity

Usage

  1. Install dependencies:
    bash
    pip install -r requirements.txt
  2. Run the simulator:
    bash
    python main.py

Parameters

  • Strike price
  • Volatility
  • Risk-free rate
  • Time to maturity

All parameters are labeled and visualized in the plot.

License

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言