2024年10月16日

一个存货模型价格模拟

摘要: import numpy as np import math def PriceProcess(sigma,dt, s0=100, total_time=1): prices = s0* (1 + np.cumsum(sigma * np.sqrt(dt) * np.random.choice([1 阅读全文

posted @ 2024-10-16 17:20 金凯旋 阅读(16) 评论(0) 推荐(0)

一个简单的价格模拟工具

摘要: 模拟交易价格对于量化分析建模很重要,下面是一个简单的价格模拟工具: 首先, 要找到标的的价格波动属性,而标的的波动每天都不一样,下面这个代码可以直观地绘制出价格波动的变化情况: def calculate_volatility(): # 取日线数据 data = get_data(symbol="r 阅读全文

posted @ 2024-10-16 14:42 金凯旋 阅读(107) 评论(0) 推荐(0)

导航