alpha-miner / finance-python Goto Github PK
View Code? Open in Web Editor NEWpython tools for Finance with the functionality of indicator calculation, business day calculation and so on.
License: MIT License
python tools for Finance with the functionality of indicator calculation, business day calculation and so on.
License: MIT License
使用DataAPI的时候找不到calculate_max_drawdown
import DataAPI
from PyFin.POpt.Calculators import calculate_max_drawdown
ImportError: cannot import name 'calculate_max_drawdown'
PyFin/Analysis/TechnicalAnalysis/StatefulTechnicalAnalysers.py
line 140
for k, v in t.value.items():
print(k, v)
运行该py会在140行报错: t.value是pd.Series type,没有.items方法。如下修改便可以通过
for k, v in t.value.to_dict().items() #以前的版本value是dict type?
实际上这两个应该可以合并
我看了一下doc/下的.md文件,还是有许多地方不清楚。
No module named 'PyFin.DateUtilities.Calendar',运行出错,不知是否与下面错误有关:
(c) 2012 Microsoft Corporation。保留所有权利。
C:\www\Finance-Python>py -3.5 setup.py build_ext --inplace --compiler=msvc
running build_ext
building 'PyFin.Analysis.SecurityValues' extension
error: Unable to find vcvarsall.bat
环境:
Mac OS
Python3.6
安装方式: 用pip 和 源码
我用了两种安装方式(pip 和 源码),但是两个都是同样问题
安装库的时候一直停留在这行:
PyFin/DateUtilities/Calendar.c:30589:5: warning: code will never be executed
[-Wunreachable-code]
PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length...
^~~~~~~~~~~~
`# -- coding: utf-8 --
from PyFin.Math.Accumulators.StatefulAccumulators import MovingCorrelationMatrix
from PyFin.Analysis.TechnicalAnalysis.StatefulTechnicalAnalysers import SecuritySingleValueHolder
`导入这个找不到
出现这个错误
from PyFin.Math.Accumulators.StatefulAccumulators import MovingCorrelationMatrix ImportError: cannot import name 'MovingCorrelationMatrix' from 'PyFin.Math.Accumulators.StatefulAccumulators' (I:\Miniconda\envs\mycode\lib\site-packages\finance_python-0.7.3-py3.7-win-amd64.egg\PyFin\Math\Accumulators\StatefulAccumulators.cp37-win_amd64.pyd)
我用人家的库,需要有Finance-Python这个库,怎么安装好了老是出这种导入不了的错误啊.
而且这个我去找那个py文件里面就是这个?
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__, 'StatefulAccumulators.cp37-win_amd64.pyd') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
我是不是什么没安装呀,我感觉这个库怪怪的一点都看不懂^_^!
现阶段,数学累积器的基类Accumulator
是一个非常重的类型定义。它的基础成员包含了许多不应该在它这一层就有定义的值,例如:window
, isFull
等。特别是,Accumulator
的dependency
成员可以是另一个Accumulator
,使得状态信息会非常复杂,同时也使得真正的CompoundedValueHolder
变得没有用武之地。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.