python - 如何从 github 安装模块?
问题描述
import sys
sys.path.append('05_com')
from BSM_option_valuation import BSM_call_value
def d1f(St, K, t, T, r, sigma):
''' Black-Scholes-Merton d1 function.
Parameters see e.g. BSM_call_value function. '''
d1 = (math.log(St / K) + (r + 0.5 * sigma ** 2)
* (T - t)) / (sigma * math.sqrt(T - t))
return d1
我正在学习绘制 BSM 图(Black-Scholes-Merton 模型),但是,我不太确定如何安装在 github 中上传的模块。请寻求任何建议。
解决方案
进入那个特定的 Github 存储库。点击选项“代码”,然后复制网址。之后来到你的终端并写
git clone <copied url>
推荐阅读
- invoice - 如何从 XTRF 客户发票 API 获取详细信息(单位、数量、价格)?
- python - 使 flake8 区分未定义函数和星形导入
- c# - C# OutlookCalendar 插件 - 如何检测重复系列中的会议删除
- javascript - 如何让元素在页面上平滑滑动?
- php - 使用 PHP 从(.xls 或 .xlsx)复制图表
- node.js - 在 Express.js 中,我们如何让 res.send 等待从数据库中获取数据
- r - 强制离散时间序列单调递减
- python - 计算交换次数以按降序对列表进行排序
- c# - Visual Studio 用于通过 msbuild 命令行进行增量构建的构建目标
- asp.net-mvc - Automapper - 忽略仅存在于 ViewModel 中的属性