investpy 项目教程

investpy 项目教程

investpyFinancial Data Extraction from Investing.com with Python项目地址:https://gitcode.com/gh_mirrors/in/investpy

项目的目录结构及介绍

investpy 项目的目录结构如下:

investpy/
├── examples/
│   ├── example1.ipynb
│   ├── example2.ipynb
│   └── ...
├── investpy/
│   ├── __init__.py
│   ├── stocks.py
│   ├── funds.py
│   ├── etfs.py
│   ├── indices.py
│   ├── currency_crosses.py
│   ├── bonds.py
│   ├── commodities.py
│   ├── certificates.py
│   ├── crypto.py
│   ├── news.py
│   ├── technical.py
│   ├── search.py
│   └── ...
├── tests/
│   ├── test_stocks.py
│   ├── test_funds.py
│   ├── test_etfs.py
│   ├── test_indices.py
│   ├── test_currency_crosses.py
│   ├── test_bonds.py
│   ├── test_commodities.py
│   ├── test_certificates.py
│   ├── test_crypto.py
│   ├── test_news.py
│   ├── test_technical.py
│   ├── test_search.py
│   └── ...
├── .gitignore
├── LICENSE
├── README.md
├── requirements.txt
└── setup.py

目录结构介绍

  • examples/:包含使用 investpy 的 Jupyter Notebook 示例。
  • investpy/:包含 investpy 的主要代码文件,每个文件对应一种金融产品的数据获取。
  • tests/:包含测试文件,用于测试 investpy 的各个功能。
  • .gitignore:Git 忽略文件。
  • LICENSE:项目许可证。
  • README.md:项目说明文档。
  • requirements.txt:项目依赖文件。
  • setup.py:项目安装文件。

项目的启动文件介绍

investpy 项目的启动文件是 investpy/__init__.py。这个文件初始化了整个包,并导入了所有必要的模块和函数,使得用户可以直接通过 import investpy 来使用 investpy 的所有功能。

项目的配置文件介绍

investpy 项目没有专门的配置文件。所有的配置和参数都在代码中直接设置和使用。用户在使用时,可以通过函数参数来传递所需的配置信息。

例如,获取股票历史数据的函数 get_stock_historical_data 的参数包括股票代码、国家、开始日期和结束日期等。

import investpy

df = investpy.get_stock_historical_data(stock='AAPL', country='United States', from_date='01/01/2020', to_date='01/01/2021')

通过这种方式,用户可以根据需要灵活地配置和使用 investpy 的功能。

investpyFinancial Data Extraction from Investing.com with Python项目地址:https://gitcode.com/gh_mirrors/in/investpy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

卢千怡

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值