python中的金融技术分析

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4406481/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 15:35:42  来源:igfitidea点击:

Financial technical analysis in python

pythonfinance

提问by Finger twist

Do you know if there is any financial technical analysis module available for python ? Need to calculate various indicators such as RSI, EMA, DEMA etc for a project

你知道python有没有可用的金融技术分析模块?需要为一个项目计算各种指标,如 RSI、EMA、DEMA 等

采纳答案by arboc7

Here are a few thoughts... I have only used Numpy, Scipy, and Matplotlib for financial calculations.

这里有一些想法……我只使用 Numpy、Scipy 和 Matplotlib 进行财务计算。

  • py-fi- very basic financial functions
  • fin2py- financial tools
  • Numpy/Scipy- covers all of the statistics basics
  • Matplotlib- plotting financial functions
  • RPy- a Python interface to R allowing use of R libraries
  • ystockquote- Python API for Yahoo! Stock Data
  • QuantLib- Open source library (supposedly has Python Bindings)
  • PyFinancial- Docs in Spanish
  • PyMacLab- "Series of classes useful for conducting research in dynamic macroeconomics"
  • TSDB- for storing large volumes of time series data
  • PyVol- volatility estimation of financial time series
  • py-fi- 非常基本的财务功能
  • fin2py- 金融工具
  • Numpy/Scipy- 涵盖所有统计基础知识
  • Matplotlib- 绘制财务函数
  • RPy- R 的 Python 接口,允许使用 R 库
  • ystockquote- 雅虎的 Python API!股票数据
  • QuantLib- 开源库(据说有 Python 绑定)
  • PyFinancial- 西班牙语文档
  • PyMacLab- “对进行动态宏观经济学研究有用的系列课程”
  • TSDB- 用于存储大量时间序列数据
  • PyVol- 金融时间序列的波动性估计

回答by christo

TA-Lib- Library of indicators. How to compile for Python

TA-Lib- 指标库。 如何为 Python 编译

回答by cwoebker

There is also a Computational Finnance Courseon Coursera.org.

Coursera.org上还有一个计算金融课程

They use a Python Open Source Library called QSTK (QuantSoftware ToolKit). They have a bunch of tutorialson the wiki page and you can always take the course if you want to learn more.

他们使用名为QSTK(QuantSoftware ToolKit)的 Python 开源库。他们在 wiki 页面上有很多教程,如果您想了解更多信息,可以随时参加该课程。

For convenience I copied the description from the wiki page below:

为方便起见,我从下面的 wiki 页面复制了描述:

QSToolKit (QSTK) is a Python-based open source software framework designed to support portfolio construction and management. We are building the QSToolKit primarily for finance students, computing students, and quantitative analysts with programming experience. You should not expect to use it as a desktop app trading platform. Instead, think of it as a software infrastructure to support a workflow of modeling, testing and trading.

Scroll through the Gallery to see the sorts of things you can do easily with QSTK.
If you are in a hurry, you can skip to the QSToolKit_Installation_Guide. 

Key components of QSTK are:

- Data: A data access package that enables fast reading of 
  historical data (qstkutil.DataAccess).
- Processing tools: Uses pandas, a Python package designed for time series 
  evaluation of equity data.
- Portfolio optimization: Using the CVXOPT library.
- Event studies: An efficient event analyzer, Event_Profiler.
- Simulation: A simple backtester, quicksim, 
  that includes transaction cost modeling.

QSToolKit (QSTK) 是一个基于 Python 的开源软件框架,旨在支持投资组合的构建和管理。我们主要为金融专业的学生、计算机专业的学生和具有编程经验的定量分析师构建 QSToolKit。您不应期望将其用作桌面应用程序交易平台。相反,将其视为支持建模、测试和交易工作流的软件基础架构。

Scroll through the Gallery to see the sorts of things you can do easily with QSTK.
If you are in a hurry, you can skip to the QSToolKit_Installation_Guide. 

QSTK 的关键组件是:

- Data: A data access package that enables fast reading of 
  historical data (qstkutil.DataAccess).
- Processing tools: Uses pandas, a Python package designed for time series 
  evaluation of equity data.
- Portfolio optimization: Using the CVXOPT library.
- Event studies: An efficient event analyzer, Event_Profiler.
- Simulation: A simple backtester, quicksim, 
  that includes transaction cost modeling.

回答by Tom

You might find this repository of technical indicators useful. The library works similarly to the famous ta-lib library, and contains indicators that were not implemented in talib

您可能会发现这个技术指标库很有用。该库的工作原理与著名的 ta-lib 库类似,并包含未在 talib 中实现的指标

talibextensions

标签扩展

For example, you can use the Highest high, lowest low indicator, by sending high and low vectors, plus number of periods, in the following way: (Extracted from the test in the repository)

例如,您可以通过以下方式发送最高和最低向量以及周期数来使用最高最高、最低最低指标:(从存储库中的测试中提取)

    from indicators import TalibExtension
    hhllMatrix = TalibExtension.HHLL(self.high, self.low, 5);