首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

【手把手教你】搭建自己的量化分析数据库

数据是金融量化分析的重要基础,包括股票历史交易数据、上市公司基本面数据、宏观和行业数据等。随着信息流量的日益膨胀,学会获取、查询和加工数据信息变得越来越重要。对于鼓捣量化交易的人来说,怎么能说不会玩数据库呢?目前常用的开源(免费)数据库有MySQL、Postgresql 、Mongodb 和 SQLite (Python自带),在2018-2019年DB-Engines 排行榜上位居前十(见下图),可见其使用量和受欢迎程度较高。这几个数据库各有自己的特点和适用环境,关于该学习哪一个或如何学习网上有很多相关资料。本文主要为大家简单介绍如何使用 Python 操作 Postgresql 数据库(其他数据库类似),利用 psycopg2 和 sqlalchemy 实现 postgresql 与 pandas 的 dataframe 进行交互,一步步搭建自己的量化分析数据库。

02

flask中的所有第三方模块大集合

Flask-AppBuilder - Simple and rapid Application builder, includes detailed security, auto form generation, google charts and much more. FlaskEx - UNKNOWN gourd - easy server framework. add flask's style route to tcp/udp server. kit - Flask, Celery, SQLAlchemy integration framework. Flask-WTF - Simple integration of Flask and WTForms alchemist - A server architecture built on top of a solid foundation provided by flask, sqlalchemy, and various extensions. Flask-Mail - Flask extension for sending email sga - make it easier to use pyga for web develop. and make pyga compatible with flask and django. flask-peewee - Peewee integration for flask flask_util_js - flask's util in javascript. such as url_for etc. Flask-Security - Simple security for Flask apps Flask-RESTful - Simple framework for creating REST APIs Flask-SeaSurf - An updated CSRF extension for Flask. Flask-Cache - Adds cache support to your Flask application Flask-Admin - Simple and extensible admin interface framework for Flask Flask-Slither - A small library between MongoDB and JSON API endpoints Flask-Bootstrap - An extension that includes Bootstrap in your project, without any boilerplate code. Flask-Script - Scripting support for Flask Flask-GoogleLogin - Extends Flask-Login to use Google's OAuth2 authorization Flask-Exceptional - Adds Exceptional support to Flask applications Flask - A microframework based on Werkzeug, Jinja2 and good intentions INSTALLED: 0.10.1 (latest) clay-flask - Clay is a framework for building RESTful backend services using best practices. Flask-Classy - Class based views for Flask ShelfCMS - Enhancing flask microframework with beautiful admin and cms-like features

03

python 生成flask结构 常用

config=""" import os basedir = os.path.abspath(os.path.dirname(file)) class Config: SECRET_KEY ='hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True FLASKY_MAIL_SUBJECT_PREFIX = '[Flasktest]' FLASKY_MAIL_SENDER = '13285921108@163.com' FLASKY_ADMIN = 'huangat' @staticmethod def init_app(app): pass class DevelopmentConfig(Config): DEBUG = True MAIL_SERVER = 'mail.163.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get('13285921108') MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite') class TestingConfig(Config): TESTING = True SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data-test.sqlite') class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'data.sqlite')

03
领券