1 Star 0 Fork 1

XZ/stock-analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
run_local.py 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
# This is a sample Python script.
from system.sys_logger import Logfactory
from service import stock_kdata_service, stock_industry_info_service, stock_service, stock_kdata_business
from service import baostock_login
def get_stock_k_data():
# 查询指定股票的时间范围K线段
stock_kdata_service.get_stock_k_data("000155.SZ", "2024-03-01", "2024-03-08")
def get_all_stock_info():
stock_industry_info_service.get_all_stock_info()
def get_all_stock(trade_date):
stock_service.get_all_stock(trade_date)
def select_all_stock():
stock_service.select_all_stock("")
def get_stock_kdata(stock_code, start_date, end_date):
stock_kdata_business.get_stock_kdata(stock_code, start_date, end_date)
if __name__ == '__main__':
Logfactory.logger.info('stock-analysis running now')
# demo.login_to_baostock()
# 000155.SZ
# db_utils.db_connect()
# stock_k_data_service.get_stock_k_data("000155.SZ", "2022-03-01", "2024-03-01")
# stock_k_data_service.get_stock_sh_kdata()
# 登录
baostock_login.login_baostock()
# get_all_stock_info()
# get_all_stock("2024-03-15")
# select_all_stock()
# get_stock_kdata('', '1990-01-01', '2024-03-15')
# 退出
baostock_login.logout_baostock()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xz.1992.prefect/stock-analysis.git
git@gitee.com:xz.1992.prefect/stock-analysis.git
xz.1992.prefect
stock-analysis
stock-analysis
master

搜索帮助