在《固定收益交易策略系统(三)》中就提到未来要摆弄收益率曲线。现在有了FinancePy这个利器,就可以用Nelson-Siegel尝试Monte Carlo模拟一下收益率曲线的变化情况。 One More Thing FinancePy为了应付错综复杂的日期计算,专门写了一个Date的Class。这个类的核心思想是把1900年以来的所有日期都换算成相对1900年的天数。这...
Scipy里有个改良版二分法叫做Brentq,但是实测还没@张神马钊 写的原始二分法快。 FinancePy用的原始牛顿法解YTM方程,初始尝试值固定为5%,正常情况够用,但遇到稍微极端一点的条件估计就完蛋了。
欢迎来到Pythonfor Finance教程系列的第7讲。 在之前的教程中,我们为标准普尔500强公司抓取了雅虎财经数据。 在本教程中,我们将把这些数据放在一个DataFrame中。 尽管掌握了所有数据,但我们可能想要一起处理数据。 为此,我们将把所有的股票数据集合在一起。 目前的每个股票文件都有:开盘价,最高价,最低价,收盘价,...
【FinancePy:Python金融库,专注于金融衍生品定价和风险管理,包括固定收益、股票、外汇和信贷衍生品等】’FinancePy - A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.' by Dominic O'Kane GitHub: ...
sudo python setup.py install --zmq=/usr/local 简单例子:hello world client #encoding=utf-8 # Hello World client in Python # Connects REQ socket to tcp://localhost:5555 # Sends "Hello" to server, expects "World" back # import zmq ...
这段时间在看量化策略,找到了一个比较不错的开源项目,但是yahoo金融的数据源一直没有找到,在网上找到了这篇文章,分享一下。文章最下方是原作者的微信号,有想打赏的自便~~ Yahoo! Finance提供国内外财经数据,PYTHON通常借助于pandas或者matplotlib进行数据读取。
这个时候py文件中的:__name__ == '__main__' 2,导入它 : 导入一个模块,也会运行一次这个py文件 当用这种方式运行py文件,这个py文件就称为:模块 这个时候py文件中的:__name__ == '模块名' import My_module __name__ = 'my_module '
pip install financepy To upgrade an existing installation type: pip install --upgrade financepy The notebooks folder contains over 60 example notebooks on how to use the library. There is also a pdf manual at the top of the project listing all of the functionality. Disclaimer This software is...
python manager.py create_db 5.导入db脚本 脚本在db目录下:finance.sql 6.启动redis服务端,默认端口:6379 ,如果设置密码的话请到config.py文件修改密码 SESSION_REDIS = redis.Redis(host='127.0.0.1', port='6379', password='', db=0) 7.启动项目,在项目根目录执行 ...
pip install financepy To upgrade an existing installation type: pip install --upgrade financepy The notebooks folder contains over 60 example notebooks on how to use the library. There is also a pdf manual at the top of the project listing all of the functionality. Disclaimer This software is...