hikyuu2/docs/source/base/constant.rst
2019-05-27 23:18:59 +08:00

83 lines
1.9 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. py:currentmodule:: hikyuu
.. highlightlang:: python
全局变量与常量定义
===================
全局变量
---------
.. note:: 以下全局变量仅在 hikyuu 交互式工具中存在hikyuu库中并无定义。
.. py:data:: sm
:py:class:`StockManager` 的实例
.. py:data:: blocka
:py:class:`Block` 实例包含全部A股
.. py:data:: blocksh
:py:class:`Block` 实例,包含全部沪市股票
.. py:data:: blocksz
:py:class:`Block` 实例,包含全部深市股票
.. py:data:: blockg
:py:class:`Block` 实例,包含全部创业板股票
Null 值及证券类别
-------------------
.. py:data:: constant
全局常量, :py:class:`Constant` 的实例,用于判断相关的 null 值及股票类型,如:
::
a = Datetime(201601010000)
if (a == constant.null_datetime ):
print(True)
.. py:class:: Constant
.. py:attribute:: null_datetime 无效Datetime
.. py:attribute:: inf
.. py:attribute:: nan
.. py:attribute:: null_price 同 nan
.. py:attribute:: null_int 无效int
.. py:attribute:: null_size 无效size
.. py:attribute:: null_int64 无效int64
.. py:attribute:: pickle_support 是否支持 pickle
.. py:attribute:: STOCKTYPE_BLOCK 股票类型-板块
.. py:attribute:: STOCKTYPE_A 股票类型-A股
.. py:attribute:: STOCKTYPE_INDEX 股票类型-指数
.. py:attribute:: STOCKTYPE_B 股票类型-B股
.. py:attribute:: STOCKTYPE_FUND 股票类型-基金
.. py:attribute:: STOCKTYPE_ETF 股票类型-ETF
.. py:attribute:: STOCKTYPE_ND 股票类型-国债
.. py:attribute:: STOCKTYPE_BOND 股票类型-其他债券
.. py:attribute:: STOCKTYPE_GEM 股票类型-创业板
.. py:attribute:: STOCKTYPE_TMP 股票类型-临时CSV