/* Generated by Cython 3.0.11 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "tbstock.tradeStrategy.stockStrategy",
        "sources": [
            "./tbstock/tradeStrategy/stockStrategy.py"
        ]
    },
    "module_name": "tbstock.tradeStrategy.stockStrategy"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x03000BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 0
  #endif
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
    if (!empty_bytes) return NULL;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__tbstock__tradeStrategy__stockStrategy
#define __PYX_HAVE_API__tbstock__tradeStrategy__stockStrategy
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = (char) c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "tbstock/tradeStrategy/stockStrategy.py",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio;
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults {
  PyObject *__pyx_arg_strategy_date;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_new_thr;
};
struct __pyx_defaults2 {
  PyObject *__pyx_arg_new_thr;
};

/* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};


/* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket {
  PyObject_HEAD
  PyObject *__pyx_v_select_str;
};


/* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};


/* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};


/* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty {
  PyObject_HEAD
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_stock_code;
};


/* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};


/* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio {
  PyObject_HEAD
  PyObject *__pyx_v_getOneWaveRatio;
  PyObject *__pyx_v_max_depth;
  PyObject *__pyx_v_stock_code;
};


/* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */
struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable {
  PyObject_HEAD
  PyObject *__pyx_v_self;
};

/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
    #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    #define __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
    #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
                                                   to have the same reference counting */
    #define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PyIntFromDouble.proto */
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value);
#else
#define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value)
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
#endif

/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
    (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(__Pyx_PyLong_IsNonNeg(x)) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* RaiseClosureNameError.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    typesModule = PyImport_ImportModule("types");
    if (!typesModule) return NULL;
    methodType = PyObject_GetAttrString(typesModule, "MethodType");
    Py_DECREF(typesModule);
    if (!methodType) return NULL;
    result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    Py_DECREF(methodType);
    return result;
}
#elif PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* py_dict_items.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* py_dict_keys.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* RaiseUnboundLocalError.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_SubtractObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* bytes_tailmatch.proto */
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
                                         Py_ssize_t start, Py_ssize_t end, int direction);
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
                                   Py_ssize_t start, Py_ssize_t end, int direction);

/* unicode_tailmatch.proto */
static int __Pyx_PyUnicode_Tailmatch(
    PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction);

/* str_tailmatch.proto */
static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start,
                                               Py_ssize_t end, int direction);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CStringEquals.proto */
static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);

/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

/* #### Code section: module_declarations ### */

/* Module declarations from "tbstock.tradeStrategy.stockStrategy" */
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "tbstock.tradeStrategy.stockStrategy"
extern int __pyx_module_is_main_tbstock__tradeStrategy__stockStrategy;
int __pyx_module_is_main_tbstock__tradeStrategy__stockStrategy = 0;

/* Implementation of "tbstock.tradeStrategy.stockStrategy" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_super;
/* #### Code section: string_decls ### */
static const char __pyx_k_0[] = "0";
static const char __pyx_k_1[] = "1";
static const char __pyx_k_2[] = "{:.2%}";
static const char __pyx_k_3[] = "3%";
static const char __pyx_k_4[] = "4";
static const char __pyx_k_6[] = "\346\266\250\350\267\214\345\211\2156\345\220\215\350\277\233\350\241\214\347\273\237\350\256\241";
static const char __pyx_k_8[] = "8";
static const char __pyx_k_D[] = "D";
static const char __pyx_k_J[] = "J";
static const char __pyx_k_K[] = "K";
static const char __pyx_k_g[] = "g";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_s[] = " s.";
static const char __pyx_k_x[] = "-\350\277\236\347\273\255x\345\244\251";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_00[] = "00";
static const char __pyx_k_10[] = "10%";
static const char __pyx_k_14[] = "14%";
static const char __pyx_k_2f[] = "{:.2f}";
static const char __pyx_k_30[] = "30";
static const char __pyx_k_60[] = "60%";
static const char __pyx_k_68[] = "68";
static const char __pyx_k_71[] = "71%";
static const char __pyx_k_82[] = "82%";
static const char __pyx_k_97[] = "97%";
static const char __pyx_k_AI[] = "AI\350\212\257\347\211\207";
static const char __pyx_k_DI[] = "+DI";
static const char __pyx_k_MA[] = "MA";
static const char __pyx_k_NA[] = "NA";
static const char __pyx_k_ST[] = "ST";
static const char __pyx_k_T3[] = "T3";
static const char __pyx_k_WR[] = "WR";
static const char __pyx_k__2[] = "\345\257\274\345\205\245";
static const char __pyx_k__3[] = "\344\270\215\346\210\220\345\212\237.";
static const char __pyx_k__4[] = "\345\220\215\347\247\260";
static const char __pyx_k__5[] = "\344\273\243\347\240\201";
static const char __pyx_k__6[] = "\346\266\250\345\201\234\346\254\241\346\225\260";
static const char __pyx_k__7[] = "\345\271\263\345\235\207\346\214\257\345\271\205";
static const char __pyx_k__9[] = "-\350\277\207\345\216\273";
static const char __pyx_k_ax[] = "ax";
static const char __pyx_k_by[] = "by";
static const char __pyx_k_cm[] = "cm";
static const char __pyx_k_df[] = "df";
static const char __pyx_k_dt[] = "dt";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_ha[] = "ha";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_in[] = " ['\346\266\250\345\201\234'] in ";
static const char __pyx_k_ma[] = "ma_";
static const char __pyx_k_or[] = "or_";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_pd[] = "pd";
static const char __pyx_k_rc[] = "rc";
static const char __pyx_k_to[] = " to ";
static const char __pyx_k_up[] = "up";
static const char __pyx_k_0_1[] = "\344\272\244\346\230\223\346\227\245\344\270\255\347\232\204\344\275\215\347\275\256,=0\350\241\250\347\244\272\344\272\272\346\225\260\346\234\200\345\260\221,=1\350\241\250\347\244\272\344\272\272\346\225\260\346\234\200\345\244\232";
static const char __pyx_k_1_0[] = "[-1,0)";
static const char __pyx_k_1_2[] = "1%";
static const char __pyx_k_1_5[] = "(1,5]";
static const char __pyx_k_5_1[] = "[-5,-1)";
static const char __pyx_k_ADX[] = "ADX";
static const char __pyx_k_Bar[] = "Bar";
static const char __pyx_k_CRO[] = "CRO";
static const char __pyx_k_DEA[] = "DEA";
static const char __pyx_k_DIF[] = "DIF";
static const char __pyx_k_DMI[] = "DMI";
static const char __pyx_k_EMA[] = "EMA";
static const char __pyx_k_KDJ[] = "KDJ";
static const char __pyx_k_MA5[] = "MA5";
static const char __pyx_k_OBV[] = "OBV";
static const char __pyx_k_RSI[] = "RSI";
static const char __pyx_k_SMA[] = "SMA";
static const char __pyx_k_The[] = "The ";
static const char __pyx_k_WMA[] = "WMA";
static const char __pyx_k__10[] = "\344\270\252\344\272\244\346\230\223\346\227\245\346\266\250\345\201\234\346\254\241\346\225\260\350\241\250";
static const char __pyx_k__11[] = "-";
static const char __pyx_k__12[] = "\344\270\252\344\272\244\346\230\223\346\227\245\346\214\257\345\271\205\346\216\222\345\220\215\350\241\250";
static const char __pyx_k__13[] = "\346\263\242\346\256\265\346\266\250\345\271\205";
static const char __pyx_k__14[] = "\345\274\200\345\247\213\346\227\266\351\227\264";
static const char __pyx_k__15[] = "\347\273\223\346\235\237\346\227\266\351\227\264";
static const char __pyx_k__16[] = "\344\270\252\344\272\244\346\230\223\346\227\245\346\263\242\346\256\265\346\266\250\345\271\205\346\216\222\345\220\215\350\241\250";
static const char __pyx_k__17[] = "\346\263\242\346\256\265\350\267\214\345\271\205";
static const char __pyx_k__18[] = "\344\270\252\344\272\244\346\230\223\346\227\245\346\263\242\346\256\265\350\267\214\345\271\205\346\216\222\345\220\215\350\241\250";
static const char __pyx_k__19[] = "-\346\266\250\345\271\205\345\210\206\345\270\203\345\233\276";
static const char __pyx_k__20[] = "\344\270\212\346\266\250:\345\271\263\347\233\230:\344\270\213\350\267\214 = ";
static const char __pyx_k__21[] = ":";
static const char __pyx_k__22[] = ", \346\266\250\345\201\234:\350\267\214\345\201\234 = ";
static const char __pyx_k__23[] = "";
static const char __pyx_k__24[] = ", ";
static const char __pyx_k__25[] = "\n";
static const char __pyx_k__26[] = ",";
static const char __pyx_k__27[] = "-\350\277\236\347\273\255\346\266\250\345\201\234\345\244\251\346\242\257\350\241\250";
static const char __pyx_k__28[] = "\350\202\241\347\245\250\345\220\215\347\247\260";
static const char __pyx_k__29[] = "\350\277\236\346\235\277\346\225\260";
static const char __pyx_k__33[] = "\346\266\250\345\271\205\351\242\221\346\254\241";
static const char __pyx_k__34[] = "\350\267\214\345\271\205\351\242\221\346\254\241";
static const char __pyx_k__35[] = "-\346\234\200\350\277\221";
static const char __pyx_k__36[] = "\344\270\252\344\272\244\346\230\223\346\227\245\347\203\255\347\202\271";
static const char __pyx_k__37[] = "\351\242\221\346\254\241\350\241\250";
static const char __pyx_k__38[] = "\351\242\221\346\254\241\350\241\250\n\n\351\200\211\345\217\226\346\257\217\345\244\251";
static const char __pyx_k__40[] = "\350\241\214\344\270\232";
static const char __pyx_k__41[] = "\345\244\251";
static const char __pyx_k__42[] = "\346\266\250\350\267\214\345\271\205\346\216\222\345\220\215";
static const char __pyx_k__43[] = "\346\227\245";
static const char __pyx_k__45[] = "\345\221\250";
static const char __pyx_k__46[] = "\346\234\210";
static const char __pyx_k__47[] = "\350\277\236\347\273\255\345\244\251\346\225\260";
static const char __pyx_k__49[] = "\344\270\212\346\266\250\345\220\215\347\247\260";
static const char __pyx_k__50[] = "\346\266\250\345\271\205\346\216\222\345\220\215";
static const char __pyx_k__51[] = "\346\266\250\345\271\205";
static const char __pyx_k__52[] = "\344\270\213\350\267\214\345\220\215\347\247\260";
static const char __pyx_k__53[] = "\350\267\214\345\271\205\346\216\222\345\220\215";
static const char __pyx_k__54[] = "\350\267\214\345\271\205";
static const char __pyx_k__55[] = "\346\216\222\345\220\215";
static const char __pyx_k__58[] = "*";
static const char __pyx_k__60[] = "\346\246\202\345\277\265";
static const char __pyx_k__61[] = "\350\202\241\347\245\250";
static const char __pyx_k__62[] = "\346\234\237\350\264\247";
static const char __pyx_k__63[] = "\346\214\207\346\225\260";
static const char __pyx_k__64[] = "-\350\277\221";
static const char __pyx_k__65[] = "\344\272\244\346\230\223\346\227\245\350\202\241\344\270\234\344\272\272\346\225\260\344\270\213\351\231\215\346\216\222\345\220\215\350\241\250";
static const char __pyx_k__66[] = "\344\272\244\346\230\223\346\227\245\350\202\241\344\270\234\344\272\272\346\225\260\344\270\213\351\231\215\346\216\222\345\220\215\350\241\250\n\n\345\275\223\345\211\215\345\210\206\344\275\215\346\225\260:=\345\275\223\345\211\215\344\272\272\346\225\260\345\234\250\350\277\221";
static const char __pyx_k__67[] = "\350\202\241\347\245\250\344\273\243\347\240\201";
static const char __pyx_k__68[] = "\345\205\254\345\221\212\346\227\245\346\234\237";
static const char __pyx_k__69[] = "\350\202\241\344\270\234\344\272\272\346\225\260";
static const char __pyx_k__70[] = "\344\272\272\345\235\207\351\207\221\351\242\235";
static const char __pyx_k__71[] = "\344\270\213\351\231\215\346\257\224\344\276\213";
static const char __pyx_k__72[] = "\345\275\223\345\211\215\345\210\206\344\275\215\346\225\260";
static const char __pyx_k__74[] = "\346\234\200\345\244\247\345\200\274";
static const char __pyx_k__75[] = "\346\234\200\345\260\217\345\200\274";
static const char __pyx_k__80[] = "%";
static const char __pyx_k__81[] = "\346\230\250\346\227\245\346\266\250\345\201\234_\345\220\253\344\270\200\345\255\227";
static const char __pyx_k__82[] = "\346\230\250\346\227\245\346\266\250\345\201\234";
static const char __pyx_k__83[] = "\346\230\250\346\227\245\350\277\236\346\235\277_\345\220\253\344\270\200\345\255\227";
static const char __pyx_k__84[] = "\346\230\250\346\227\245\350\277\236\346\235\277";
static const char __pyx_k__85[] = "\346\230\250\346\227\245\350\247\246\346\235\277";
static const char __pyx_k__86[] = "\357\274\242\350\202\241\346\214\207\346\225\260";
static const char __pyx_k__87[] = "\345\233\275\345\200\272\346\214\207\346\225\260";
static const char __pyx_k__88[] = "\344\274\201\345\200\272\346\214\207\346\225\260";
static const char __pyx_k__89[] = "\346\210\220\344\273\275\357\274\242\346\214\207";
static const char __pyx_k__91[] = "\351\234\200\350\246\201\345\205\210\346\233\264\346\226\260";
static const char __pyx_k__92[] = ".";
static const char __pyx_k__95[] = "\351\200\200\345\270\202";
static const char __pyx_k__96[] = "\351\200\200";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_and[] = "and_";
static const char __pyx_k_arg[] = "arg";
static const char __pyx_k_day[] = "day";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_dpi[] = "dpi";
static const char __pyx_k_ema[] = "ema_";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_fig[] = "fig";
static const char __pyx_k_hit[] = "hit";
static const char __pyx_k_how[] = "how";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_loc[] = "loc";
static const char __pyx_k_low[] = "low";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_mav[] = "mav";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_min[] = "min";
static const char __pyx_k_mpf[] = "mpf";
static const char __pyx_k_not[] = "not_";
static const char __pyx_k_plt[] = "plt";
static const char __pyx_k_png[] = ".png";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_qfq[] = "qfq";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_rsi[] = "rsi";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_tab[] = "tab";
static const char __pyx_k_x_2[] = "x";
static const char __pyx_k_xls[] = "xls";
static const char __pyx_k_60_2[] = "60";
static const char __pyx_k_9_85[] = "(~,-9.85)";
static const char __pyx_k_ADXR[] = "ADXR";
static const char __pyx_k_BOLL[] = "BOLL";
static const char __pyx_k_DEMA[] = "DEMA";
static const char __pyx_k_DI_2[] = "-DI";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_Edge[] = "Edge";
static const char __pyx_k_Grid[] = "Grid";
static const char __pyx_k_KAMA[] = "KAMA";
static const char __pyx_k_Line[] = "Line";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_MA10[] = "MA10";
static const char __pyx_k_MA20[] = "MA20";
static const char __pyx_k_MA30[] = "MA30";
static const char __pyx_k_MA60[] = "MA60";
static const char __pyx_k_MACD[] = "MACD";
static const char __pyx_k_MAMA[] = "MAMA";
static const char __pyx_k_Reds[] = "Reds";
static const char __pyx_k_Save[] = "Save";
static const char __pyx_k_TEMA[] = "TEMA";
static const char __pyx_k__102[] = "\346\262\252\346\267\261\344\270\273\346\235\277";
static const char __pyx_k__103[] = "\345\210\233\344\270\232\346\235\277";
static const char __pyx_k__104[] = "\347\247\221\345\210\233\346\235\277";
static const char __pyx_k__105[] = "\345\214\227\344\272\244\346\211\200";
static const char __pyx_k__108[] = ": ";
static const char __pyx_k__117[] = "_";
static const char __pyx_k__128[] = "\346\266\250\345\201\234";
static const char __pyx_k__129[] = "\350\267\214\345\201\234";
static const char __pyx_k__139[] = "\350\257\201\345\210\270";
static const char __pyx_k__140[] = "\345\244\232\345\205\203\351\207\221\350\236\215";
static const char __pyx_k__141[] = "\345\214\273\347\226\227\346\234\215\345\212\241";
static const char __pyx_k__142[] = "\345\214\226\345\255\246\345\210\266\350\215\257";
static const char __pyx_k__143[] = "\345\210\270\345\225\206\346\246\202\345\277\265";
static const char __pyx_k__144[] = "\344\270\212\346\265\267";
static const char __pyx_k__147[] = "\350\203\275\346\272\220\351\207\221\345\261\236";
static const char __pyx_k__148[] = "\345\205\211\344\274\217\350\256\276\345\244\207";
static const char __pyx_k__149[] = "\347\246\217\345\273\272";
static const char __pyx_k__150[] = "\346\200\273\345\205\261\346\211\276\345\210\260";
static const char __pyx_k__151[] = "\344\270\252\345\214\271\351\205\215\357\274\232";
static const char __pyx_k__152[] = "\351\235\242\350\206\234";
static const char __pyx_k__395[] = "?";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_axes[] = "axes";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_bind[] = "bind";
static const char __pyx_k_bool[] = "bool";
static const char __pyx_k_ceil[] = "ceil";
static const char __pyx_k_cmap[] = "cmap";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_deas[] = "deas";
static const char __pyx_k_desc[] = "desc";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_difs[] = "difs";
static const char __pyx_k_down[] = "down";
static const char __pyx_k_drop[] = "drop";
static const char __pyx_k_edge[] = "edge";
static const char __pyx_k_end1[] = "end1";
static const char __pyx_k_end5[] = "end5";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_font[] = "font";
static const char __pyx_k_head[] = "head";
static const char __pyx_k_high[] = "high";
static const char __pyx_k_iloc[] = "iloc";
static const char __pyx_k_info[] = "info";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_isin[] = "isin";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keep[] = "keep";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_ma_5[] = "ma_5";
static const char __pyx_k_macd[] = "macd";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mean[] = "mean";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_near[] = "near";
static const char __pyx_k_none[] = "none";
static const char __pyx_k_objs[] = "objs";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_opts[] = "opts";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_plot[] = "plot";
static const char __pyx_k_quit[] = "quit";
static const char __pyx_k_rows[] = "rows";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_show[] = "show";
static const char __pyx_k_sort[] = "sort";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_tail[] = "tail";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_tqdm[] = "tqdm";
static const char __pyx_k_type[] = "type_";
static const char __pyx_k_vols[] = "vols";
static const char __pyx_k_week[] = "week";
static const char __pyx_k_wick[] = "wick";
static const char __pyx_k_year[] = "year";
static const char __pyx_k_0_1_2[] = "(0,1]";
static const char __pyx_k_Kline[] = "Kline";
static const char __pyx_k_LIGHT[] = "LIGHT";
static const char __pyx_k_MaAll[] = "MaAll";
static const char __pyx_k_Mysql[] = "\346\225\260\346\215\256\345\210\260Mysql\346\225\260\346\215\256\345\272\223.";
static const char __pyx_k_STOCH[] = "STOCH";
static const char __pyx_k_TRIMA[] = "TRIMA";
static const char __pyx_k_Table[] = "Table";
static const char __pyx_k_Union[] = "Union";
static const char __pyx_k_WILLR[] = "WILLR";
static const char __pyx_k_Y_m_d[] = "%Y%m%d";
static const char __pyx_k_and_2[] = " and ";
static const char __pyx_k_apply[] = "apply";
static const char __pyx_k_bar_1[] = "bar_1";
static const char __pyx_k_bar_2[] = "bar_2";
static const char __pyx_k_bwr_r[] = "bwr_r";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_color[] = "color";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_datas[] = "datas";
static const char __pyx_k_day_2[] = "_day";
static const char __pyx_k_depth[] = "depth";
static const char __pyx_k_df_ma[] = "df_ma";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_ema_5[] = "ema_5";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_first[] = "first";
static const char __pyx_k_floor[] = "floor";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_image[] = "image";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_inner[] = "inner";
static const char __pyx_k_is_st[] = "is_st";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_kline[] = "kline";
static const char __pyx_k_level[] = "level";
static const char __pyx_k_ma_10[] = "ma_10";
static const char __pyx_k_ma_20[] = "ma_20";
static const char __pyx_k_ma_30[] = "ma_30";
static const char __pyx_k_ma_60[] = "ma_60";
static const char __pyx_k_macds[] = "macds";
static const char __pyx_k_max_2[] = "max_";
static const char __pyx_k_merge[] = "merge";
static const char __pyx_k_min_2[] = "min_";
static const char __pyx_k_month[] = "month";
static const char __pyx_k_num_k[] = "num_k";
static const char __pyx_k_price[] = "price";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_query[] = "query";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_reset[] = "reset";
static const char __pyx_k_round[] = "round";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_sheet[] = "sheet";
static const char __pyx_k_spire[] = "spire";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_style[] = "style";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_talib[] = "talib";
static const char __pyx_k_theme[] = "theme";
static const char __pyx_k_tight[] = "tight";
static const char __pyx_k_times[] = "times";
static const char __pyx_k_title[] = "title";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_utils[] = "utils";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_14b143[] = "#14b143";
static const char __pyx_k_300416[] = "300416";
static const char __pyx_k_5_9_85[] = "(5,9.85]";
static const char __pyx_k_601360[] = "601360";
static const char __pyx_k_9_85_2[] = "(9.85,~]";
static const char __pyx_k_9_85_5[] = "[-9.85,-5)";
static const char __pyx_k_BBANDS[] = "BBANDS";
static const char __pyx_k_BK0815[] = "BK0815";
static const char __pyx_k_BK0816[] = "BK0816";
static const char __pyx_k_BK0817[] = "BK0817";
static const char __pyx_k_BK1050[] = "BK1050";
static const char __pyx_k_BK1051[] = "BK1051";
static const char __pyx_k_ColDef[] = "ColDef";
static const char __pyx_k_H_line[] = "H_line";
static const char __pyx_k_JsCode[] = "JsCode";
static const char __pyx_k_L_line[] = "L_line";
static const char __pyx_k_M_line[] = "M_line";
static const char __pyx_k_Volumn[] = "Volumn";
static const char __pyx_k_amount[] = "amount";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_astype[] = "astype";
static const char __pyx_k_candle[] = "candle";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_color0[] = "color0";
static const char __pyx_k_common[] = "common";
static const char __pyx_k_concat[] = "concat";
static const char __pyx_k_dict_2[] = "dict";
static const char __pyx_k_driver[] = "driver";
static const char __pyx_k_ef232a[] = "#ef232a";
static const char __pyx_k_ema_10[] = "ema_10";
static const char __pyx_k_ema_20[] = "ema_20";
static const char __pyx_k_ema_30[] = "ema_30";
static const char __pyx_k_ema_60[] = "ema_60";
static const char __pyx_k_ema_df[] = "ema_df";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_engine[] = "engine";
static const char __pyx_k_f_code[] = "f_code";
static const char __pyx_k_family[] = "family";
static const char __pyx_k_ffffff[] = "#ffffff";
static const char __pyx_k_figure[] = "figure";
static const char __pyx_k_fillna[] = "fillna";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_future[] = "future";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_idxmax[] = "idxmax";
static const char __pyx_k_idxmin[] = "idxmin";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_insert[] = "insert";
static const char __pyx_k_inside[] = "inside";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_line_2[] = "line_2";
static const char __pyx_k_logger[] = "logger";
static const char __pyx_k_market[] = "market";
static const char __pyx_k_matype[] = "matype";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_near_2[] = "_near";
static const char __pyx_k_near_5[] = "near_5";
static const char __pyx_k_new_df[] = "new_df";
static const char __pyx_k_num_tr[] = "num_tr";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_pandas[] = "pandas";
static const char __pyx_k_pyplot[] = "pyplot";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_render[] = "render";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_silver[] = "silver";
static const char __pyx_k_single[] = "single";
static const char __pyx_k_spires[] = "spires";
static const char __pyx_k_submit[] = "submit";
static const char __pyx_k_subset[] = "subset";
static const char __pyx_k_symbol[] = "symbol";
static const char __pyx_k_thread[] = "thread";
static const char __pyx_k_tolist[] = "tolist";
static const char __pyx_k_type_2[] = "type";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_up_num[] = "up_num";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_use_ma[] = "use_ma";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_volume[] = "volume";
static const char __pyx_k_week_2[] = "_week";
static const char __pyx_k_xlabel[] = "xlabel";
static const char __pyx_k_y_axis[] = "y_axis";
static const char __pyx_k_ylabel[] = "ylabel";
static const char __pyx_k_1_K_2_3[] = "\n    \345\217\257\350\247\206\345\214\226\350\202\241\347\245\250\346\225\260\346\215\256\n    1. \345\217\257\350\247\206\345\214\226K\347\272\277\345\233\276\n    2. \345\217\257\350\247\206\345\214\226\345\235\207\347\272\277\345\233\276\n    3. \345\217\257\350\247\206\345\214\226\346\212\200\346\234\257\346\214\207\346\240\207\n    ";
static const char __pyx_k_Counter[] = "Counter";
static const char __pyx_k_DRG_DIP[] = "DRG/DIP";
static const char __pyx_k_Dispose[] = "Dispose";
static const char __pyx_k_Kline_2[] = "_Kline";
static const char __pyx_k_LastRow[] = "LastRow";
static const char __pyx_k_Options[] = "Options";
static const char __pyx_k_PLUS_DI[] = "PLUS_DI";
static const char __pyx_k_Service[] = "Service";
static const char __pyx_k_ToImage[] = "ToImage";
static const char __pyx_k_between[] = " between ";
static const char __pyx_k_co_name[] = "co_name";
static const char __pyx_k_columns[] = "columns";
static const char __pyx_k_concept[] = "concept";
static const char __pyx_k_cumprod[] = "cumprod";
static const char __pyx_k_dataMax[] = "dataMax";
static const char __pyx_k_dataMin[] = "dataMin";
static const char __pyx_k_day_len[] = "day_len";
static const char __pyx_k_df_left[] = "df_left";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_dispose[] = "dispose";
static const char __pyx_k_fig_bar[] = "fig_bar";
static const char __pyx_k_figsize[] = "figsize";
static const char __pyx_k_figured[] = "figured";
static const char __pyx_k_firstly[] = " firstly.";
static const char __pyx_k_futures[] = "futures";
static const char __pyx_k_groupby[] = "groupby";
static const char __pyx_k_inherit[] = "inherit";
static const char __pyx_k_inplace[] = "inplace";
static const char __pyx_k_is_code[] = "is_code";
static const char __pyx_k_is_show[] = "is_show";
static const char __pyx_k_item_up[] = "item_up";
static const char __pyx_k_key_day[] = "key_day";
static const char __pyx_k_ma_name[] = "ma_name";
static const char __pyx_k_ma_time[] = "ma_time";
static const char __pyx_k_macd_df[] = "macd_df";
static const char __pyx_k_month_2[] = "_month";
static const char __pyx_k_my_dict[] = "my_dict";
static const char __pyx_k_my_plot[] = "my_plot";
static const char __pyx_k_nbdevdn[] = "nbdevdn";
static const char __pyx_k_nbdevup[] = "nbdevup";
static const char __pyx_k_near_10[] = "near_10";
static const char __pyx_k_near_20[] = "near_20";
static const char __pyx_k_near_30[] = "near_30";
static const char __pyx_k_near_60[] = "near_60";
static const char __pyx_k_new_thr[] = "new_thr";
static const char __pyx_k_opacity[] = "opacity";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_overlap[] = "overlap";
static const char __pyx_k_plot_df[] = "plot_df";
static const char __pyx_k_pos_top[] = "pos_top";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_process[] = "process";
static const char __pyx_k_quarter[] = "quarter";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_row_num[] = "row_num";
static const char __pyx_k_savefig[] = "savefig";
static const char __pyx_k_service[] = "service";
static const char __pyx_k_session[] = "session";
static const char __pyx_k_set_dpi[] = "set_dpi";
static const char __pyx_k_succeed[] = "succeed";
static const char __pyx_k_tbstock[] = "tbstock";
static const char __pyx_k_to_dict[] = "to_dict";
static const char __pyx_k_to_list[] = "to_list";
static const char __pyx_k_trigger[] = "trigger";
static const char __pyx_k_updated[] = "updated";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_workers[] = "workers";
static const char __pyx_k_0_399003[] = "0.399003";
static const char __pyx_k_1_000003[] = "1.000003";
static const char __pyx_k_1_000012[] = "1.000012";
static const char __pyx_k_1_000013[] = "1.000013";
static const char __pyx_k_20240101[] = "20240101";
static const char __pyx_k_20240625[] = "20240625";
static const char __pyx_k_20240813[] = "20240813";
static const char __pyx_k_AxisOpts[] = "AxisOpts";
static const char __pyx_k_FirstRow[] = "FirstRow";
static const char __pyx_k_GridOpts[] = "GridOpts";
static const char __pyx_k_InitOpts[] = "InitOpts";
static const char __pyx_k_MINUS_DI[] = "MINUS_DI";
static const char __pyx_k_Workbook[] = "Workbook";
static const char __pyx_k_all_data[] = "all_data";
static const char __pyx_k_all_list[] = "all_list";
static const char __pyx_k_autumn_r[] = "autumn_r";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_bg_color[] = "bg_color";
static const char __pyx_k_category[] = "category";
static const char __pyx_k_col_inch[] = ", col_inch = ";
static const char __pyx_k_col_list[] = "col_list";
static const char __pyx_k_col_name[] = "col_name";
static const char __pyx_k_dataproc[] = "dataproc";
static const char __pyx_k_date_end[] = "date_end";
static const char __pyx_k_date_str[] = "date_str";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_deepcopy[] = "deepcopy";
static const char __pyx_k_df_right[] = "df_right";
static const char __pyx_k_down_num[] = "down_num";
static const char __pyx_k_end_date[] = "end_date";
static const char __pyx_k_executor[] = "executor";
static const char __pyx_k_figcolor[] = "figcolor";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_fontsize[] = "fontsize";
static const char __pyx_k_fun_name[] = "fun_name";
static const char __pyx_k_get_Item[] = "get_Item";
static const char __pyx_k_getframe[] = "_getframe";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_industry[] = "industry";
static const char __pyx_k_int_dict[] = "(int, dict)";
static const char __pyx_k_interval[] = "interval";
static const char __pyx_k_is_scale[] = "is_scale";
static const char __pyx_k_iterrows[] = "iterrows";
static const char __pyx_k_key_list[] = "key_list";
static const char __pyx_k_key_name[] = "key_name";
static const char __pyx_k_key_time[] = "key_time";
static const char __pyx_k_key_word[] = "key_word";
static const char __pyx_k_macdhist[] = "macdhist";
static const char __pyx_k_max_rows[] = "max_rows";
static const char __pyx_k_my_color[] = "my_color";
static const char __pyx_k_my_style[] = "my_style";
static const char __pyx_k_near_day[] = "near_day";
static const char __pyx_k_near_num[] = "near_num";
static const char __pyx_k_new_date[] = "new_date";
static const char __pyx_k_new_dict[] = "new_dict";
static const char __pyx_k_num_rank[] = "num_rank";
static const char __pyx_k_num_rows[] = "num_rows";
static const char __pyx_k_ori_dict[] = "ori_dict";
static const char __pyx_k_pos_left[] = "pos_left";
static const char __pyx_k_previous[] = "previous";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_rcParams[] = "rcParams";
static const char __pyx_k_read_sql[] = "read_sql";
static const char __pyx_k_res_list[] = "res_list";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_right_ax[] = "right_ax";
static const char __pyx_k_row_inch[] = "row_inch = ";
static const char __pyx_k_selenium[] = "selenium";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_show_fig[] = "show_fig";
static const char __pyx_k_snapshot[] = "snapshot";
static const char __pyx_k_splitext[] = "splitext";
static const char __pyx_k_strftime[] = "strftime";
static const char __pyx_k_strptime[] = "strptime";
static const char __pyx_k_subplots[] = "subplots";
static const char __pyx_k_subtitle[] = "subtitle";
static const char __pyx_k_suffixes[] = "suffixes";
static const char __pyx_k_tech_ind[] = "tech_ind";
static const char __pyx_k_time_key[] = "time_key";
static const char __pyx_k_up_limit[] = "up_limit";
static const char __pyx_k_use_date[] = "use_date";
static const char __pyx_k_workbook[] = "workbook";
static const char __pyx_k_year_end[] = "year_end";
static const char __pyx_k_year_str[] = "year_str";
static const char __pyx_k_zero_num[] = "zero_num";
static const char __pyx_k_Beginning[] = "Beginning ";
static const char __pyx_k_CDL2CROWS[] = "CDL2CROWS";
static const char __pyx_k_CDLHAMMER[] = "CDLHAMMER";
static const char __pyx_k_CDLHARAMI[] = "CDLHARAMI";
static const char __pyx_k_DataFrame[] = "DataFrame";
static const char __pyx_k_Kline_png[] = "_Kline.png";
static const char __pyx_k_LabelOpts[] = "LabelOpts";
static const char __pyx_k_ThemeType[] = "ThemeType";
static const char __pyx_k_Timestamp[] = "Timestamp";
static const char __pyx_k_TitleOpts[] = "TitleOpts";
static const char __pyx_k_add_xaxis[] = "add_xaxis";
static const char __pyx_k_add_yaxis[] = "add_yaxis";
static const char __pyx_k_amount_ma[] = "amount_ma";
static const char __pyx_k_amount_th[] = "amount_th";
static const char __pyx_k_amplitude[] = "amplitude";
static const char __pyx_k_area_list[] = "area_list";
static const char __pyx_k_ascending[] = "ascending";
static const char __pyx_k_base_list[] = "base_list";
static const char __pyx_k_codes_str[] = "codes_str";
static const char __pyx_k_col_title[] = "col_title";
static const char __pyx_k_data_list[] = "data_list";
static const char __pyx_k_date_list[] = "date_list";
static const char __pyx_k_desc_name[] = "desc_name";
static const char __pyx_k_facecolor[] = "facecolor";
static const char __pyx_k_file_name[] = "file_name";
static const char __pyx_k_foot_size[] = "foot_size";
static const char __pyx_k_formatter[] = "formatter";
static const char __pyx_k_grid_opts[] = "grid_opts";
static const char __pyx_k_gridcolor[] = "gridcolor";
static const char __pyx_k_hot_table[] = "hot_table";
static const char __pyx_k_init_opts[] = "init_opts";
static const char __pyx_k_isStStock[] = "isStStock";
static const char __pyx_k_isUpLimit[] = "isUpLimit";
static const char __pyx_k_is_delist[] = "is_delist";
static const char __pyx_k_is_smooth[] = "is_smooth";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_item_down[] = "item_down";
static const char __pyx_k_listUnion[] = "listUnion";
static const char __pyx_k_list_item[] = "list_item";
static const char __pyx_k_loadTable[] = "loadTable";
static const char __pyx_k_lock_time[] = "lock_time";
static const char __pyx_k_ma_column[] = "ma_column";
static const char __pyx_k_max_depth[] = "max_depth";
static const char __pyx_k_max_level[] = "max_level";
static const char __pyx_k_max_price[] = "max_price";
static const char __pyx_k_merged_df[] = "merged_df";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_min_price[] = "min_price";
static const char __pyx_k_my_method[] = "my_method";
static const char __pyx_k_name_list[] = "name_list";
static const char __pyx_k_near_name[] = "near_name";
static const char __pyx_k_now_price[] = "now_price";
static const char __pyx_k_origin_df[] = "origin_df";
static const char __pyx_k_plotKline[] = "plotKline";
static const char __pyx_k_plottable[] = "plottable";
static const char __pyx_k_pos_right[] = "pos_right";
static const char __pyx_k_pre_close[] = "pre_close";
static const char __pyx_k_prev_date[] = "prev_date";
static const char __pyx_k_pyecharts[] = "pyecharts";
static const char __pyx_k_range_end[] = "range_end";
static const char __pyx_k_res_names[] = "res_names";
static const char __pyx_k_result_df[] = "result_df";
static const char __pyx_k_return_df[] = "return_df";
static const char __pyx_k_returnfig[] = "returnfig";
static const char __pyx_k_saveToImg[] = "_saveToImg";
static const char __pyx_k_save_file[] = "save_file";
static const char __pyx_k_save_json[] = "save_json";
static const char __pyx_k_select_df[] = "select_df";
static const char __pyx_k_set_index[] = "set_index";
static const char __pyx_k_set_title[] = "set_title";
static const char __pyx_k_sorted_df[] = "sorted_df";
static const char __pyx_k_spire_xls[] = "spire.xls";
static const char __pyx_k_sql_query[] = "sql_query";
static const char __pyx_k_statement[] = "statement";
static const char __pyx_k_stock_tag[] = "stock_tag";
static const char __pyx_k_stock_tmp[] = "stock_tmp";
static const char __pyx_k_tech_name[] = "tech_name";
static const char __pyx_k_temp_dict[] = "temp_dict";
static const char __pyx_k_text_cmap[] = "text_cmap";
static const char __pyx_k_textprops[] = "textprops";
static const char __pyx_k_time_cost[] = "\350\216\267\345\217\226\346\225\260\346\215\256 time cost = ";
static const char __pyx_k_transform[] = "transform";
static const char __pyx_k_type_name[] = "type_name";
static const char __pyx_k_webdriver[] = "webdriver";
static const char __pyx_k_CDL3INSIDE[] = "CDL3INSIDE";
static const char __pyx_k_Can_t_load[] = "Can't load ";
static const char __pyx_k_LastColumn[] = "LastColumn";
static const char __pyx_k_LegendOpts[] = "LegendOpts";
static const char __pyx_k_TIMI_COUNT[] = "TIMI_COUNT";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_Worksheets[] = "Worksheets";
static const char __pyx_k_cal_max_th[] = "cal_max_th";
static const char __pyx_k_cal_min_th[] = "cal_min_th";
static const char __pyx_k_codes_list[] = "codes_list";
static const char __pyx_k_col_inch_2[] = "col_inch";
static const char __pyx_k_color_list[] = "color_list";
static const char __pyx_k_data_table[] = "data_table";
static const char __pyx_k_date_start[] = "date_start";
static const char __pyx_k_day_levels[] = "day_levels";
static const char __pyx_k_df_grouped[] = "df_grouped";
static const char __pyx_k_fastperiod[] = "fastperiod";
static const char __pyx_k_fun_driver[] = "fun_driver";
static const char __pyx_k_grid_chart[] = "grid_chart";
static const char __pyx_k_grid_index[] = "grid_index";
static const char __pyx_k_group_keys[] = "group_keys";
static const char __pyx_k_grouped_df[] = "grouped_df";
static const char __pyx_k_holder_num[] = "holder_num";
static const char __pyx_k_index_left[] = "index_left";
static const char __pyx_k_index_list[] = "index_list";
static const char __pyx_k_isNewStock[] = "isNewStock";
static const char __pyx_k_is_on_zero[] = "is_on_zero";
static const char __pyx_k_is_session[] = "is_session";
static const char __pyx_k_key_pandas[] = "key_pandas";
static const char __pyx_k_kline_html[] = "_kline.html";
static const char __pyx_k_kline_line[] = "kline_line";
static const char __pyx_k_label_opts[] = "label_opts";
static const char __pyx_k_ladder_max[] = "ladder_max";
static const char __pyx_k_left_index[] = "left_index";
static const char __pyx_k_macdsignal[] = "macdsignal";
static const char __pyx_k_market_cap[] = "market_cap";
static const char __pyx_k_matplotlib[] = "matplotlib";
static const char __pyx_k_mplfinance[] = "mplfinance";
static const char __pyx_k_multi_type[] = "multi_type";
static const char __pyx_k_new_record[] = "new_record";
static const char __pyx_k_query_date[] = "query_date";
static const char __pyx_k_rank_level[] = "rank_level";
static const char __pyx_k_row_inch_2[] = "row_inch";
static const char __pyx_k_select_str[] = "select_str";
static const char __pyx_k_set_ylabel[] = "set_ylabel";
static const char __pyx_k_slowperiod[] = "slowperiod";
static const char __pyx_k_sqlalchemy[] = "sqlalchemy";
static const char __pyx_k_start_date[] = "start_date";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_stock_code[] = "stock_code";
static const char __pyx_k_stock_data[] = "stock_data";
static const char __pyx_k_stock_list[] = "stock_list";
static const char __pyx_k_stock_name[] = "stock_name";
static const char __pyx_k_table_name[] = "table_name";
static const char __pyx_k_table_rows[] = "table_rows";
static const char __pyx_k_tech_index[] = "tech_index";
static const char __pyx_k_time_value[] = "time_value";
static const char __pyx_k_timeperiod[] = "timeperiod";
static const char __pyx_k_title_opts[] = "title_opts";
static const char __pyx_k_trade_date[] = "trade_date";
static const char __pyx_k_union_list[] = "union_list";
static const char __pyx_k_uplimt_num[] = "uplimt_num";
static const char __pyx_k_use_date_2[] = "use_date = ";
static const char __pyx_k_value_dict[] = "value_dict";
static const char __pyx_k_value_list[] = "value_list";
static const char __pyx_k_wave_ratio[] = "wave_ratio";
static const char __pyx_k_xaxis_data[] = "xaxis_data";
static const char __pyx_k_xaxis_opts[] = "xaxis_opts";
static const char __pyx_k_yaxis_opts[] = "yaxis_opts";
static const char __pyx_k_year_start[] = "year_start";
static const char __pyx_k_CDLPIERCING[] = "CDLPIERCING";
static const char __pyx_k_FirstColumn[] = "FirstColumn";
static const char __pyx_k_TooltipOpts[] = "TooltipOpts";
static const char __pyx_k_all_near_df[] = "all_near_df";
static const char __pyx_k_bbox_inches[] = "bbox_inches";
static const char __pyx_k_closeDriver[] = "closeDriver";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_df_filtered[] = "df_filtered";
static const char __pyx_k_filter_dict[] = "filter_dict";
static const char __pyx_k_filter_list[] = "filter_list";
static const char __pyx_k_index_right[] = "index_right";
static const char __pyx_k_input_codes[] = "input_codes";
static const char __pyx_k_isDownLimit[] = "isDownLimit";
static const char __pyx_k_is_up_limit[] = "is_up_limit";
static const char __pyx_k_legend_opts[] = "legend_opts";
static const char __pyx_k_list_2_dict[] = "list_2_dict";
static const char __pyx_k_market_type[] = "market_type";
static const char __pyx_k_max_item_up[] = "max_item_up";
static const char __pyx_k_max_workers[] = "max_workers";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_my_dataproc[] = "my_dataproc";
static const char __pyx_k_near_levels[] = "near_levels";
static const char __pyx_k_new_row_hot[] = "new_row_hot";
static const char __pyx_k_normed_cmap[] = "normed_cmap";
static const char __pyx_k_output_name[] = "output_name";
static const char __pyx_k_per_row_num[] = "per_row_num";
static const char __pyx_k_pre_fig_row[] = "pre_fig_row";
static const char __pyx_k_qfq_up_rate[] = "qfq_up_rate";
static const char __pyx_k_quantile_tr[] = "quantile_tr";
static const char __pyx_k_ratio_limit[] = "ratio_limit";
static const char __pyx_k_report_date[] = "report_date";
static const char __pyx_k_reset_index[] = "reset_index";
static const char __pyx_k_return_dict[] = "return_dict";
static const char __pyx_k_right_index[] = "right_index";
static const char __pyx_k_secondary_y[] = "secondary_y";
static const char __pyx_k_select_code[] = "select_code";
static const char __pyx_k_series_name[] = "series_name";
static const char __pyx_k_sh_calendar[] = "sh_calendar";
static const char __pyx_k_show_figure[] = "show_figure";
static const char __pyx_k_simple_test[] = "simple_test";
static const char __pyx_k_sort_values[] = "sort_values";
static const char __pyx_k_table_title[] = "table_title";
static const char __pyx_k_time_cost_2[] = "time cost = ";
static const char __pyx_k_to_datetime[] = "to_datetime";
static const char __pyx_k_update_json[] = "update_json";
static const char __pyx_k_use_num_hot[] = "use_num_hot";
static const char __pyx_k_value_ratio[] = "value_ratio";
static const char __pyx_k_var_barData[] = "var barData = {}";
static const char __pyx_k_visualStock[] = "visualStock";
static const char __pyx_k_week_levels[] = "week_levels";
static const char __pyx_k_xaxis_index[] = "xaxis_index";
static const char __pyx_k_yaxis_index[] = "yaxis_index";
static const char __pyx_k_year_levels[] = "year_levels";
static const char __pyx_k_AxisLineOpts[] = "AxisLineOpts";
static const char __pyx_k_AxisTickOpts[] = "AxisTickOpts";
static const char __pyx_k_CDLENGULFING[] = "CDLENGULFING";
static const char __pyx_k_Candle_Chart[] = " Candle Chart";
static const char __pyx_k_DataZoomOpts[] = "DataZoomOpts";
static const char __pyx_k_LoadFromFile[] = "LoadFromFile";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_add_js_funcs[] = "add_js_funcs";
static const char __pyx_k_as_completed[] = "as_completed";
static const char __pyx_k_baseStrategy[] = "baseStrategy \344\270\215\345\217\257\345\272\217\345\210\227\345\214\226\347\232\204\345\261\236\346\200\247:";
static const char __pyx_k_border_color[] = "border_color";
static const char __pyx_k_boundary_gap[] = "boundary_gap";
static const char __pyx_k_change_ratio[] = "change_ratio";
static const char __pyx_k_compute_date[] = ": compute_date = ";
static const char __pyx_k_concept_list[] = "concept_list";
static const char __pyx_k_current_date[] = "current_date";
static const char __pyx_k_datetime_str[] = "datetime_str";
static const char __pyx_k_day_hot_dict[] = "day_hot_dict";
static const char __pyx_k_downlimt_num[] = "downlimt_num";
static const char __pyx_k_fastk_period[] = "fastk_period";
static const char __pyx_k_figure_title[] = "figure_title";
static const char __pyx_k_getWebDriver[] = "getWebDriver";
static const char __pyx_k_group_column[] = "group_column";
static const char __pyx_k_head_tail_df[] = "head_tail_df";
static const char __pyx_k_ignore_index[] = "ignore_index";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_is_week_last[] = "is_week_last";
static const char __pyx_k_is_year_last[] = "is_year_last";
static const char __pyx_k_key_products[] = "key_products";
static const char __pyx_k_loadJsonData[] = "loadJsonData";
static const char __pyx_k_ma_time_list[] = "ma_time_list";
static const char __pyx_k_marketcolors[] = "marketcolors";
static const char __pyx_k_month_levels[] = "month_levels";
static const char __pyx_k_multi_thread[] = "multi_thread";
static const char __pyx_k_new_date_len[] = "new_date_len";
static const char __pyx_k_new_end_date[] = "new end_date: ";
static const char __pyx_k_new_row_cold[] = "new_row_cold";
static const char __pyx_k_next_session[] = "next_session";
static const char __pyx_k_now_datetime[] = "now_datetime";
static const char __pyx_k_num_quantile[] = "num_quantile";
static const char __pyx_k_pd_DataFrame[] = "pd.DataFrame";
static const char __pyx_k_plotKlineMpl[] = "plotKlineMpl";
static const char __pyx_k_product_name[] = "product_name";
static const char __pyx_k_selectByArea[] = "selectByArea";
static const char __pyx_k_selection_df[] = "selection_df";
static const char __pyx_k_set_figwidth[] = "set_figwidth";
static const char __pyx_k_set_fontsize[] = "set_fontsize";
static const char __pyx_k_signalperiod[] = "signalperiod";
static const char __pyx_k_slowd_matype[] = "slowd_matype";
static const char __pyx_k_slowd_period[] = "slowd_period";
static const char __pyx_k_slowk_matype[] = "slowk_matype";
static const char __pyx_k_slowk_period[] = "slowk_period";
static const char __pyx_k_split_number[] = "split_number";
static const char __pyx_k_stockTechInd[] = "stockTechInd";
static const char __pyx_k_stock_ladder[] = "stock_ladder";
static const char __pyx_k_tooltip_opts[] = "tooltip_opts";
static const char __pyx_k_top_up_limit[] = "top_up_limit";
static const char __pyx_k_trade_day_df[] = "trade_day_df";
static const char __pyx_k_trigger_date[] = "trigger_date";
static const char __pyx_k_up_row_index[] = "up_row_index";
static const char __pyx_k_update_range[] = "update_range";
static const char __pyx_k_use_date_now[] = "use_date_now";
static const char __pyx_k_use_datetime[] = "use_datetime";
static const char __pyx_k_use_num_cold[] = "use_num_cold";
static const char __pyx_k_use_st_stock[] = "use_st_stock";
static const char __pyx_k_AR_PL_UKai_CN[] = "AR PL UKai CN";
static const char __pyx_k_ItemStyleOpts[] = "ItemStyleOpts";
static const char __pyx_k_LineStyleOpts[] = "LineStyleOpts";
static const char __pyx_k_MarkPointItem[] = "MarkPointItem";
static const char __pyx_k_MarkPointOpts[] = "MarkPointOpts";
static const char __pyx_k_SplitLineOpts[] = "SplitLineOpts";
static const char __pyx_k_avg_amount_pa[] = "avg_amount_pa";
static const char __pyx_k_axisline_opts[] = "axisline_opts";
static const char __pyx_k_axistick_opts[] = "axistick_opts";
static const char __pyx_k_base_filename[] = "base_filename";
static const char __pyx_k_border_color0[] = "border_color0";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_current_price[] = "current_price";
static const char __pyx_k_datazoom_opts[] = "datazoom_opts";
static const char __pyx_k_datetime64_ns[] = "datetime64[ns]";
static const char __pyx_k_day_cold_dict[] = "day_cold_dict";
static const char __pyx_k_exclude_codes[] = "exclude_codes";
static const char __pyx_k_getAllStStock[] = "getAllStStock";
static const char __pyx_k_get_facecolor[] = "get_facecolor";
static const char __pyx_k_hot_table_day[] = "hot_table_day";
static const char __pyx_k_industry_list[] = "industry_list";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_isDelistStock[] = "isDelistStock";
static const char __pyx_k_is_down_limit[] = "is_down_limit";
static const char __pyx_k_is_month_last[] = "is_month_last";
static const char __pyx_k_main_business[] = "main_business";
static const char __pyx_k_make_snapshot[] = "make_snapshot";
static const char __pyx_k_max_item_down[] = "max_item_down";
static const char __pyx_k_near_datetime[] = "near_datetime";
static const char __pyx_k_near_day_dict[] = "near_day_dict";
static const char __pyx_k_near_day_list[] = "near_day_list";
static const char __pyx_k_new_base_list[] = "new_base_list";
static const char __pyx_k_save_strategy[] = "save_strategy";
static const char __pyx_k_setFigureShow[] = "setFigureShow";
static const char __pyx_k_set_facecolor[] = "set_facecolor";
static const char __pyx_k_set_figheight[] = "set_figheight";
static const char __pyx_k_spires_common[] = "spires_common";
static const char __pyx_k_st_stock_dict[] = "st_stock_dict";
static const char __pyx_k_stock_data_df[] = "stock_data_df";
static const char __pyx_k_stock_wave_up[] = "stock_wave_up";
static const char __pyx_k_strategyCount[] = "strategyCount";
static const char __pyx_k_strategy_date[] = "strategy_date";
static const char __pyx_k_strategy_json[] = "strategy_json";
static const char __pyx_k_strategy_name[] = "strategy_name";
static const char __pyx_k_tbstock_utils[] = "tbstock.utils";
static const char __pyx_k_top_amplitude[] = "top_amplitude";
static const char __pyx_k_trade_day_len[] = "trade_day_len";
static const char __pyx_k_upLimit_times[] = "upLimit_times";
static const char __pyx_k_0_82_0_83_0_85[] = "(0.82, 0.83, 0.85)";
static const char __pyx_k_CDLMORNINGSTAR[] = "CDLMORNINGSTAR";
static const char __pyx_k_axislabel_opts[] = "axislabel_opts";
static const char __pyx_k_baseStrategy_2[] = "baseStrategy";
static const char __pyx_k_color_function[] = "color_function";
static const char __pyx_k_dataManagement[] = "dataManagement";
static const char __pyx_k_dataPreprocess[] = "dataPreprocess";
static const char __pyx_k_decrease_ratio[] = "decrease_ratio";
static const char __pyx_k_down_row_index[] = "down_row_index";
static const char __pyx_k_drawKlineChart[] = "drawKlineChart";
static const char __pyx_k_dumpJsonToFile[] = "dumpJsonToFile";
static const char __pyx_k_file_extension[] = "file_extension";
static const char __pyx_k_financial_mode[] = "financial_mode";
static const char __pyx_k_first_use_date[] = "first_use_date";
static const char __pyx_k_getAllNewStock[] = "getAllNewStock";
static const char __pyx_k_getStockLadder[] = "__getStockLadder";
static const char __pyx_k_hot_table_week[] = "hot_table_week";
static const char __pyx_k_hot_table_year[] = "hot_table_year";
static const char __pyx_k_include_groups[] = "include_groups";
static const char __pyx_k_itemstyle_opts[] = "itemstyle_opts";
static const char __pyx_k_json_file_name[] = "json_file_name";
static const char __pyx_k_last_five_dict[] = "last_five_dict";
static const char __pyx_k_linestyle_opts[] = "linestyle_opts";
static const char __pyx_k_load_json_file[] = "load_json_file";
static const char __pyx_k_make_mpf_style[] = "make_mpf_style";
static const char __pyx_k_markpoint_opts[] = "markpoint_opts";
static const char __pyx_k_max_price_date[] = "max_price_date";
static const char __pyx_k_min_price_date[] = "min_price_date";
static const char __pyx_k_new_stock_dict[] = "new_stock_dict";
static const char __pyx_k_outstand_share[] = "outstand_share";
static const char __pyx_k_pd_DataFrame_2[] = "pd.DataFrame()";
static const char __pyx_k_plotWaveUpRank[] = "plotWaveUpRank";
static const char __pyx_k_plottable_cmap[] = "plottable.cmap";
static const char __pyx_k_price_quantile[] = "price_quantile";
static const char __pyx_k_price_up_ratio[] = "price_up_ratio";
static const char __pyx_k_query_date_str[] = "query_date_str";
static const char __pyx_k_rate_hist_dict[] = "rate_hist_dict";
static const char __pyx_k_rate_hist_list[] = "rate_hist_list";
static const char __pyx_k_repeat_compute[] = "repeat_compute";
static const char __pyx_k_selectByMarket[] = "selectByMarket";
static const char __pyx_k_session_offset[] = "session_offset";
static const char __pyx_k_setStockDataDf[] = "setStockDataDf";
static const char __pyx_k_splitStockData[] = "splitStockData";
static const char __pyx_k_splitline_opts[] = "splitline_opts";
static const char __pyx_k_startWithDigit[] = "startWithDigit";
static const char __pyx_k_start_datetime[] = "start_datetime";
static const char __pyx_k_stock_query_df[] = "stock_query_df";
static const char __pyx_k_stock_tmp_dict[] = "stock_tmp_dict";
static const char __pyx_k_updateRateHist[] = "updateRateHist";
static const char __pyx_k_updatelog_json[] = "_updatelog.json";
static const char __pyx_k_Bollinger_Bands[] = "Bollinger Bands";
static const char __pyx_k_Union_Dict_None[] = "Union[Dict, None]";
static const char __pyx_k_Union_List_None[] = "Union[List, None]";
static const char __pyx_k_all_time_day_df[] = "all_time_day_df";
static const char __pyx_k_area_stock_list[] = "area_stock_list";
static const char __pyx_k_begin_to_create[] = ", begin to create.";
static const char __pyx_k_code_name_table[] = "code_name_table";
static const char __pyx_k_date_to_session[] = "date_to_session";
static const char __pyx_k_dependent_table[] = "dependent_table";
static const char __pyx_k_drop_duplicates[] = "drop_duplicates";
static const char __pyx_k_exclude_indexes[] = "exclude_indexes";
static const char __pyx_k_executable_path[] = "executable_path";
static const char __pyx_k_getOneWaveRatio[] = "getOneWaveRatio";
static const char __pyx_k_getStockLimitUp[] = "getStockLimitUp";
static const char __pyx_k_has_update_file[] = "has_update_file";
static const char __pyx_k_hot_index_table[] = "hot_index_table";
static const char __pyx_k_hot_stock_table[] = "hot_stock_table";
static const char __pyx_k_hot_table_month[] = "hot_table_month";
static const char __pyx_k_index_trade_day[] = "index_trade_day";
static const char __pyx_k_last_five_items[] = "last_five_items";
static const char __pyx_k_level_code_list[] = "level_code_list";
static const char __pyx_k_max_price_index[] = "max_price_index";
static const char __pyx_k_min_price_index[] = "min_price_index";
static const char __pyx_k_plotTablePandas[] = "_plotTablePandas";
static const char __pyx_k_price_amplitude[] = "price_amplitude";
static const char __pyx_k_publishStrategy[] = "publishStrategy";
static const char __pyx_k_quantile_tr_max[] = "quantile_tr_max";
static const char __pyx_k_quantile_tr_min[] = "quantile_tr_min";
static const char __pyx_k_selectByConcept[] = "selectByConcept";
static const char __pyx_k_setPlotTimeLock[] = "setPlotTimeLock";
static const char __pyx_k_set_global_opts[] = "set_global_opts";
static const char __pyx_k_stockTechInd_MA[] = "stockTechInd.MA";
static const char __pyx_k_stock_code_name[] = "stock_code_name";
static const char __pyx_k_stock_trade_day[] = "stock_trade_day";
static const char __pyx_k_stock_wave_down[] = "stock_wave_down";
static const char __pyx_k_sub_table_title[] = "sub_table_title";
static const char __pyx_k_table_save_path[] = "table_save_path";
static const char __pyx_k_tech_ind_method[] = "tech_ind_method";
static const char __pyx_k_top_10_up_limit[] = "top_10_up_limit";
static const char __pyx_k_1_2_3_4_finished[] = "\n    \350\265\204\351\207\221\351\235\242\351\200\211\350\202\241\357\274\232\n    1. \346\262\252\346\267\261\350\202\241\351\200\232\357\274\214\350\265\204\351\207\221\346\214\201\347\273\255\346\265\201\345\205\245\351\200\211\350\202\241\n    2. \350\236\215\350\265\204\350\236\215\345\210\270\357\274\214\350\236\215\350\265\204\346\214\201\347\273\255\346\265\201\345\205\245\351\200\211\350\202\241\n    3. \350\202\241\347\245\250\345\274\202\345\212\250\347\255\233\351\200\211\357\274\214\346\210\220\344\272\244\351\207\217\347\252\201\347\204\266\346\224\276\345\244\247\357\274\214\344\272\244\346\230\223\345\217\230\345\276\227\346\264\273\350\267\203\n    4. \350\202\241\347\245\250\346\257\217\346\227\245\346\210\220\344\272\244\351\242\235\347\255\233\351\200\211\357\274\214\345\211\224\351\231\244\346\257\217\346\227\245\346\210\220\344\272\244\351\242\235\350\276\203\345\260\217\347\232\204\350\202\241\347\245\250 finished\n    ";
static const char __pyx_k_CDL3STARSINSOUTH[] = "CDL3STARSINSOUTH";
static const char __pyx_k_all_time_week_df[] = "all_time_week_df";
static const char __pyx_k_amplitude_tr_max[] = "amplitude_tr_max";
static const char __pyx_k_amplitude_tr_min[] = "amplitude_tr_min";
static const char __pyx_k_column_name_list[] = "column_name_list";
static const char __pyx_k_day_info_firstly[] = " day info firstly.";
static const char __pyx_k_edge_driver_path[] = "edge_driver_path";
static const char __pyx_k_exclude_concepts[] = "exclude_concepts";
static const char __pyx_k_figure_save_name[] = "figure_save_name";
static const char __pyx_k_filter_dict_item[] = "filter_dict_item";
static const char __pyx_k_future_trade_day[] = "future_trade_day";
static const char __pyx_k_getIndexHotTable[] = "getIndexHotTable";
static const char __pyx_k_getStockHotTable[] = "getStockHotTable";
static const char __pyx_k_getStockProperty[] = "getStockProperty";
static const char __pyx_k_has_suspended_at[] = " has suspended at ";
static const char __pyx_k_hot_future_table[] = "hot_future_table";
static const char __pyx_k_isLowAmountStock[] = "isLowAmountStock";
static const char __pyx_k_is_fill_bg_color[] = "is_fill_bg_color";
static const char __pyx_k_is_get_max_level[] = "is_get_max_level";
static const char __pyx_k_kf_net_profit_tb[] = "kf_net_profit_tb";
static const char __pyx_k_latest_trade_day[] = "latest_trade_day";
static const char __pyx_k_listIntersection[] = "listIntersection";
static const char __pyx_k_load_json_file_2[] = "load_json_file = ";
static const char __pyx_k_overlap_bar_line[] = "overlap_bar_line";
static const char __pyx_k_plotTop10UpLimit[] = "plotTop10UpLimit";
static const char __pyx_k_plotWaveDownRank[] = "plotWaveDownRank";
static const char __pyx_k_previous_session[] = "previous_session";
static const char __pyx_k_price_down_ratio[] = "price_down_ratio";
static const char __pyx_k_publish_strategy[] = "publish_strategy";
static const char __pyx_k_pyecharts_charts[] = "pyecharts.charts";
static const char __pyx_k_pyecharts_render[] = "pyecharts.render";
static const char __pyx_k_selectByIndustry[] = "selectByIndustry";
static const char __pyx_k_selectByNameWord[] = "selectByNameWord";
static const char __pyx_k_spire_xls_common[] = "spire.xls.common";
static const char __pyx_k_stockTechInd_DMI[] = "stockTechInd.DMI";
static const char __pyx_k_stockTechInd_EMA[] = "stockTechInd.EMA";
static const char __pyx_k_stockTechInd_KDJ[] = "stockTechInd.KDJ";
static const char __pyx_k_stockTechInd_OBV[] = "stockTechInd.OBV";
static const char __pyx_k_stockTechInd_RSI[] = "stockTechInd.RSI";
static const char __pyx_k_stock_basic_info[] = "stock_basic_info";
static const char __pyx_k_stock_wave_up_df[] = "stock_wave_up_df";
static const char __pyx_k_strategy_data_df[] = "strategy_data_df";
static const char __pyx_k_strategylog_json[] = "_strategylog.json";
static const char __pyx_k_top_10_amplitude[] = "top_10_amplitude";
static const char __pyx_k_union_stock_list[] = "union_stock_list";
static const char __pyx_k_updateRateHist_2[] = "updateRateHist_";
static const char __pyx_k_update_hot_table[] = "update_hot_table";
static const char __pyx_k_CDL3WHITESOLDIERS[] = "CDL3WHITESOLDIERS";
static const char __pyx_k_all_time_month_df[] = "all_time_month_df";
static const char __pyx_k_average_amplitude[] = "average_amplitude";
static const char __pyx_k_axis_pointer_type[] = "axis_pointer_type";
static const char __pyx_k_day_hot_cold_dict[] = "day_hot_cold_dict";
static const char __pyx_k_delist_stock_dict[] = "delist_stock_dict";
static const char __pyx_k_first_uplimit_num[] = "first_uplimit_num";
static const char __pyx_k_getAllDelistStock[] = "getAllDelistStock";
static const char __pyx_k_getAreaStockCodes[] = "getAreaStockCodes";
static const char __pyx_k_getFutureHotTable[] = "getFutureHotTable";
static const char __pyx_k_has_strategy_file[] = "has_strategy_file";
static const char __pyx_k_hot_concept_table[] = "hot_concept_table";
static const char __pyx_k_intersection_list[] = "intersection_list";
static const char __pyx_k_make_marketcolors[] = "make_marketcolors";
static const char __pyx_k_marker_stock_list[] = "marker_stock_list";
static const char __pyx_k_matplotlib_pyplot[] = "matplotlib.pyplot";
static const char __pyx_k_negative_infinity[] = "negative_infinity";
static const char __pyx_k_plotHotColdTables[] = "_plotHotColdTables";
static const char __pyx_k_positive_infinity[] = "positive_infinity";
static const char __pyx_k_publishStrategy_2[] = "publishStrategy \344\270\215\345\217\257\345\272\217\345\210\227\345\214\226\347\232\204\345\261\236\346\200\247:";
static const char __pyx_k_pyecharts_globals[] = "pyecharts.globals";
static const char __pyx_k_selectByMarketCap[] = "selectByMarketCap";
static const char __pyx_k_snapshot_selenium[] = "snapshot_selenium";
static const char __pyx_k_stockTechInd_BOLL[] = "stockTechInd.BOLL";
static const char __pyx_k_stockTechInd_MACD[] = "stockTechInd.MACD";
static const char __pyx_k_stock_hold_number[] = "stock_hold_number";
static const char __pyx_k_stock_ladder_dict[] = "stock_ladder_dict";
static const char __pyx_k_stock_simple_info[] = "stock_simple_info";
static const char __pyx_k_strategy_img_path[] = "strategy_img_path";
static const char __pyx_k_strategy_key_name[] = "strategy_key_name";
static const char __pyx_k_sub_strategy_name[] = "sub_strategy_name";
static const char __pyx_k_test_select_stock[] = "test_select_stock";
static const char __pyx_k_update_range_dict[] = "update_range_dict";
static const char __pyx_k_use_date_previous[] = "use_date_previous";
static const char __pyx_k_wave_up_rank_list[] = "wave_up_rank_list";
static const char __pyx_k_ThreadPoolExecutor[] = "ThreadPoolExecutor";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_axes_unicode_minus[] = "axes.unicode_minus";
static const char __pyx_k_baseStrategy_reset[] = "baseStrategy.reset";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_column_definitions[] = "column_definitions";
static const char __pyx_k_concept_stock_list[] = "concept_stock_list";
static const char __pyx_k_concurrent_futures[] = "concurrent.futures";
static const char __pyx_k_cumulative_product[] = "cumulative_product";
static const char __pyx_k_getConceptHotTable[] = "getConceptHotTable";
static const char __pyx_k_getNameByTableCode[] = "getNameByTableCode";
static const char __pyx_k_getStockNameByCode[] = "getStockNameByCode";
static const char __pyx_k_getStockProperty_2[] = "getStockProperty_";
static const char __pyx_k_getStockSimpleInfo[] = "getStockSimpleInfo";
static const char __pyx_k_getSuspendedStocks[] = "getSuspendedStocks";
static const char __pyx_k_gross_profit_ratio[] = "gross_profit_ratio";
static const char __pyx_k_hot_industry_table[] = "hot_industry_table";
static const char __pyx_k_hot_table_day_name[] = "hot_table_day_name";
static const char __pyx_k_hot_table_near_day[] = "hot_table_near_day";
static const char __pyx_k_img_save_path_root[] = "img_save_path_root";
static const char __pyx_k_isWeekLastTradeDay[] = "isWeekLastTradeDay";
static const char __pyx_k_isYearLastTradeDay[] = "isYearLastTradeDay";
static const char __pyx_k_limit_up_code_list[] = "limit_up_code_list";
static const char __pyx_k_new_short_day_dict[] = "new_short_day_dict";
static const char __pyx_k_new_stock_thr_date[] = "new_stock_thr_date";
static const char __pyx_k_overlap_kline_line[] = "overlap_kline_line";
static const char __pyx_k_pacoSelectStrategy[] = "pacoSelectStrategy";
static const char __pyx_k_plotStrategyFigure[] = "plotStrategyFigure";
static const char __pyx_k_plotTop10Amplitude[] = "plotTop10Amplitude";
static const char __pyx_k_rate_hist_dict_len[] = "rate_hist_dict_len";
static const char __pyx_k_selectByKeyProduct[] = "selectByKeyProduct";
static const char __pyx_k_selectByStockPrice[] = "selectByStockPrice";
static const char __pyx_k_select_market_list[] = "select_market_list";
static const char __pyx_k_stockTechInd_MaAll[] = "stockTechInd.MaAll";
static const char __pyx_k_stockTechInd_WILLR[] = "stockTechInd.WILLR";
static const char __pyx_k_stock_trade_day_df[] = "stock_trade_day_df";
static const char __pyx_k_stock_wave_down_df[] = "stock_wave_down_df";
static const char __pyx_k_stock_wave_up_dict[] = "stock_wave_up_dict";
static const char __pyx_k_strategy_code_list[] = "strategy_code_list";
static const char __pyx_k_strategy_data_dict[] = "strategy_data_dict";
static const char __pyx_k_strategy_json_file[] = "strategy_json_file";
static const char __pyx_k_strategy_key_name1[] = "strategy_key_name1";
static const char __pyx_k_strategy_key_name2[] = "strategy_key_name2";
static const char __pyx_k_update_db_logs_dir[] = "update_db_logs_dir";
static const char __pyx_k_visualStock___init[] = "visualStock.__init__";
static const char __pyx_k_CDLRISEFALL3METHODS[] = "CDLRISEFALL3METHODS";
static const char __pyx_k_CDLXSIDEGAP3METHODS[] = "CDLXSIDEGAP3METHODS";
static const char __pyx_k_ProcessPoolExecutor[] = "ProcessPoolExecutor";
static const char __pyx_k_baseStrategy___init[] = "baseStrategy.__init__";
static const char __pyx_k_convertDictToPandas[] = "_convertDictToPandas";
static const char __pyx_k_data_simple_info_df[] = "data_simple_info_df";
static const char __pyx_k_getIndustryHotTable[] = "getIndustryHotTable";
static const char __pyx_k_getStockLadderTable[] = "getStockLadderTable";
static const char __pyx_k_getYearStartEndDate[] = "getYearStartEndDate";
static const char __pyx_k_hot_table_week_name[] = "hot_table_week_name";
static const char __pyx_k_hot_table_year_name[] = "hot_table_year_name";
static const char __pyx_k_industry_stock_list[] = "industry_stock_list";
static const char __pyx_k_isMonthLastTradeDay[] = "isMonthLastTradeDay";
static const char __pyx_k_name_up_limit_times[] = "name_up_limit_times";
static const char __pyx_k_query_stock_df_dict[] = "query_stock_df_dict";
static const char __pyx_k_setStrategyJsonFile[] = "setStrategyJsonFile";
static const char __pyx_k_stockTechInd___init[] = "stockTechInd.__init__";
static const char __pyx_k_stock_basic_info_df[] = "stock_basic_info_df";
static const char __pyx_k_stock_code_name_all[] = "stock_code_name_all";
static const char __pyx_k_stock_tmp_code_list[] = "stock_tmp_code_list";
static const char __pyx_k_stock_uplimt_ladder[] = "stock_uplimt_ladder";
static const char __pyx_k_table_save_png_path[] = "table_save_png_path";
static const char __pyx_k_update_day_hot_info[] = "update_day_hot_info";
static const char __pyx_k_capitalStockStrategy[] = "capitalStockStrategy";
static const char __pyx_k_cumprod_change_ratio[] = "cumprod_change_ratio";
static const char __pyx_k_day_hot_frequency_df[] = "day_hot_frequency_df";
static const char __pyx_k_getConceptStockCodes[] = "getConceptStockCodes";
static const char __pyx_k_hold_number_decrease[] = "hold_number_decrease";
static const char __pyx_k_hot_cold_index_table[] = "hot_cold_index_table";
static const char __pyx_k_hot_cold_stock_table[] = "hot_cold_stock_table";
static const char __pyx_k_hot_table_month_name[] = "hot_table_month_name";
static const char __pyx_k_intersect_stock_list[] = "intersect_stock_list";
static const char __pyx_k_need_database_tables[] = "need_database_tables";
static const char __pyx_k_select_market_cap_df[] = "select_market_cap_df";
static const char __pyx_k_stock_close_price_df[] = "stock_close_price_df";
static const char __pyx_k_stock_hold_num_table[] = "stock_hold_num_table";
static const char __pyx_k_stock_trade_day_2024[] = "stock_trade_day_2024";
static const char __pyx_k_stock_wave_down_dict[] = "stock_wave_down_dict";
static const char __pyx_k_strategy_data_dict_2[] = "strategy_data_dict_";
static const char __pyx_k_suspended_stock_list[] = "suspended_stock_list";
static const char __pyx_k_top_10_up_limit_dict[] = "top_10_up_limit_dict";
static const char __pyx_k_trade_day_table_name[] = "trade_day_table_name";
static const char __pyx_k_up_limit_stocks_list[] = "up_limit_stocks_list";
static const char __pyx_k_wave_up_ratio_record[] = "wave_up_ratio_record";
static const char __pyx_k_all_stock_simple_info[] = "all_stock_simple_info";
static const char __pyx_k_check_serializability[] = "check_serializability";
static const char __pyx_k_create_engine_session[] = "create_engine_session";
static const char __pyx_k_day_cold_frequency_df[] = "day_cold_frequency_df";
static const char __pyx_k_getAllHighAmountStock[] = "getAllHighAmountStock";
static const char __pyx_k_getIndustryStockCodes[] = "getIndustryStockCodes";
static const char __pyx_k_getStrategyDataAndImg[] = "getStrategyDataAndImg";
static const char __pyx_k_hot_cold_future_table[] = "hot_cold_future_table";
static const char __pyx_k_hot_concept_frequency[] = "hot_concept_frequency";
static const char __pyx_k_plotHotColdIndexTable[] = "plotHotColdIndexTable";
static const char __pyx_k_plotHotColdStockTable[] = "plotHotColdStockTable";
static const char __pyx_k_plotStockUplimtLadder[] = "plotStockUplimtLadder";
static const char __pyx_k_publishStrategy_reset[] = "publishStrategy.reset";
static const char __pyx_k_quantile_amplitude_tr[] = "quantile_amplitude_tr";
static const char __pyx_k_selectByTechIndicator[] = "selectByTechIndicator";
static const char __pyx_k_table_save_excel_path[] = "table_save_excel_path";
static const char __pyx_k_top_10_amplitude_dict[] = "top_10_amplitude_dict";
static const char __pyx_k_updated_database_file[] = "updated_database_file";
static const char __pyx_k_visualStock_plotKline[] = "visualStock.plotKline";
static const char __pyx_k_baseStrategy_isStStock[] = "baseStrategy.isStStock";
static const char __pyx_k_baseStrategy_isUpLimit[] = "baseStrategy.isUpLimit";
static const char __pyx_k_baseStrategy_listUnion[] = "baseStrategy.listUnion";
static const char __pyx_k_financialStockStrategy[] = "financialStockStrategy";
static const char __pyx_k_getStockTradeDayInfoFq[] = "getStockTradeDayInfoFq";
static const char __pyx_k_getStockWavePriceRatio[] = "getStockWavePriceRatio";
static const char __pyx_k_high_amount_stock_list[] = "high_amount_stock_list";
static const char __pyx_k_hot_cold_concept_table[] = "hot_cold_concept_table";
static const char __pyx_k_hot_industry_frequency[] = "hot_industry_frequency";
static const char __pyx_k_loadTableContentByDate[] = "loadTableContentByDate";
static const char __pyx_k_new_datetime_threshold[] = "new_datetime_threshold";
static const char __pyx_k_non_serializable_attrs[] = "non_serializable_attrs";
static const char __pyx_k_plotHoldNumberDecrease[] = "plotHoldNumberDecrease";
static const char __pyx_k_plotHotColdFutureTable[] = "plotHotColdFutureTable";
static const char __pyx_k_publishStrategy___init[] = "publishStrategy.__init__";
static const char __pyx_k_rely_strategy_key_name[] = "rely_strategy_key_name";
static const char __pyx_k_stockTechInd_CDL2CROWS[] = "stockTechInd.CDL2CROWS";
static const char __pyx_k_stockTechInd_CDLHAMMER[] = "stockTechInd.CDLHAMMER";
static const char __pyx_k_stockTechInd_CDLHARAMI[] = "stockTechInd.CDLHARAMI";
static const char __pyx_k_stock_financial_report[] = "stock_financial_report";
static const char __pyx_k_table_has_been_updated[] = "  table has been updated.";
static const char __pyx_k_technicalStockStrategy[] = "technicalStockStrategy";
static const char __pyx_k_today_condition_amount[] = "today_condition_amount";
static const char __pyx_k_trade_distribution_len[] = "trade_distribution_len";
static const char __pyx_k_visualStock__saveToImg[] = "visualStock._saveToImg";
static const char __pyx_k_wave_down_ratio_record[] = "wave_down_ratio_record";
static const char __pyx_k_Moving_average_MA_lines[] = "Moving average(MA) lines";
static const char __pyx_k_Need_to_update_strategy[] = "Need to update strategy ";
static const char __pyx_k_baseStrategy___getstate[] = "baseStrategy.__getstate__";
static const char __pyx_k_baseStrategy___setstate[] = "baseStrategy.__setstate__";
static const char __pyx_k_baseStrategy_isNewStock[] = "baseStrategy.isNewStock";
static const char __pyx_k_cant_get_stock_name_for[] = "cant get stock name for ";
static const char __pyx_k_getStockByFinancialData[] = "getStockByFinancialData";
static const char __pyx_k_getStockByTechIndicator[] = "getStockByTechIndicator";
static const char __pyx_k_hot_cold_industry_table[] = "hot_cold_industry_table";
static const char __pyx_k_plotHotColdConceptTable[] = "plotHotColdConceptTable";
static const char __pyx_k_pyecharts_commons_utils[] = "pyecharts.commons.utils";
static const char __pyx_k_stockTechInd_CDL3INSIDE[] = "stockTechInd.CDL3INSIDE";
static const char __pyx_k_stock_concept_trade_day[] = "stock_concept_trade_day";
static const char __pyx_k_stock_financial_quarter[] = "stock_financial_quarter";
static const char __pyx_k_trade_distribution_code[] = "trade_distribution_code";
static const char __pyx_k_visualStock_closeDriver[] = "visualStock.closeDriver";
static const char __pyx_k_baseStrategy_isDownLimit[] = "baseStrategy.isDownLimit";
static const char __pyx_k_checkDatabaseTableUpdate[] = "checkDatabaseTableUpdate";
static const char __pyx_k_fundamentalStockStrategy[] = "fundamentalStockStrategy";
static const char __pyx_k_getPotentialConceptStock[] = "getPotentialConceptStock";
static const char __pyx_k_plotHotColdIndustryTable[] = "plotHotColdIndustryTable";
static const char __pyx_k_plotTradeDistributionLen[] = "plotTradeDistributionLen";
static const char __pyx_k_stockSingleStockProperty[] = "stockSingleStockProperty";
static const char __pyx_k_stockTechInd_CDLPIERCING[] = "stockTechInd.CDLPIERCING";
static const char __pyx_k_stock_concept_basic_info[] = "stock_concept_basic_info";
static const char __pyx_k_stock_industry_trade_day[] = "stock_industry_trade_day";
static const char __pyx_k_table_has_been_updated_2[] = " table has been updated.";
static const char __pyx_k_total_operate_revenue_tb[] = "total_operate_revenue_tb";
static const char __pyx_k_update_strategy_logs_dir[] = "update_strategy_logs_dir";
static const char __pyx_k_visualStock_getWebDriver[] = "visualStock.getWebDriver";
static const char __pyx_k_visualStock_plotKlineMpl[] = "visualStock.plotKlineMpl";
static const char __pyx_k_data_must_be_a_dictionary[] = "data must be a dictionary";
static const char __pyx_k_day_hot_cold_frequency_df[] = "day_hot_cold_frequency_df";
static const char __pyx_k_getPotentialIndustryStock[] = "getPotentialIndustryStock";
static const char __pyx_k_getStrategyDataAndImg_new[] = "getStrategyDataAndImg_new";
static const char __pyx_k_getTradeDistributionTable[] = "getTradeDistributionTable";
static const char __pyx_k_pacoSelectStrategy___init[] = "pacoSelectStrategy.__init__";
static const char __pyx_k_stockTechInd_CDLENGULFING[] = "stockTechInd.CDLENGULFING";
static const char __pyx_k_stock_industry_basic_info[] = "stock_industry_basic_info";
static const char __pyx_k_stock_up_limit_list_today[] = "stock_up_limit_list_today";
static const char __pyx_k_baseStrategy_getAllStStock[] = "baseStrategy.getAllStStock";
static const char __pyx_k_baseStrategy_isDelistStock[] = "baseStrategy.isDelistStock";
static const char __pyx_k_baseStrategy_strategyCount[] = "baseStrategy.strategyCount";
static const char __pyx_k_financial_report_selection[] = "financial_report_selection";
static const char __pyx_k_getStockMultiFinancialData[] = "getStockMultiFinancialData";
static const char __pyx_k_selectByStockPriceQuantile[] = "selectByStockPriceQuantile";
static const char __pyx_k_stockTechInd_setFigureShow[] = "stockTechInd.setFigureShow";
static const char __pyx_k_table_has_not_been_updated[] = " table has not been updated.";
static const char __pyx_k_visualStock_drawKlineChart[] = "visualStock.drawKlineChart";
static const char __pyx_k_visualStock_dumpJsonToFile[] = "visualStock.dumpJsonToFile";
static const char __pyx_k_visualStock_plotWaveUpRank[] = "visualStock.plotWaveUpRank";
static const char __pyx_k_visualStock_splitStockData[] = "visualStock.splitStockData";
static const char __pyx_k_baseStrategy_dumpJsonToFile[] = "baseStrategy.dumpJsonToFile";
static const char __pyx_k_baseStrategy_getAllNewStock[] = "baseStrategy.getAllNewStock";
static const char __pyx_k_capitalStockStrategy___init[] = "capitalStockStrategy.__init__";
static const char __pyx_k_day_hot_cold_frequency_dict[] = "day_hot_cold_frequency_dict";
static const char __pyx_k_financial_quarter_selection[] = "financial_quarter_selection";
static const char __pyx_k_getSingleStockPriceQuantile[] = "getSingleStockPriceQuantile";
static const char __pyx_k_stockTechInd_CDLMORNINGSTAR[] = "stockTechInd.CDLMORNINGSTAR";
static const char __pyx_k_stockTechInd_setStockDataDf[] = "stockTechInd.setStockDataDf";
static const char __pyx_k_stock_ladder_dict_yesterday[] = "stock_ladder_dict_yesterday";
static const char __pyx_k_trade_distribution_len_html[] = "trade_distribution_len.html";
static const char __pyx_k_visualStock_setPlotTimeLock[] = "visualStock.setPlotTimeLock";
static const char __pyx_k_getSingleStockWavePriceRatio[] = "getSingleStockWavePriceRatio";
static const char __pyx_k_select_market_cap_stock_list[] = "select_market_cap_stock_list";
static const char __pyx_k_visualStock__plotTablePandas[] = "visualStock._plotTablePandas";
static const char __pyx_k_visualStock_plotTop10UpLimit[] = "visualStock.plotTop10UpLimit";
static const char __pyx_k_visualStock_plotWaveDownRank[] = "visualStock.plotWaveDownRank";
static const char __pyx_k_Need_to_update_database_table[] = "Need to update database table ";
static const char __pyx_k_Strategy_figure_has_generated[] = "Strategy figure has generated.";
static const char __pyx_k_baseStrategy_listIntersection[] = "baseStrategy.listIntersection";
static const char __pyx_k_financialStockStrategy___init[] = "financialStockStrategy.__init__";
static const char __pyx_k_getStockHoldNumberChangeTable[] = "getStockHoldNumberChangeTable";
static const char __pyx_k_intersect_stock_list_is_empty[] = "intersect_stock_list is empty";
static const char __pyx_k_stockTechInd_CDL3STARSINSOUTH[] = "stockTechInd.CDL3STARSINSOUTH";
static const char __pyx_k_technicalStockStrategy___init[] = "technicalStockStrategy.__init__";
static const char __pyx_k_baseStrategy_getAllDelistStock[] = "baseStrategy.getAllDelistStock";
static const char __pyx_k_getIndustryConceptHotFrequency[] = "getIndustryConceptHotFrequency";
static const char __pyx_k_getStockTradeDayInfoSqlalchemy[] = "getStockTradeDayInfoSqlalchemy";
static const char __pyx_k_multi_type_parameter_set_wrong[] = "multi_type parameter set wrong.";
static const char __pyx_k_pre_close_equal_zero_when_date[] = " pre_close equal zero when date = ";
static const char __pyx_k_stockTechInd_CDL3WHITESOLDIERS[] = "stockTechInd.CDL3WHITESOLDIERS";
static const char __pyx_k_tbstock_dataAcquisition_models[] = "tbstock.dataAcquisition.models";
static const char __pyx_k_visualStock__plotHotColdTables[] = "visualStock._plotHotColdTables";
static const char __pyx_k_visualStock_plotStrategyFigure[] = "visualStock.plotStrategyFigure";
static const char __pyx_k_visualStock_plotTop10Amplitude[] = "visualStock.plotTop10Amplitude";
static const char __pyx_k_1_2_3_4_quarter_finished_4_repo[] = "\n    \350\264\242\345\212\241\351\235\242\351\200\211\350\202\241\357\274\232\n    1. \346\240\271\346\215\256\350\220\245\344\270\232\346\224\266\345\205\245\343\200\201\345\207\200\345\210\251\346\266\246\345\220\214\346\257\224\347\216\257\346\257\224\346\216\222\345\220\215\351\200\211\350\202\241\n    2. \346\240\271\346\215\256\350\264\237\345\200\272\347\216\207\343\200\201\346\265\201\345\212\250\346\257\224\347\216\207\343\200\201\351\200\237\345\212\250\346\257\224\347\216\207\351\200\211\350\202\241\n    3. \346\240\271\346\215\256\345\210\206\347\272\242\350\202\241\346\201\257\347\216\207\351\200\211\350\202\241\n    4. \351\200\211\345\217\226\345\233\272\345\256\232\346\212\245\345\221\212\346\234\237quarter\357\274\214\347\254\246\345\220\210\346\214\207\345\256\232\350\264\242\345\212\241\346\225\260\346\215\256\350\214\203\345\233\264\347\232\204\345\205\250\351\203\250\350\202\241\347\245\250 finished\n    4. \351\200\211\345\217\226\345\233\272\345\256\232\346\212\245\345\221\212\346\234\237report\357\274\214\347\254\246\345\220\210\346\214\207\345\256\232\350\264\242\345\212\241\346\225\260\346\215\256\350\214\203\345\233\264\347\232\204\345\205\250\351\203\250\350\202\241\347\245\250 finished\n    5. \351\200\211\345\217\226\350\277\236\347\273\255\345\207\240\344\270\252\345\255\243\345\272\246\357\274\214\347\254\246\345\220\210\346\214\207\345\256\232\350\264\242\345\212\241\346\225\260\346\215\256\350\214\203\345\233\264\347\232\204\345\205\250\351\203\250\350\202\241\347\245\250\n    ";
static const char __pyx_k_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI[] = "\n    \346\212\200\346\234\257\351\235\242\351\200\211\350\202\241\357\274\232\n    1. K\347\272\277\347\273\204\345\220\210\345\275\242\346\200\201\351\200\211\350\202\241\n    2. \345\275\223\345\211\215\344\273\267\346\240\274\345\222\214\345\235\207\347\272\277\347\263\273\347\273\237\345\205\263\347\263\273\351\200\211\350\202\241\n    3. \351\207\217\344\273\267\347\273\204\345\220\210\351\200\211\350\202\241\n    4. \346\212\200\346\234\257\346\214\207\346\240\207\351\200\211\350\202\241MACD\\KDJ\\RSI\\BOLL\\BBI\347\255\211\n    ";
static const char __pyx_k_1_finished_2_finished_3_finishe[] = "\n    \345\237\272\347\241\200\351\235\242\351\200\211\350\202\241\357\274\232\n    1. \346\240\271\346\215\256\350\202\241\347\245\250\345\220\215\347\247\260\351\200\211\350\202\241 finished\n    2. \346\240\271\346\215\256\350\202\241\347\245\250\347\232\204\344\270\273\350\220\245\344\270\232\345\212\241\345\222\214\344\270\273\350\246\201\344\272\247\345\223\201\351\200\211\350\202\241 finished\n    3. \346\265\201\351\200\232\345\270\202\345\200\274\351\200\211\350\202\241 finished\n    4. \350\202\241\347\245\250\350\241\214\344\270\232\343\200\201\346\246\202\345\277\265\343\200\201\345\234\260\345\214\272\351\200\211\350\202\241 finished\n    5. \350\202\241\344\270\234\344\272\272\346\225\260\351\200\211\350\202\241 finished\n    6. \346\234\237\350\264\247\350\202\241\347\245\250\350\201\224\345\212\250\351\200\211\350\202\241 finished\n    7. \346\265\267\345\244\226\350\202\241\347\245\250\350\201\224\345\212\250\351\200\211\350\202\241\n    8. \346\240\271\346\215\256\344\272\244\346\230\223\346\211\200\351\200\211\350\202\241\357\274\214\346\262\252\346\267\261\344\270\273\346\235\277\343\200\201\345\210\233\344\270\232\346\235\277\343\200\201\347\247\221\345\210\233\346\235\277\343\200\201\345\214\227\344\272\244\346\211\200 finished\n    10.\346\240\271\346\215\256\350\202\241\347\245\250\344\273\267\346\240\274\351\200\211\350\202\241 finished\n    11.\346\240\271\346\215\256\350\202\241\347\245\250\346\234\200\350\277\221x\344\270\252\344\272\244\346\230\223\346\227\245\347\232\204\346\214\257\345\271\205\344\273\245\345\217\212\345\275\223\345\211\215\350\202\241\344\273\267\345\210\206\344\275\215\346\225\260\351\200\211\350\202\241 finished\n    ";
static const char __pyx_k_1_x_finished_x_finished_x_finis[] = "\n    \347\275\221\347\273\234\345\217\221\345\270\203\347\255\226\347\225\245\357\274\232\345\270\202\345\234\272\346\203\205\345\206\265\350\241\250\n\n    1. \350\202\241\346\200\247\357\274\232\350\277\221\346\234\237\346\266\250\345\201\234\346\254\241\346\225\260\357\274\214\346\214\257\345\271\205\350\241\250\357\274\214\346\234\200\345\244\247\346\266\250\350\267\214\345\271\205\350\241\250\n        - \346\234\200\350\277\221x\344\270\252\344\272\244\346\230\223\346\227\245\347\232\204\346\266\250\345\201\234\346\254\241\346\225\260\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\344\270\252\344\272\244\346\230\223\346\227\245\347\232\204\345\271\263\345\235\207\346\214\257\345\271\205\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\344\270\252\344\272\244\346\230\223\346\227\245\346\263\242\346\256\265\346\266\250\345\271\205\350\267\214\345\271\205\346\216\222\345\220\215\350\241\250 finished\n    2. \346\257\217\346\227\245\344\272\244\346\230\223\346\203\205\345\206\265\350\241\250 finished\n        - \346\257\217\344\270\252\346\266\250\350\267\214\345\214\272\351\227\264\347\232\204\350\202\241\347\245\250\346\225\260\351\207\217\n        - \346\257\217\346\227\245\346\266\250\345\201\234\345\222\214\350\247\246\345\217\212\346\266\250\345\201\234\350\202\241\347\245\250\345\210\206\346\236\220\357\274\210\346\230\257\345\220\246\351\246\226\346\235\277\357\274\214\346\266\250\345\201\234\350\202\241\347\245\250\350\241\214\344\270\232\357\274\214\345\270\202\345\200\274\345\210\206\346\236\220\357\274\214\347\202\270\346\235\277\347\216\207\345\210\206\346\236\220\357\274\211\n    3. \350\202\241\347\245\250\350\277\236\346\235\277\350\241\250 finished\n        - \350\277\236\347\273\255\346\266\250\345\201\234\350\202\241\347\245\250\350\241\250\357\274\210\345\217\215\346\230\240\345\270\202\345\234\272\344\270\212\346\266\250\346\260\224\346\260\233\357\274\211\n    4. \350\202""\241\344\270\234\346\210\267\346\225\260\350\241\250 finished\n        - \350\202\241\344\270\234\344\272\272\346\225\260\351\231\215\345\271\205\350\241\250\357\274\210\345\211\21510\347\232\204\350\202\241\347\245\250\357\274\211\357\274\214\351\231\204\345\270\246\346\234\200\346\226\260\350\202\241\344\270\234\344\272\272\346\225\260\346\233\264\346\226\260\346\227\245\346\234\237\357\274\214\344\272\272\345\235\207\346\214\201\350\202\241\351\207\221\351\242\235\n        - \350\202\241\344\270\234\344\272\272\346\225\260\345\234\250\346\234\200\350\277\221x\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\345\275\223\345\211\215\350\202\241\344\270\234\344\272\272\346\225\260\347\232\204\344\275\215\347\275\256\345\210\206\344\275\215\346\225\260\n    5. \350\241\214\344\270\232\346\235\277\345\235\227\350\275\256\345\212\250\350\241\250\n        - \345\275\223\345\211\215near_x\345\244\251, \347\203\255\347\202\271\346\235\277\345\235\227\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\235\277\345\235\227\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\244\251, \347\203\255\347\202\271\346\235\277\345\235\227\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\235\277\345\235\227\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\221\250, \347\203\255\347\202\271\346\235\277\345\235\227\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\235\277\345\235\227\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\346\234\210, \347\203\255\347\202\271\346\235\277\345\235\227\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\235\277\345\235\227\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\346\234\210\346\234\200\345\220\216""\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\345\244\251, \346\211\200\346\234\211\347\203\255\347\202\271\346\235\277\345\235\227\345\207\272\347\216\260\347\232\204\346\200\273\351\242\221\346\254\241\343\200\201\346\200\273\346\266\250\345\271\205\350\241\250 finished\n    6. \346\246\202\345\277\265\346\235\277\345\235\227\350\275\256\345\212\250\350\241\250\n        - \345\275\223\345\211\215near_x\345\244\251, \347\203\255\347\202\271\346\246\202\345\277\265\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\246\202\345\277\265\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\244\251, \347\203\255\347\202\271\346\246\202\345\277\265\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\246\202\345\277\265\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\221\250, \347\203\255\347\202\271\346\246\202\345\277\265\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\246\202\345\277\265\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\346\234\210, \347\203\255\347\202\271\346\246\202\345\277\265\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\246\202\345\277\265\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\346\234\210\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\345\244\251, \346\211\200\346\234\211\347\203\255\347\202\271\346\246\202\345\277\265\345\207\272\347\216\260\347\232\204\346\200\273\351\242\221\346\254\241\343\200\201\346\200\273\346\266\250\345\271\205\350\241\250 finished\n    7. \344\270\252\350\202\241\350\275\256\345\212\250\350\241\250\n        - ""\346\234\200\350\277\221near_x\345\244\251, \347\203\255\347\202\271\350\202\241\347\245\250\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\350\202\241\347\245\250\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\221\250, \347\203\255\347\202\271\350\202\241\347\245\250\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\350\202\241\347\245\250\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\346\234\210, \347\203\255\347\202\271\350\202\241\347\245\250\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\350\202\241\347\245\250\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\346\234\210\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n    8. \346\214\207\346\225\260\350\275\256\345\212\250\350\241\250\n        - \346\234\200\350\277\221near_x\345\244\251, \347\203\255\347\202\271\346\214\207\346\225\260\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\214\207\346\225\260\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\221\250, \347\203\255\347\202\271\346\214\207\346\225\260\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\214\207\346\225\260\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\346\234\210, \347\203\255\347\202\271\346\214\207\346\225\260\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\214\207\346\225\260\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\346\234\210\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finishe""d\n    9. \346\234\237\350\264\247\350\275\256\345\212\250\350\241\250\n        - \346\234\200\350\277\221near_x\345\244\251, \347\203\255\347\202\271\346\234\237\350\264\247\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\234\237\350\264\247\357\274\211\346\216\222\345\220\215\350\241\250 finished\n        - \346\234\200\350\277\221x\345\221\250, \347\203\255\347\202\271\346\234\237\350\264\247\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\234\237\350\264\247\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n        - \346\234\200\350\277\221x\346\234\210, \347\203\255\347\202\271\346\234\237\350\264\247\357\274\210\346\266\250\345\271\205\345\211\215x\347\232\204\346\234\237\350\264\247\357\274\211\346\216\222\345\220\215\350\241\250, \346\257\217\346\234\210\346\234\200\345\220\216\344\270\200\344\270\252\346\227\245\346\234\237\346\233\264\346\226\260 finished\n    ";
static const char __pyx_k_Cant_getStockTradeDayInfoFq_for[] = "Cant getStockTradeDayInfoFq for all stocks between ";
static const char __pyx_k_baseStrategy_getStockNameByCode[] = "baseStrategy.getStockNameByCode";
static const char __pyx_k_failed_to_getStockTradeDayInfoF[] = " failed to getStockTradeDayInfoFq.";
static const char __pyx_k_failed_to_getStockTradeDayInfoS[] = " failed to getStockTradeDayInfoSqlalchemy.";
static const char __pyx_k_function_params_if_params_dataI[] = "\n                function (params) {\n                    if (params.dataIndex < 5) \n                        return '#006400';\n                    else if (params.dataIndex == 5) \n                        return 'gray';\n                    else return '#8B0000';\n                }\n                ";
static const char __pyx_k_function_params_var_colorList_i[] = "\n                        function(params) {\n                            var colorList;\n                            if (barData[params.dataIndex][1] > barData[params.dataIndex][0]) {\n                                colorList = '#ef232a';\n                            } else {\n                                colorList = '#14b143';\n                            }\n                            return colorList;\n                        }\n                        ";
static const char __pyx_k_fundamentalStockStrategy___init[] = "fundamentalStockStrategy.__init__";
static const char __pyx_k_getPotentialLimitUpStockNearDay[] = "getPotentialLimitUpStockNearDay";
static const char __pyx_k_judgeSingleStockByTechIndicator[] = "judgeSingleStockByTechIndicator";
static const char __pyx_k_publishStrategy__getStockLadder[] = "_publishStrategy__getStockLadder";
static const char __pyx_k_selenium_webdriver_edge_options[] = "selenium.webdriver.edge.options";
static const char __pyx_k_selenium_webdriver_edge_service[] = "selenium.webdriver.edge.service";
static const char __pyx_k_visualStock_setStrategyJsonFile[] = "visualStock.setStrategyJsonFile";
static const char __pyx_k_Exponential_Moving_Average_EMA_l[] = "Exponential Moving Average(EMA) lines";
static const char __pyx_k_Failed_to_getStockTradeDayInfoSq[] = "Failed to getStockTradeDayInfoSqlalchemy between ";
static const char __pyx_k_baseStrategy_checkDatabaseTableU[] = "baseStrategy.checkDatabaseTableUpdate";
static const char __pyx_k_capitalStockStrategy_getAllHighA[] = "capitalStockStrategy.getAllHighAmountStock";
static const char __pyx_k_capitalStockStrategy_isLowAmount[] = "capitalStockStrategy.isLowAmountStock";
static const char __pyx_k_filter_dict_report_date_should_b[] = "filter_dict['report_date'] should be a list.";
static const char __pyx_k_filter_dict_report_date_should_n[] = "filter_dict['report_date'] should not be a list.";
static const char __pyx_k_financialStockStrategy_getStockB[] = "financialStockStrategy.getStockByFinancialData";
static const char __pyx_k_financialStockStrategy_getStockM[] = "financialStockStrategy.getStockMultiFinancialData";
static const char __pyx_k_fundamentalStockStrategy_getSing[] = "fundamentalStockStrategy.getSingleStockPriceQuantile";
static const char __pyx_k_fundamentalStockStrategy_selectB[] = "fundamentalStockStrategy.selectByMarketCap.<locals>.<lambda>";
static const char __pyx_k_getSingleStockWavePriceRatio_tim[] = "getSingleStockWavePriceRatio time cost = ";
static const char __pyx_k_getStockMultiFinancialData_quart[] = "getStockMultiFinancialData quarter: ";
static const char __pyx_k_getTradeDayChangeRankBetweenDate[] = "getTradeDayChangeRankBetweenDate";
static const char __pyx_k_mode_must_switch_in_industry_con[] = "mode must switch in ['industry','concept']";
static const char __pyx_k_pacoSelectStrategy_getPotentialC[] = "pacoSelectStrategy.getPotentialConceptStock";
static const char __pyx_k_pacoSelectStrategy_getPotentialI[] = "pacoSelectStrategy.getPotentialIndustryStock";
static const char __pyx_k_pacoSelectStrategy_getPotentialL[] = "pacoSelectStrategy.getPotentialLimitUpStockNearDay";
static const char __pyx_k_plotHotColdIndustryConceptFreque[] = "plotHotColdIndustryConceptFrequency";
static const char __pyx_k_publishStrategy___getStockLadder[] = "publishStrategy.__getStockLadder";
static const char __pyx_k_publishStrategy_getConceptHotTab[] = "publishStrategy.getConceptHotTable";
static const char __pyx_k_publishStrategy_getFutureHotTabl[] = "publishStrategy.getFutureHotTable";
static const char __pyx_k_publishStrategy_getIndexHotTable[] = "publishStrategy.getIndexHotTable";
static const char __pyx_k_publishStrategy_getIndustryConce[] = "publishStrategy.getIndustryConceptHotFrequency";
static const char __pyx_k_publishStrategy_getIndustryHotTa[] = "publishStrategy.getIndustryHotTable";
static const char __pyx_k_publishStrategy_getSingleStockWa[] = "publishStrategy.getSingleStockWavePriceRatio.<locals>.getOneWaveRatio";
static const char __pyx_k_publishStrategy_getStockHoldNumb[] = "publishStrategy.getStockHoldNumberChangeTable.<locals>.<lambda>";
static const char __pyx_k_publishStrategy_getStockHotTable[] = "publishStrategy.getStockHotTable";
static const char __pyx_k_publishStrategy_getStockLadderTa[] = "publishStrategy.getStockLadderTable";
static const char __pyx_k_publishStrategy_getStockProperty[] = "publishStrategy.getStockProperty_.<locals>.<lambda>";
static const char __pyx_k_publishStrategy_getStockWavePric[] = "publishStrategy.getStockWavePriceRatio.<locals>.<lambda>";
static const char __pyx_k_publishStrategy_getStrategyDataA[] = "publishStrategy.getStrategyDataAndImg";
static const char __pyx_k_publishStrategy_getTradeDayChang[] = "publishStrategy.getTradeDayChangeRankBetweenDate.<locals>.cumulative_product";
static const char __pyx_k_publishStrategy_getTradeDistribu[] = "publishStrategy.getTradeDistributionTable.<locals>.updateRateHist";
static const char __pyx_k_publishStrategy_stockSingleStock[] = "publishStrategy.stockSingleStockProperty.<locals>.<lambda>";
static const char __pyx_k_publishStrategy_update_hot_table[] = "publishStrategy.update_hot_table";
static const char __pyx_k_stockTechInd_CDLRISEFALL3METHODS[] = "stockTechInd.CDLRISEFALL3METHODS";
static const char __pyx_k_stockTechInd_CDLXSIDEGAP3METHODS[] = "stockTechInd.CDLXSIDEGAP3METHODS";
static const char __pyx_k_tbstock_dataManagement_dataPrepr[] = "tbstock.dataManagement.dataPreprocess";
static const char __pyx_k_tbstock_tradeStrategy_stockStrat[] = "tbstock.tradeStrategy.stockStrategy";
static const char __pyx_k_technicalStockStrategy_getStockB[] = "technicalStockStrategy.getStockByTechIndicator";
static const char __pyx_k_technicalStockStrategy_judgeSing[] = "technicalStockStrategy.judgeSingleStockByTechIndicator";
static const char __pyx_k_technicalStockStrategy_selectByT[] = "technicalStockStrategy.selectByTechIndicator";
static const char __pyx_k_visualStock__convertDictToPandas[] = "visualStock._convertDictToPandas";
static const char __pyx_k_visualStock_plotHoldNumberDecrea[] = "visualStock.plotHoldNumberDecrease";
static const char __pyx_k_visualStock_plotHotColdConceptTa[] = "visualStock.plotHotColdConceptTable";
static const char __pyx_k_visualStock_plotHotColdFutureTab[] = "visualStock.plotHotColdFutureTable";
static const char __pyx_k_visualStock_plotHotColdIndexTabl[] = "visualStock.plotHotColdIndexTable";
static const char __pyx_k_visualStock_plotHotColdIndustryC[] = "visualStock.plotHotColdIndustryConceptFrequency";
static const char __pyx_k_visualStock_plotHotColdIndustryT[] = "visualStock.plotHotColdIndustryTable";
static const char __pyx_k_visualStock_plotHotColdStockTabl[] = "visualStock.plotHotColdStockTable";
static const char __pyx_k_visualStock_plotStockUplimtLadde[] = "visualStock.plotStockUplimtLadder";
static const char __pyx_k_visualStock_plotTradeDistributio[] = "visualStock.plotTradeDistributionLen";
static const char __pyx_k_Cant_getStockTradeDayInfoFq_for_2[] = "Cant getStockTradeDayInfoFq for stock ";
static const char __pyx_k_failed_to_getStockTradeDayInfoF_2[] = ": failed to getStockTradeDayInfoFq.";
static const char __pyx_k_function_params_var_colorList_i_2[] = "\n                        function(params) {\n                            var colorList;\n                            if (params.data >= 0) {\n                              colorList = '#ef232a';\n                            } else {\n                              colorList = '#14b143';\n                            }\n                            return colorList;\n                        }\n                        ";
static const char __pyx_k_fundamentalStockStrategy_selectB_2[] = "fundamentalStockStrategy.selectByMarket.<locals>.select_code";
static const char __pyx_k_fundamentalStockStrategy_selectB_3[] = "fundamentalStockStrategy.selectByStockPrice.<locals>.<lambda>";
static const char __pyx_k_fundamentalStockStrategy_selectB_4[] = "fundamentalStockStrategy.selectByMarketCap";
static const char __pyx_k_fundamentalStockStrategy_selectB_5[] = "fundamentalStockStrategy.selectByKeyProduct";
static const char __pyx_k_fundamentalStockStrategy_selectB_6[] = "fundamentalStockStrategy.selectByNameWord";
static const char __pyx_k_fundamentalStockStrategy_selectB_7[] = "fundamentalStockStrategy.selectByArea";
static const char __pyx_k_fundamentalStockStrategy_selectB_8[] = "fundamentalStockStrategy.selectByIndustry";
static const char __pyx_k_fundamentalStockStrategy_selectB_9[] = "fundamentalStockStrategy.selectByConcept";
static const char __pyx_k_publishStrategy_getSingleStockWa_2[] = "publishStrategy.getSingleStockWavePriceRatio.<locals>.<lambda>";
static const char __pyx_k_publishStrategy_getSingleStockWa_3[] = "publishStrategy.getSingleStockWavePriceRatio";
static const char __pyx_k_publishStrategy_getStockHoldNumb_2[] = "publishStrategy.getStockHoldNumberChangeTable";
static const char __pyx_k_publishStrategy_getStockProperty_2[] = "publishStrategy.getStockProperty_";
static const char __pyx_k_publishStrategy_getStockProperty_3[] = "publishStrategy.getStockProperty";
static const char __pyx_k_publishStrategy_getStockWavePric_2[] = "publishStrategy.getStockWavePriceRatio";
static const char __pyx_k_publishStrategy_getTradeDayChang_2[] = "publishStrategy.getTradeDayChangeRankBetweenDate";
static const char __pyx_k_publishStrategy_getTradeDistribu_2[] = "publishStrategy.getTradeDistributionTable.<locals>.updateRateHist_";
static const char __pyx_k_publishStrategy_getTradeDistribu_3[] = "publishStrategy.getTradeDistributionTable";
static const char __pyx_k_publishStrategy_stockSingleStock_2[] = "publishStrategy.stockSingleStockProperty";
static const char __pyx_k_tbstock_tradeStrategy_stockStrat_2[] = "tbstock/tradeStrategy/stockStrategy.py";
static const char __pyx_k_fundamentalStockStrategy_selectB_10[] = "fundamentalStockStrategy.selectByMarket";
static const char __pyx_k_fundamentalStockStrategy_selectB_11[] = "fundamentalStockStrategy.selectByStockPrice";
static const char __pyx_k_fundamentalStockStrategy_selectB_12[] = "fundamentalStockStrategy.selectByStockPriceQuantile";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_2getWebDriver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_4closeDriver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_6setPlotTimeLock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_8setStrategyJsonFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_json_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_10dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_12plotStrategyFigure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_json_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_14plotTop10UpLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_16plotTop10Amplitude(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_18plotWaveUpRank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_show_fig); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_20plotWaveDownRank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_22plotTradeDistributionLen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_24plotStockUplimtLadder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_26plotHotColdIndustryConceptFrequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_show_fig); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_28plotHotColdIndustryTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_30_plotHotColdTables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_key_name, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_32_plotTablePandas(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_plot_df, PyObject *__pyx_v_table_title, PyObject *__pyx_v_table_save_png_path, PyObject *__pyx_v_col_title, PyObject *__pyx_v_color_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_34_convertDictToPandas(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_near_name, PyObject *__pyx_v_ori_dict, PyObject *__pyx_v_time_key); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_36_saveToImg(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_table_save_excel_path, PyObject *__pyx_v_table_save_png_path); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_38plotHotColdConceptTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_40plotHotColdStockTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_42plotHotColdFutureTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_44plotHotColdIndexTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_46plotHoldNumberDecrease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_rows); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_48splitStockData(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_origin_df); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_50drawKlineChart(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_stock_code); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_52plotKline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_54plotKlineMpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_data, PyObject *__pyx_v_figure); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_2setStockDataDf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_data_df); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_4setFigureShow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_figure); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_6MaAll(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_8MA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ma_column, PyObject *__pyx_v_ma_time); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_10EMA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ma_column, PyObject *__pyx_v_ma_time); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_12MACD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_14RSI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_16BOLL(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_18KDJ(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_20WILLR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_22DMI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_24OBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_26CDL2CROWS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_28CDL3WHITESOLDIERS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_30CDL3STARSINSOUTH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_32CDLHARAMI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_34CDLRISEFALL3METHODS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_36CDLXSIDEGAP3METHODS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_38CDL3INSIDE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_40CDLPIERCING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_42CDLHAMMER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_44CDLMORNINGSTAR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_46CDLENGULFING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json, PyObject *__pyx_v_strategy_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_4__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_6reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_8checkDatabaseTableUpdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_10dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_12getStockNameByCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_14getAllDelistStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_16getAllStStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_18getAllNewStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_thr); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_20isNewStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_new_thr); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_22isDelistStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_tag); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_24isStStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_tag); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_26isUpLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_close, PyObject *__pyx_v_pre_close, PyObject *__pyx_v_stock_name); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_28isDownLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_close, PyObject *__pyx_v_pre_close, PyObject *__pyx_v_stock_name); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_30listIntersection(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data_list, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_32listUnion(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data_list, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_34strategyCount(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_2selectByMarketCap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cal_min_th, PyObject *__pyx_v_cal_max_th, PyObject *__pyx_v_use_st_stock); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_4selectByKeyProduct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_product_name); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_6selectByNameWord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_word); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_8selectByArea(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_area_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_10selectByIndustry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_industry_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_12selectByConcept(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_select_code(PyObject *__pyx_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_market_type); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_16selectByStockPrice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_min_price, PyObject *__pyx_v_max_price, PyObject *__pyx_v_use_st_stock); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPriceQuantile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_day_len, PyObject *__pyx_v_quantile_amplitude_tr, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_20getSingleStockPriceQuantile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_day_len, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_2selectByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_4judgeSingleStockByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tech_name, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_6getStockByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tech_name, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_2getStockMultiFinancialData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_financial_mode, PyObject *__pyx_v_filter_dict, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_4getStockByFinancialData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_financial_mode, PyObject *__pyx_v_filter_dict, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_2isLowAmountStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_amount_th, PyObject *__pyx_v_use_ma); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_4getAllHighAmountStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_amount_th, PyObject *__pyx_v_use_ma, PyObject *__pyx_v_use_st_stock); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_2reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_4getStrategyDataAndImg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_6getStockProperty_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_8stockSingleStockProperty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_10getStockProperty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_12getStockWavePriceRatio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_max_depth); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_getOneWaveRatio(PyObject *__pyx_self, PyObject *__pyx_v_stock_close_price_df, PyObject *__pyx_v_wave_up_rank_list, PyObject *__pyx_v_mode, PyObject *__pyx_v_depth); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_14getSingleStockWavePriceRatio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_max_depth, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_updateRateHist(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_prev_date, PyObject *__pyx_v_new_date, PyObject *__pyx_v_rate_hist_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_2updateRateHist_(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_prev_date, PyObject *__pyx_v_new_date); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_16getTradeDistributionTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_18getStockLadderTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_ladder_max, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda9(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda10(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda11(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_20getStockHoldNumberChangeTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_day_len, PyObject *__pyx_v_new_date_len, PyObject *__pyx_v_quantile_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22__getStockLadder(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_ladder_dict_yesterday, PyObject *__pyx_v_stock_up_limit_list_today); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_cumulative_product(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_group); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24getTradeDayChangeRankBetweenDate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_rank_level); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_26update_hot_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_trade_date, PyObject *__pyx_v_hot_table); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getIndustryConceptHotFrequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_near_day, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_30getIndustryHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getConceptHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_34getStockHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_36getFutureHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_38getIndexHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_2getPotentialLimitUpStockNearDay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_near_day); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_4getPotentialConceptStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_6getPotentialIndustryStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_industry_list); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_test_select_stock(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_2getStrategyDataAndImg_new(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_4simple_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_index = {0, 0, 0, 0, 0};
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio;
  PyObject *__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable;
  #endif
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio;
  PyTypeObject *__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable;
  PyObject *__pyx_kp_s_0;
  PyObject *__pyx_kp_s_00;
  PyObject *__pyx_kp_u_0_1;
  PyObject *__pyx_kp_s_0_1_2;
  PyObject *__pyx_kp_s_0_399003;
  PyObject *__pyx_kp_s_0_82_0_83_0_85;
  PyObject *__pyx_kp_s_1;
  PyObject *__pyx_kp_s_10;
  PyObject *__pyx_kp_s_14;
  PyObject *__pyx_kp_s_14b143;
  PyObject *__pyx_kp_s_1_0;
  PyObject *__pyx_kp_s_1_000003;
  PyObject *__pyx_kp_s_1_000012;
  PyObject *__pyx_kp_s_1_000013;
  PyObject *__pyx_kp_s_1_2;
  PyObject *__pyx_kp_s_1_2_3_4_finished;
  PyObject *__pyx_kp_s_1_2_3_4_quarter_finished_4_repo;
  PyObject *__pyx_kp_s_1_5;
  PyObject *__pyx_kp_s_1_K_2_3;
  PyObject *__pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI;
  PyObject *__pyx_kp_s_1_finished_2_finished_3_finishe;
  PyObject *__pyx_kp_s_1_x_finished_x_finished_x_finis;
  PyObject *__pyx_kp_s_2;
  PyObject *__pyx_kp_s_20240101;
  PyObject *__pyx_kp_s_20240625;
  PyObject *__pyx_kp_s_20240813;
  PyObject *__pyx_kp_s_2f;
  PyObject *__pyx_kp_s_3;
  PyObject *__pyx_kp_s_30;
  PyObject *__pyx_kp_s_300416;
  PyObject *__pyx_kp_s_4;
  PyObject *__pyx_kp_s_5_1;
  PyObject *__pyx_kp_s_5_9_85;
  PyObject *__pyx_n_u_6;
  PyObject *__pyx_kp_s_60;
  PyObject *__pyx_kp_s_601360;
  PyObject *__pyx_kp_s_60_2;
  PyObject *__pyx_kp_s_68;
  PyObject *__pyx_kp_s_71;
  PyObject *__pyx_kp_s_8;
  PyObject *__pyx_kp_s_82;
  PyObject *__pyx_kp_s_97;
  PyObject *__pyx_kp_s_9_85;
  PyObject *__pyx_kp_s_9_85_2;
  PyObject *__pyx_kp_s_9_85_5;
  PyObject *__pyx_n_s_ADX;
  PyObject *__pyx_n_s_ADXR;
  PyObject *__pyx_kp_s_AI;
  PyObject *__pyx_kp_s_AR_PL_UKai_CN;
  PyObject *__pyx_n_s_AxisLineOpts;
  PyObject *__pyx_n_s_AxisOpts;
  PyObject *__pyx_n_s_AxisTickOpts;
  PyObject *__pyx_n_s_BBANDS;
  PyObject *__pyx_n_s_BK0815;
  PyObject *__pyx_n_s_BK0816;
  PyObject *__pyx_n_s_BK0817;
  PyObject *__pyx_n_s_BK1050;
  PyObject *__pyx_n_s_BK1051;
  PyObject *__pyx_n_s_BOLL;
  PyObject *__pyx_n_s_Bar;
  PyObject *__pyx_kp_u_Beginning;
  PyObject *__pyx_kp_s_Bollinger_Bands;
  PyObject *__pyx_n_s_CDL2CROWS;
  PyObject *__pyx_n_s_CDL3INSIDE;
  PyObject *__pyx_n_s_CDL3STARSINSOUTH;
  PyObject *__pyx_n_s_CDL3WHITESOLDIERS;
  PyObject *__pyx_n_s_CDLENGULFING;
  PyObject *__pyx_n_s_CDLHAMMER;
  PyObject *__pyx_n_s_CDLHARAMI;
  PyObject *__pyx_n_s_CDLMORNINGSTAR;
  PyObject *__pyx_n_s_CDLPIERCING;
  PyObject *__pyx_n_s_CDLRISEFALL3METHODS;
  PyObject *__pyx_n_s_CDLXSIDEGAP3METHODS;
  PyObject *__pyx_n_s_CRO;
  PyObject *__pyx_kp_u_Can_t_load;
  PyObject *__pyx_kp_u_Candle_Chart;
  PyObject *__pyx_kp_u_Cant_getStockTradeDayInfoFq_for;
  PyObject *__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2;
  PyObject *__pyx_n_s_ColDef;
  PyObject *__pyx_n_s_Counter;
  PyObject *__pyx_n_s_D;
  PyObject *__pyx_n_s_DEA;
  PyObject *__pyx_n_s_DEMA;
  PyObject *__pyx_kp_s_DI;
  PyObject *__pyx_n_s_DIF;
  PyObject *__pyx_kp_s_DI_2;
  PyObject *__pyx_n_s_DMI;
  PyObject *__pyx_kp_s_DRG_DIP;
  PyObject *__pyx_n_s_DataFrame;
  PyObject *__pyx_n_s_DataZoomOpts;
  PyObject *__pyx_n_s_Dict;
  PyObject *__pyx_n_s_Dispose;
  PyObject *__pyx_n_s_EMA;
  PyObject *__pyx_n_s_Edge;
  PyObject *__pyx_kp_s_Exponential_Moving_Average_EMA_l;
  PyObject *__pyx_kp_u_Failed_to_getStockTradeDayInfoSq;
  PyObject *__pyx_n_s_FirstColumn;
  PyObject *__pyx_n_s_FirstRow;
  PyObject *__pyx_n_s_Grid;
  PyObject *__pyx_n_s_GridOpts;
  PyObject *__pyx_n_s_H_line;
  PyObject *__pyx_n_s_InitOpts;
  PyObject *__pyx_n_s_ItemStyleOpts;
  PyObject *__pyx_n_s_J;
  PyObject *__pyx_n_s_JsCode;
  PyObject *__pyx_n_s_K;
  PyObject *__pyx_n_s_KAMA;
  PyObject *__pyx_n_s_KDJ;
  PyObject *__pyx_n_s_Kline;
  PyObject *__pyx_n_u_Kline_2;
  PyObject *__pyx_kp_u_Kline_png;
  PyObject *__pyx_n_s_LIGHT;
  PyObject *__pyx_n_s_L_line;
  PyObject *__pyx_n_s_LabelOpts;
  PyObject *__pyx_n_s_LastColumn;
  PyObject *__pyx_n_s_LastRow;
  PyObject *__pyx_n_s_LegendOpts;
  PyObject *__pyx_n_s_Line;
  PyObject *__pyx_n_s_LineStyleOpts;
  PyObject *__pyx_n_s_List;
  PyObject *__pyx_n_s_LoadFromFile;
  PyObject *__pyx_n_s_MA;
  PyObject *__pyx_n_s_MA10;
  PyObject *__pyx_n_s_MA20;
  PyObject *__pyx_n_s_MA30;
  PyObject *__pyx_n_s_MA5;
  PyObject *__pyx_n_s_MA60;
  PyObject *__pyx_n_s_MACD;
  PyObject *__pyx_n_s_MAMA;
  PyObject *__pyx_n_s_MINUS_DI;
  PyObject *__pyx_n_s_M_line;
  PyObject *__pyx_n_s_MaAll;
  PyObject *__pyx_n_s_MarkPointItem;
  PyObject *__pyx_n_s_MarkPointOpts;
  PyObject *__pyx_kp_s_Moving_average_MA_lines;
  PyObject *__pyx_kp_u_Mysql;
  PyObject *__pyx_n_s_NA;
  PyObject *__pyx_kp_u_Need_to_update_database_table;
  PyObject *__pyx_kp_u_Need_to_update_strategy;
  PyObject *__pyx_n_s_OBV;
  PyObject *__pyx_n_s_Options;
  PyObject *__pyx_n_s_PLUS_DI;
  PyObject *__pyx_n_s_ProcessPoolExecutor;
  PyObject *__pyx_n_s_RSI;
  PyObject *__pyx_n_s_Reds;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_n_s_SMA;
  PyObject *__pyx_n_s_ST;
  PyObject *__pyx_n_s_STOCH;
  PyObject *__pyx_n_s_Save;
  PyObject *__pyx_n_s_Service;
  PyObject *__pyx_n_s_SplitLineOpts;
  PyObject *__pyx_kp_s_Strategy_figure_has_generated;
  PyObject *__pyx_n_s_T3;
  PyObject *__pyx_n_s_TEMA;
  PyObject *__pyx_n_s_TIMI_COUNT;
  PyObject *__pyx_n_s_TRIMA;
  PyObject *__pyx_n_s_Table;
  PyObject *__pyx_kp_u_The;
  PyObject *__pyx_n_s_ThemeType;
  PyObject *__pyx_n_s_ThreadPoolExecutor;
  PyObject *__pyx_n_s_Timestamp;
  PyObject *__pyx_n_s_TitleOpts;
  PyObject *__pyx_n_s_ToImage;
  PyObject *__pyx_n_s_TooltipOpts;
  PyObject *__pyx_n_s_Union;
  PyObject *__pyx_kp_s_Union_Dict_None;
  PyObject *__pyx_kp_s_Union_List_None;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_Volumn;
  PyObject *__pyx_n_s_WILLR;
  PyObject *__pyx_n_s_WMA;
  PyObject *__pyx_n_s_WR;
  PyObject *__pyx_n_s_Workbook;
  PyObject *__pyx_n_s_Worksheets;
  PyObject *__pyx_kp_s_Y_m_d;
  PyObject *__pyx_n_u__10;
  PyObject *__pyx_kp_s__102;
  PyObject *__pyx_kp_s__103;
  PyObject *__pyx_kp_s__104;
  PyObject *__pyx_kp_s__105;
  PyObject *__pyx_kp_s__108;
  PyObject *__pyx_kp_u__108;
  PyObject *__pyx_kp_s__11;
  PyObject *__pyx_kp_u__11;
  PyObject *__pyx_n_s__117;
  PyObject *__pyx_n_u__12;
  PyObject *__pyx_kp_s__128;
  PyObject *__pyx_kp_s__129;
  PyObject *__pyx_kp_s__13;
  PyObject *__pyx_kp_s__139;
  PyObject *__pyx_kp_s__14;
  PyObject *__pyx_kp_s__140;
  PyObject *__pyx_kp_s__141;
  PyObject *__pyx_kp_s__142;
  PyObject *__pyx_kp_s__143;
  PyObject *__pyx_kp_s__144;
  PyObject *__pyx_kp_s__147;
  PyObject *__pyx_kp_s__148;
  PyObject *__pyx_kp_s__149;
  PyObject *__pyx_kp_s__15;
  PyObject *__pyx_n_u__150;
  PyObject *__pyx_kp_u__151;
  PyObject *__pyx_kp_s__152;
  PyObject *__pyx_n_u__16;
  PyObject *__pyx_kp_s__17;
  PyObject *__pyx_n_u__18;
  PyObject *__pyx_kp_u__19;
  PyObject *__pyx_n_u__2;
  PyObject *__pyx_kp_u__20;
  PyObject *__pyx_kp_u__21;
  PyObject *__pyx_kp_u__22;
  PyObject *__pyx_kp_s__23;
  PyObject *__pyx_kp_s__24;
  PyObject *__pyx_kp_s__25;
  PyObject *__pyx_kp_s__26;
  PyObject *__pyx_kp_u__27;
  PyObject *__pyx_kp_s__28;
  PyObject *__pyx_kp_s__29;
  PyObject *__pyx_kp_u__3;
  PyObject *__pyx_kp_s__33;
  PyObject *__pyx_kp_s__34;
  PyObject *__pyx_kp_u__35;
  PyObject *__pyx_n_u__36;
  PyObject *__pyx_n_u__37;
  PyObject *__pyx_kp_u__38;
  PyObject *__pyx_n_s__395;
  PyObject *__pyx_kp_s__4;
  PyObject *__pyx_kp_u__4;
  PyObject *__pyx_kp_s__40;
  PyObject *__pyx_n_u__41;
  PyObject *__pyx_n_u__42;
  PyObject *__pyx_kp_s__43;
  PyObject *__pyx_n_s__45;
  PyObject *__pyx_n_u__45;
  PyObject *__pyx_n_s__46;
  PyObject *__pyx_n_u__46;
  PyObject *__pyx_kp_s__47;
  PyObject *__pyx_kp_s__49;
  PyObject *__pyx_kp_s__5;
  PyObject *__pyx_kp_s__50;
  PyObject *__pyx_kp_s__51;
  PyObject *__pyx_kp_s__52;
  PyObject *__pyx_kp_s__53;
  PyObject *__pyx_kp_s__54;
  PyObject *__pyx_kp_s__55;
  PyObject *__pyx_n_s__58;
  PyObject *__pyx_kp_s__6;
  PyObject *__pyx_kp_s__60;
  PyObject *__pyx_kp_s__61;
  PyObject *__pyx_kp_s__62;
  PyObject *__pyx_kp_s__63;
  PyObject *__pyx_kp_u__64;
  PyObject *__pyx_n_u__65;
  PyObject *__pyx_kp_u__66;
  PyObject *__pyx_kp_s__67;
  PyObject *__pyx_kp_s__68;
  PyObject *__pyx_kp_s__69;
  PyObject *__pyx_kp_s__7;
  PyObject *__pyx_kp_s__70;
  PyObject *__pyx_kp_s__71;
  PyObject *__pyx_kp_s__72;
  PyObject *__pyx_kp_s__74;
  PyObject *__pyx_kp_s__75;
  PyObject *__pyx_kp_s__80;
  PyObject *__pyx_kp_s__81;
  PyObject *__pyx_kp_s__82;
  PyObject *__pyx_kp_s__83;
  PyObject *__pyx_kp_s__84;
  PyObject *__pyx_kp_s__85;
  PyObject *__pyx_kp_s__86;
  PyObject *__pyx_kp_s__87;
  PyObject *__pyx_kp_s__88;
  PyObject *__pyx_kp_s__89;
  PyObject *__pyx_kp_u__9;
  PyObject *__pyx_n_u__91;
  PyObject *__pyx_kp_u__92;
  PyObject *__pyx_kp_s__95;
  PyObject *__pyx_kp_s__96;
  PyObject *__pyx_n_s_add;
  PyObject *__pyx_n_s_add_js_funcs;
  PyObject *__pyx_n_s_add_xaxis;
  PyObject *__pyx_n_s_add_yaxis;
  PyObject *__pyx_n_s_all;
  PyObject *__pyx_n_s_all_data;
  PyObject *__pyx_n_s_all_list;
  PyObject *__pyx_n_s_all_near_df;
  PyObject *__pyx_n_s_all_stock_simple_info;
  PyObject *__pyx_n_s_all_time_day_df;
  PyObject *__pyx_n_s_all_time_month_df;
  PyObject *__pyx_n_s_all_time_week_df;
  PyObject *__pyx_n_s_amount;
  PyObject *__pyx_n_s_amount_ma;
  PyObject *__pyx_n_s_amount_th;
  PyObject *__pyx_n_s_amplitude;
  PyObject *__pyx_n_s_amplitude_tr_max;
  PyObject *__pyx_n_s_amplitude_tr_min;
  PyObject *__pyx_n_s_and;
  PyObject *__pyx_kp_u_and_2;
  PyObject *__pyx_n_s_append;
  PyObject *__pyx_n_s_apply;
  PyObject *__pyx_n_s_area_list;
  PyObject *__pyx_n_s_area_stock_list;
  PyObject *__pyx_n_s_arg;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_as_completed;
  PyObject *__pyx_n_s_ascending;
  PyObject *__pyx_n_s_astype;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_autumn_r;
  PyObject *__pyx_n_s_average_amplitude;
  PyObject *__pyx_n_s_avg_amount_pa;
  PyObject *__pyx_n_s_ax;
  PyObject *__pyx_n_s_axes;
  PyObject *__pyx_kp_s_axes_unicode_minus;
  PyObject *__pyx_n_s_axis;
  PyObject *__pyx_n_s_axis_pointer_type;
  PyObject *__pyx_n_s_axislabel_opts;
  PyObject *__pyx_n_s_axisline_opts;
  PyObject *__pyx_n_s_axistick_opts;
  PyObject *__pyx_n_s_bar_1;
  PyObject *__pyx_n_s_bar_2;
  PyObject *__pyx_kp_s_baseStrategy;
  PyObject *__pyx_n_s_baseStrategy_2;
  PyObject *__pyx_n_s_baseStrategy___getstate;
  PyObject *__pyx_kp_s_baseStrategy___init;
  PyObject *__pyx_n_s_baseStrategy___setstate;
  PyObject *__pyx_n_s_baseStrategy_checkDatabaseTableU;
  PyObject *__pyx_n_s_baseStrategy_dumpJsonToFile;
  PyObject *__pyx_n_s_baseStrategy_getAllDelistStock;
  PyObject *__pyx_n_s_baseStrategy_getAllNewStock;
  PyObject *__pyx_n_s_baseStrategy_getAllStStock;
  PyObject *__pyx_n_s_baseStrategy_getStockNameByCode;
  PyObject *__pyx_n_s_baseStrategy_isDelistStock;
  PyObject *__pyx_n_s_baseStrategy_isDownLimit;
  PyObject *__pyx_n_s_baseStrategy_isNewStock;
  PyObject *__pyx_n_s_baseStrategy_isStStock;
  PyObject *__pyx_n_s_baseStrategy_isUpLimit;
  PyObject *__pyx_n_s_baseStrategy_listIntersection;
  PyObject *__pyx_n_s_baseStrategy_listUnion;
  PyObject *__pyx_n_s_baseStrategy_reset;
  PyObject *__pyx_n_s_baseStrategy_strategyCount;
  PyObject *__pyx_n_s_base_filename;
  PyObject *__pyx_n_s_base_list;
  PyObject *__pyx_n_s_basename;
  PyObject *__pyx_n_s_bbox_inches;
  PyObject *__pyx_kp_u_begin_to_create;
  PyObject *__pyx_kp_u_between;
  PyObject *__pyx_n_s_bg_color;
  PyObject *__pyx_n_s_bind;
  PyObject *__pyx_n_s_bool;
  PyObject *__pyx_n_s_border_color;
  PyObject *__pyx_n_s_border_color0;
  PyObject *__pyx_n_s_boundary_gap;
  PyObject *__pyx_n_s_bwr_r;
  PyObject *__pyx_n_s_by;
  PyObject *__pyx_n_s_cal_max_th;
  PyObject *__pyx_n_s_cal_min_th;
  PyObject *__pyx_n_s_candle;
  PyObject *__pyx_kp_u_cant_get_stock_name_for;
  PyObject *__pyx_n_s_capitalStockStrategy;
  PyObject *__pyx_kp_s_capitalStockStrategy___init;
  PyObject *__pyx_n_s_capitalStockStrategy_getAllHighA;
  PyObject *__pyx_n_s_capitalStockStrategy_isLowAmount;
  PyObject *__pyx_n_s_category;
  PyObject *__pyx_n_s_ceil;
  PyObject *__pyx_n_s_center;
  PyObject *__pyx_n_s_change_ratio;
  PyObject *__pyx_n_s_checkDatabaseTableUpdate;
  PyObject *__pyx_n_s_check_serializability;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_closeDriver;
  PyObject *__pyx_n_s_cm;
  PyObject *__pyx_n_s_cmap;
  PyObject *__pyx_n_s_co_name;
  PyObject *__pyx_n_s_code;
  PyObject *__pyx_n_s_code_name_table;
  PyObject *__pyx_n_s_codes_list;
  PyObject *__pyx_n_s_codes_str;
  PyObject *__pyx_kp_u_col_inch;
  PyObject *__pyx_n_s_col_inch_2;
  PyObject *__pyx_n_s_col_list;
  PyObject *__pyx_n_s_col_name;
  PyObject *__pyx_n_s_col_title;
  PyObject *__pyx_n_s_collections;
  PyObject *__pyx_n_s_color;
  PyObject *__pyx_n_s_color0;
  PyObject *__pyx_n_s_color_function;
  PyObject *__pyx_n_s_color_list;
  PyObject *__pyx_n_s_column_definitions;
  PyObject *__pyx_n_s_column_name_list;
  PyObject *__pyx_n_s_columns;
  PyObject *__pyx_n_s_common;
  PyObject *__pyx_kp_u_compute_date;
  PyObject *__pyx_n_s_concat;
  PyObject *__pyx_n_s_concept;
  PyObject *__pyx_n_s_concept_list;
  PyObject *__pyx_n_s_concept_stock_list;
  PyObject *__pyx_n_s_concurrent_futures;
  PyObject *__pyx_n_s_convertDictToPandas;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_count;
  PyObject *__pyx_n_s_create_engine_session;
  PyObject *__pyx_n_s_cumprod;
  PyObject *__pyx_n_s_cumprod_change_ratio;
  PyObject *__pyx_n_s_cumulative_product;
  PyObject *__pyx_n_s_current_date;
  PyObject *__pyx_n_s_current_price;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_dataManagement;
  PyObject *__pyx_n_s_dataMax;
  PyObject *__pyx_n_s_dataMin;
  PyObject *__pyx_n_s_dataPreprocess;
  PyObject *__pyx_n_s_data_list;
  PyObject *__pyx_kp_s_data_must_be_a_dictionary;
  PyObject *__pyx_n_s_data_simple_info_df;
  PyObject *__pyx_n_s_data_table;
  PyObject *__pyx_n_s_dataproc;
  PyObject *__pyx_n_s_datas;
  PyObject *__pyx_n_s_datazoom_opts;
  PyObject *__pyx_n_s_date;
  PyObject *__pyx_n_s_date_end;
  PyObject *__pyx_n_s_date_list;
  PyObject *__pyx_n_s_date_start;
  PyObject *__pyx_n_s_date_str;
  PyObject *__pyx_n_s_date_to_session;
  PyObject *__pyx_n_s_datetime;
  PyObject *__pyx_kp_s_datetime64_ns;
  PyObject *__pyx_n_s_datetime_str;
  PyObject *__pyx_n_s_day;
  PyObject *__pyx_n_s_day_2;
  PyObject *__pyx_n_s_day_cold_dict;
  PyObject *__pyx_n_s_day_cold_frequency_df;
  PyObject *__pyx_n_s_day_hot_cold_dict;
  PyObject *__pyx_n_s_day_hot_cold_frequency_df;
  PyObject *__pyx_n_s_day_hot_cold_frequency_dict;
  PyObject *__pyx_n_s_day_hot_dict;
  PyObject *__pyx_n_s_day_hot_frequency_df;
  PyObject *__pyx_kp_u_day_info_firstly;
  PyObject *__pyx_n_s_day_len;
  PyObject *__pyx_n_s_day_levels;
  PyObject *__pyx_n_s_deas;
  PyObject *__pyx_n_s_decrease_ratio;
  PyObject *__pyx_n_s_deepcopy;
  PyObject *__pyx_n_s_delist_stock_dict;
  PyObject *__pyx_n_s_dependent_table;
  PyObject *__pyx_n_s_depth;
  PyObject *__pyx_n_s_desc;
  PyObject *__pyx_n_s_desc_name;
  PyObject *__pyx_n_s_df;
  PyObject *__pyx_n_s_df_filtered;
  PyObject *__pyx_n_s_df_grouped;
  PyObject *__pyx_n_s_df_left;
  PyObject *__pyx_n_s_df_ma;
  PyObject *__pyx_n_s_df_right;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_s_difs;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_dispose;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_n_s_down;
  PyObject *__pyx_n_s_down_num;
  PyObject *__pyx_n_s_down_row_index;
  PyObject *__pyx_n_s_downlimt_num;
  PyObject *__pyx_n_s_dpi;
  PyObject *__pyx_n_s_drawKlineChart;
  PyObject *__pyx_n_s_driver;
  PyObject *__pyx_n_s_drop;
  PyObject *__pyx_n_s_drop_duplicates;
  PyObject *__pyx_n_s_dt;
  PyObject *__pyx_n_s_dtype;
  PyObject *__pyx_n_s_dumpJsonToFile;
  PyObject *__pyx_n_s_edge;
  PyObject *__pyx_n_s_edge_driver_path;
  PyObject *__pyx_kp_s_ef232a;
  PyObject *__pyx_n_s_ema;
  PyObject *__pyx_n_s_ema_10;
  PyObject *__pyx_n_s_ema_20;
  PyObject *__pyx_n_s_ema_30;
  PyObject *__pyx_n_s_ema_5;
  PyObject *__pyx_n_s_ema_60;
  PyObject *__pyx_n_s_ema_df;
  PyObject *__pyx_n_s_empty;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_end;
  PyObject *__pyx_n_s_end1;
  PyObject *__pyx_n_s_end5;
  PyObject *__pyx_n_s_end_date;
  PyObject *__pyx_n_s_engine;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_error;
  PyObject *__pyx_n_s_exclude_codes;
  PyObject *__pyx_n_s_exclude_concepts;
  PyObject *__pyx_n_s_exclude_indexes;
  PyObject *__pyx_n_s_executable_path;
  PyObject *__pyx_n_s_executor;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_f_code;
  PyObject *__pyx_n_s_facecolor;
  PyObject *__pyx_kp_u_failed_to_getStockTradeDayInfoF;
  PyObject *__pyx_kp_u_failed_to_getStockTradeDayInfoF_2;
  PyObject *__pyx_kp_u_failed_to_getStockTradeDayInfoS;
  PyObject *__pyx_n_s_family;
  PyObject *__pyx_n_s_fastk_period;
  PyObject *__pyx_n_s_fastperiod;
  PyObject *__pyx_kp_s_ffffff;
  PyObject *__pyx_n_s_fig;
  PyObject *__pyx_n_s_fig_bar;
  PyObject *__pyx_n_s_figcolor;
  PyObject *__pyx_n_s_figsize;
  PyObject *__pyx_n_s_figure;
  PyObject *__pyx_n_s_figure_save_name;
  PyObject *__pyx_n_s_figure_title;
  PyObject *__pyx_n_s_figured;
  PyObject *__pyx_n_s_file_extension;
  PyObject *__pyx_n_s_file_name;
  PyObject *__pyx_n_s_filename;
  PyObject *__pyx_n_s_fillna;
  PyObject *__pyx_n_s_filter;
  PyObject *__pyx_n_s_filter_dict;
  PyObject *__pyx_n_s_filter_dict_item;
  PyObject *__pyx_kp_s_filter_dict_report_date_should_b;
  PyObject *__pyx_kp_s_filter_dict_report_date_should_n;
  PyObject *__pyx_n_s_filter_list;
  PyObject *__pyx_n_s_financialStockStrategy;
  PyObject *__pyx_kp_s_financialStockStrategy___init;
  PyObject *__pyx_n_s_financialStockStrategy_getStockB;
  PyObject *__pyx_n_s_financialStockStrategy_getStockM;
  PyObject *__pyx_n_s_financial_mode;
  PyObject *__pyx_n_s_financial_quarter_selection;
  PyObject *__pyx_n_s_financial_report_selection;
  PyObject *__pyx_n_s_first;
  PyObject *__pyx_n_s_first_uplimit_num;
  PyObject *__pyx_n_s_first_use_date;
  PyObject *__pyx_kp_u_firstly;
  PyObject *__pyx_n_s_floor;
  PyObject *__pyx_n_s_font;
  PyObject *__pyx_n_s_fontsize;
  PyObject *__pyx_n_s_foot_size;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_formatter;
  PyObject *__pyx_n_s_fun_driver;
  PyObject *__pyx_n_s_fun_name;
  PyObject *__pyx_kp_s_function_params_if_params_dataI;
  PyObject *__pyx_kp_s_function_params_var_colorList_i;
  PyObject *__pyx_kp_s_function_params_var_colorList_i_2;
  PyObject *__pyx_n_s_fundamentalStockStrategy;
  PyObject *__pyx_kp_s_fundamentalStockStrategy___init;
  PyObject *__pyx_n_s_fundamentalStockStrategy_getSing;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_10;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_11;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_12;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_2;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_3;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_4;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_5;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_6;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_7;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_8;
  PyObject *__pyx_n_s_fundamentalStockStrategy_selectB_9;
  PyObject *__pyx_n_s_future;
  PyObject *__pyx_n_s_future_trade_day;
  PyObject *__pyx_n_s_futures;
  PyObject *__pyx_n_s_g;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_getAllDelistStock;
  PyObject *__pyx_n_s_getAllHighAmountStock;
  PyObject *__pyx_n_s_getAllNewStock;
  PyObject *__pyx_n_s_getAllStStock;
  PyObject *__pyx_n_s_getAreaStockCodes;
  PyObject *__pyx_n_s_getConceptHotTable;
  PyObject *__pyx_n_s_getConceptStockCodes;
  PyObject *__pyx_n_s_getFutureHotTable;
  PyObject *__pyx_n_s_getIndexHotTable;
  PyObject *__pyx_n_s_getIndustryConceptHotFrequency;
  PyObject *__pyx_n_s_getIndustryHotTable;
  PyObject *__pyx_n_s_getIndustryStockCodes;
  PyObject *__pyx_n_s_getNameByTableCode;
  PyObject *__pyx_n_s_getOneWaveRatio;
  PyObject *__pyx_n_s_getPotentialConceptStock;
  PyObject *__pyx_n_s_getPotentialIndustryStock;
  PyObject *__pyx_n_s_getPotentialLimitUpStockNearDay;
  PyObject *__pyx_n_s_getSingleStockPriceQuantile;
  PyObject *__pyx_n_s_getSingleStockWavePriceRatio;
  PyObject *__pyx_kp_u_getSingleStockWavePriceRatio_tim;
  PyObject *__pyx_n_s_getStockByFinancialData;
  PyObject *__pyx_n_s_getStockByTechIndicator;
  PyObject *__pyx_n_s_getStockHoldNumberChangeTable;
  PyObject *__pyx_n_s_getStockHotTable;
  PyObject *__pyx_n_s_getStockLadder;
  PyObject *__pyx_n_s_getStockLadderTable;
  PyObject *__pyx_n_s_getStockLimitUp;
  PyObject *__pyx_n_s_getStockMultiFinancialData;
  PyObject *__pyx_kp_u_getStockMultiFinancialData_quart;
  PyObject *__pyx_n_s_getStockNameByCode;
  PyObject *__pyx_n_s_getStockProperty;
  PyObject *__pyx_n_s_getStockProperty_2;
  PyObject *__pyx_n_s_getStockSimpleInfo;
  PyObject *__pyx_n_s_getStockTradeDayInfoFq;
  PyObject *__pyx_n_s_getStockTradeDayInfoSqlalchemy;
  PyObject *__pyx_n_s_getStockWavePriceRatio;
  PyObject *__pyx_n_s_getStrategyDataAndImg;
  PyObject *__pyx_n_s_getStrategyDataAndImg_new;
  PyObject *__pyx_n_s_getSuspendedStocks;
  PyObject *__pyx_n_s_getTradeDayChangeRankBetweenDate;
  PyObject *__pyx_n_s_getTradeDistributionTable;
  PyObject *__pyx_n_s_getWebDriver;
  PyObject *__pyx_n_s_getYearStartEndDate;
  PyObject *__pyx_n_s_get_Item;
  PyObject *__pyx_n_s_get_facecolor;
  PyObject *__pyx_n_s_getframe;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_grid_chart;
  PyObject *__pyx_n_s_grid_index;
  PyObject *__pyx_n_s_grid_opts;
  PyObject *__pyx_n_s_gridcolor;
  PyObject *__pyx_n_s_gross_profit_ratio;
  PyObject *__pyx_n_s_group;
  PyObject *__pyx_n_s_group_column;
  PyObject *__pyx_n_s_group_keys;
  PyObject *__pyx_n_s_groupby;
  PyObject *__pyx_n_s_grouped_df;
  PyObject *__pyx_n_s_ha;
  PyObject *__pyx_n_s_has_strategy_file;
  PyObject *__pyx_kp_u_has_suspended_at;
  PyObject *__pyx_n_s_has_update_file;
  PyObject *__pyx_n_s_head;
  PyObject *__pyx_n_s_head_tail_df;
  PyObject *__pyx_n_s_height;
  PyObject *__pyx_n_s_high;
  PyObject *__pyx_n_s_high_amount_stock_list;
  PyObject *__pyx_n_s_hit;
  PyObject *__pyx_n_s_hold_number_decrease;
  PyObject *__pyx_n_s_holder_num;
  PyObject *__pyx_n_s_hot_cold_concept_table;
  PyObject *__pyx_n_s_hot_cold_future_table;
  PyObject *__pyx_n_s_hot_cold_index_table;
  PyObject *__pyx_n_s_hot_cold_industry_table;
  PyObject *__pyx_n_s_hot_cold_stock_table;
  PyObject *__pyx_n_s_hot_concept_frequency;
  PyObject *__pyx_n_s_hot_concept_table;
  PyObject *__pyx_n_s_hot_future_table;
  PyObject *__pyx_n_s_hot_index_table;
  PyObject *__pyx_n_s_hot_industry_frequency;
  PyObject *__pyx_n_s_hot_industry_table;
  PyObject *__pyx_n_s_hot_stock_table;
  PyObject *__pyx_n_s_hot_table;
  PyObject *__pyx_n_s_hot_table_day;
  PyObject *__pyx_n_s_hot_table_day_name;
  PyObject *__pyx_n_s_hot_table_month;
  PyObject *__pyx_n_s_hot_table_month_name;
  PyObject *__pyx_n_s_hot_table_near_day;
  PyObject *__pyx_n_s_hot_table_week;
  PyObject *__pyx_n_s_hot_table_week_name;
  PyObject *__pyx_n_s_hot_table_year;
  PyObject *__pyx_n_s_hot_table_year_name;
  PyObject *__pyx_n_s_how;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_id;
  PyObject *__pyx_n_s_idxmax;
  PyObject *__pyx_n_s_idxmin;
  PyObject *__pyx_n_s_ignore_index;
  PyObject *__pyx_n_s_iloc;
  PyObject *__pyx_n_s_image;
  PyObject *__pyx_n_s_img_save_path_root;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_kp_u_in;
  PyObject *__pyx_n_s_include_groups;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_index_left;
  PyObject *__pyx_n_s_index_list;
  PyObject *__pyx_n_s_index_right;
  PyObject *__pyx_n_s_index_trade_day;
  PyObject *__pyx_n_s_industry;
  PyObject *__pyx_n_s_industry_list;
  PyObject *__pyx_n_s_industry_stock_list;
  PyObject *__pyx_n_s_info;
  PyObject *__pyx_n_s_inherit;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_init_opts;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_inner;
  PyObject *__pyx_n_s_inplace;
  PyObject *__pyx_n_s_input_codes;
  PyObject *__pyx_n_s_insert;
  PyObject *__pyx_n_s_inside;
  PyObject *__pyx_n_s_int;
  PyObject *__pyx_kp_s_int_dict;
  PyObject *__pyx_n_s_intersect_stock_list;
  PyObject *__pyx_kp_u_intersect_stock_list_is_empty;
  PyObject *__pyx_n_s_intersection_list;
  PyObject *__pyx_n_s_interval;
  PyObject *__pyx_n_s_isDelistStock;
  PyObject *__pyx_n_s_isDownLimit;
  PyObject *__pyx_n_s_isLowAmountStock;
  PyObject *__pyx_n_s_isMonthLastTradeDay;
  PyObject *__pyx_n_s_isNewStock;
  PyObject *__pyx_n_s_isStStock;
  PyObject *__pyx_n_s_isUpLimit;
  PyObject *__pyx_n_s_isWeekLastTradeDay;
  PyObject *__pyx_n_s_isYearLastTradeDay;
  PyObject *__pyx_n_s_is_code;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_n_s_is_delist;
  PyObject *__pyx_n_s_is_down_limit;
  PyObject *__pyx_n_s_is_fill_bg_color;
  PyObject *__pyx_n_s_is_get_max_level;
  PyObject *__pyx_n_s_is_month_last;
  PyObject *__pyx_n_s_is_on_zero;
  PyObject *__pyx_n_s_is_scale;
  PyObject *__pyx_n_s_is_session;
  PyObject *__pyx_n_s_is_show;
  PyObject *__pyx_n_s_is_smooth;
  PyObject *__pyx_n_s_is_st;
  PyObject *__pyx_n_s_is_up_limit;
  PyObject *__pyx_n_s_is_week_last;
  PyObject *__pyx_n_s_is_year_last;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_isin;
  PyObject *__pyx_n_s_item_down;
  PyObject *__pyx_n_s_item_up;
  PyObject *__pyx_n_s_items;
  PyObject *__pyx_n_s_itemstyle_opts;
  PyObject *__pyx_n_s_iterrows;
  PyObject *__pyx_n_s_j;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_json_file_name;
  PyObject *__pyx_n_s_judgeSingleStockByTechIndicator;
  PyObject *__pyx_n_s_keep;
  PyObject *__pyx_n_s_key;
  PyObject *__pyx_n_s_key_day;
  PyObject *__pyx_n_s_key_list;
  PyObject *__pyx_n_s_key_name;
  PyObject *__pyx_n_s_key_pandas;
  PyObject *__pyx_n_s_key_products;
  PyObject *__pyx_n_s_key_time;
  PyObject *__pyx_n_s_key_word;
  PyObject *__pyx_n_s_keys;
  PyObject *__pyx_n_s_kf_net_profit_tb;
  PyObject *__pyx_n_s_kline;
  PyObject *__pyx_kp_u_kline_html;
  PyObject *__pyx_n_s_kline_line;
  PyObject *__pyx_n_s_kwargs;
  PyObject *__pyx_n_s_label_opts;
  PyObject *__pyx_n_s_ladder_max;
  PyObject *__pyx_n_s_last_five_dict;
  PyObject *__pyx_n_s_last_five_items;
  PyObject *__pyx_n_s_latest_trade_day;
  PyObject *__pyx_n_s_left_index;
  PyObject *__pyx_n_s_legend_opts;
  PyObject *__pyx_n_s_level;
  PyObject *__pyx_n_s_level_code_list;
  PyObject *__pyx_n_s_limit_up_code_list;
  PyObject *__pyx_n_s_line;
  PyObject *__pyx_n_s_line_2;
  PyObject *__pyx_n_s_linestyle_opts;
  PyObject *__pyx_n_s_list;
  PyObject *__pyx_n_s_listIntersection;
  PyObject *__pyx_n_s_listUnion;
  PyObject *__pyx_n_s_list_2_dict;
  PyObject *__pyx_n_s_list_item;
  PyObject *__pyx_n_s_loadJsonData;
  PyObject *__pyx_n_s_loadTable;
  PyObject *__pyx_n_s_loadTableContentByDate;
  PyObject *__pyx_n_s_load_json_file;
  PyObject *__pyx_kp_s_load_json_file_2;
  PyObject *__pyx_n_s_loc;
  PyObject *__pyx_n_s_lock_time;
  PyObject *__pyx_n_s_logger;
  PyObject *__pyx_n_s_low;
  PyObject *__pyx_n_s_ma;
  PyObject *__pyx_n_s_ma_10;
  PyObject *__pyx_n_s_ma_20;
  PyObject *__pyx_n_s_ma_30;
  PyObject *__pyx_n_s_ma_5;
  PyObject *__pyx_n_s_ma_60;
  PyObject *__pyx_n_s_ma_column;
  PyObject *__pyx_n_s_ma_name;
  PyObject *__pyx_n_s_ma_time;
  PyObject *__pyx_n_s_ma_time_list;
  PyObject *__pyx_n_s_macd;
  PyObject *__pyx_n_s_macd_df;
  PyObject *__pyx_n_s_macdhist;
  PyObject *__pyx_n_s_macds;
  PyObject *__pyx_n_s_macdsignal;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_main_business;
  PyObject *__pyx_n_s_make_marketcolors;
  PyObject *__pyx_n_s_make_mpf_style;
  PyObject *__pyx_n_s_make_snapshot;
  PyObject *__pyx_n_s_map;
  PyObject *__pyx_n_s_marker_stock_list;
  PyObject *__pyx_n_s_market;
  PyObject *__pyx_n_s_market_cap;
  PyObject *__pyx_n_s_market_type;
  PyObject *__pyx_n_s_marketcolors;
  PyObject *__pyx_n_s_markpoint_opts;
  PyObject *__pyx_n_s_math;
  PyObject *__pyx_n_s_matplotlib;
  PyObject *__pyx_n_s_matplotlib_pyplot;
  PyObject *__pyx_n_s_matype;
  PyObject *__pyx_n_s_mav;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_max_2;
  PyObject *__pyx_n_s_max_depth;
  PyObject *__pyx_n_s_max_item_down;
  PyObject *__pyx_n_s_max_item_up;
  PyObject *__pyx_n_s_max_level;
  PyObject *__pyx_n_s_max_price;
  PyObject *__pyx_n_s_max_price_date;
  PyObject *__pyx_n_s_max_price_index;
  PyObject *__pyx_n_s_max_rows;
  PyObject *__pyx_n_s_max_workers;
  PyObject *__pyx_n_s_mean;
  PyObject *__pyx_n_s_merge;
  PyObject *__pyx_n_s_merged_df;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_min;
  PyObject *__pyx_n_s_min_2;
  PyObject *__pyx_n_s_min_price;
  PyObject *__pyx_n_s_min_price_date;
  PyObject *__pyx_n_s_min_price_index;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_kp_s_mode_must_switch_in_industry_con;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_month;
  PyObject *__pyx_n_s_month_2;
  PyObject *__pyx_n_s_month_levels;
  PyObject *__pyx_n_s_mpf;
  PyObject *__pyx_n_s_mplfinance;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_multi_thread;
  PyObject *__pyx_n_s_multi_type;
  PyObject *__pyx_kp_u_multi_type_parameter_set_wrong;
  PyObject *__pyx_n_s_my_color;
  PyObject *__pyx_n_s_my_dataproc;
  PyObject *__pyx_n_s_my_dict;
  PyObject *__pyx_n_s_my_method;
  PyObject *__pyx_n_s_my_plot;
  PyObject *__pyx_n_s_my_style;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_name_2;
  PyObject *__pyx_n_s_name_list;
  PyObject *__pyx_n_s_name_up_limit_times;
  PyObject *__pyx_n_s_nbdevdn;
  PyObject *__pyx_n_s_nbdevup;
  PyObject *__pyx_n_s_near;
  PyObject *__pyx_n_s_near_10;
  PyObject *__pyx_n_s_near_2;
  PyObject *__pyx_n_s_near_20;
  PyObject *__pyx_n_s_near_30;
  PyObject *__pyx_n_s_near_5;
  PyObject *__pyx_n_s_near_60;
  PyObject *__pyx_n_s_near_datetime;
  PyObject *__pyx_n_s_near_day;
  PyObject *__pyx_n_s_near_day_dict;
  PyObject *__pyx_n_s_near_day_list;
  PyObject *__pyx_n_s_near_levels;
  PyObject *__pyx_n_s_near_name;
  PyObject *__pyx_n_s_near_num;
  PyObject *__pyx_n_s_need_database_tables;
  PyObject *__pyx_n_s_negative_infinity;
  PyObject *__pyx_n_s_new_base_list;
  PyObject *__pyx_n_s_new_date;
  PyObject *__pyx_n_s_new_date_len;
  PyObject *__pyx_n_s_new_datetime_threshold;
  PyObject *__pyx_n_s_new_df;
  PyObject *__pyx_n_s_new_dict;
  PyObject *__pyx_kp_s_new_end_date;
  PyObject *__pyx_n_s_new_record;
  PyObject *__pyx_n_s_new_row_cold;
  PyObject *__pyx_n_s_new_row_hot;
  PyObject *__pyx_n_s_new_short_day_dict;
  PyObject *__pyx_n_s_new_stock_dict;
  PyObject *__pyx_n_s_new_stock_thr_date;
  PyObject *__pyx_n_s_new_thr;
  PyObject *__pyx_n_s_next_session;
  PyObject *__pyx_n_s_non_serializable_attrs;
  PyObject *__pyx_n_s_none;
  PyObject *__pyx_n_s_normed_cmap;
  PyObject *__pyx_n_s_not;
  PyObject *__pyx_n_s_now_datetime;
  PyObject *__pyx_n_s_now_price;
  PyObject *__pyx_n_s_num_k;
  PyObject *__pyx_n_s_num_quantile;
  PyObject *__pyx_n_s_num_rank;
  PyObject *__pyx_n_s_num_rows;
  PyObject *__pyx_n_s_num_tr;
  PyObject *__pyx_n_s_object;
  PyObject *__pyx_n_s_objs;
  PyObject *__pyx_n_s_opacity;
  PyObject *__pyx_n_s_open;
  PyObject *__pyx_n_s_options;
  PyObject *__pyx_n_s_opts;
  PyObject *__pyx_n_s_or;
  PyObject *__pyx_n_s_ori_dict;
  PyObject *__pyx_n_s_origin_df;
  PyObject *__pyx_n_s_os;
  PyObject *__pyx_n_s_output_name;
  PyObject *__pyx_n_s_outstand_share;
  PyObject *__pyx_n_s_overlap;
  PyObject *__pyx_n_s_overlap_bar_line;
  PyObject *__pyx_n_s_overlap_kline_line;
  PyObject *__pyx_n_s_pacoSelectStrategy;
  PyObject *__pyx_kp_s_pacoSelectStrategy___init;
  PyObject *__pyx_n_s_pacoSelectStrategy_getPotentialC;
  PyObject *__pyx_n_s_pacoSelectStrategy_getPotentialI;
  PyObject *__pyx_n_s_pacoSelectStrategy_getPotentialL;
  PyObject *__pyx_n_s_pandas;
  PyObject *__pyx_n_s_path;
  PyObject *__pyx_n_s_pd;
  PyObject *__pyx_kp_s_pd_DataFrame;
  PyObject *__pyx_kp_s_pd_DataFrame_2;
  PyObject *__pyx_n_s_per_row_num;
  PyObject *__pyx_n_s_plot;
  PyObject *__pyx_n_s_plotHoldNumberDecrease;
  PyObject *__pyx_n_s_plotHotColdConceptTable;
  PyObject *__pyx_n_s_plotHotColdFutureTable;
  PyObject *__pyx_n_s_plotHotColdIndexTable;
  PyObject *__pyx_n_s_plotHotColdIndustryConceptFreque;
  PyObject *__pyx_n_s_plotHotColdIndustryTable;
  PyObject *__pyx_n_s_plotHotColdStockTable;
  PyObject *__pyx_n_s_plotHotColdTables;
  PyObject *__pyx_n_s_plotKline;
  PyObject *__pyx_n_s_plotKlineMpl;
  PyObject *__pyx_n_s_plotStockUplimtLadder;
  PyObject *__pyx_n_s_plotStrategyFigure;
  PyObject *__pyx_n_s_plotTablePandas;
  PyObject *__pyx_n_s_plotTop10Amplitude;
  PyObject *__pyx_n_s_plotTop10UpLimit;
  PyObject *__pyx_n_s_plotTradeDistributionLen;
  PyObject *__pyx_n_s_plotWaveDownRank;
  PyObject *__pyx_n_s_plotWaveUpRank;
  PyObject *__pyx_n_s_plot_df;
  PyObject *__pyx_n_s_plottable;
  PyObject *__pyx_n_s_plottable_cmap;
  PyObject *__pyx_n_s_plt;
  PyObject *__pyx_kp_u_png;
  PyObject *__pyx_n_s_pop;
  PyObject *__pyx_n_s_pos_left;
  PyObject *__pyx_n_s_pos_right;
  PyObject *__pyx_n_s_pos_top;
  PyObject *__pyx_n_s_positive_infinity;
  PyObject *__pyx_n_s_pre_close;
  PyObject *__pyx_kp_u_pre_close_equal_zero_when_date;
  PyObject *__pyx_n_s_pre_fig_row;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_prev_date;
  PyObject *__pyx_n_s_previous;
  PyObject *__pyx_n_s_previous_session;
  PyObject *__pyx_n_s_price;
  PyObject *__pyx_n_s_price_amplitude;
  PyObject *__pyx_n_s_price_down_ratio;
  PyObject *__pyx_n_s_price_quantile;
  PyObject *__pyx_n_s_price_up_ratio;
  PyObject *__pyx_n_s_print;
  PyObject *__pyx_n_s_process;
  PyObject *__pyx_n_s_product_name;
  PyObject *__pyx_n_s_publishStrategy;
  PyObject *__pyx_kp_s_publishStrategy_2;
  PyObject *__pyx_n_s_publishStrategy___getStockLadder;
  PyObject *__pyx_kp_s_publishStrategy___init;
  PyObject *__pyx_n_s_publishStrategy__getStockLadder;
  PyObject *__pyx_n_s_publishStrategy_getConceptHotTab;
  PyObject *__pyx_n_s_publishStrategy_getFutureHotTabl;
  PyObject *__pyx_n_s_publishStrategy_getIndexHotTable;
  PyObject *__pyx_n_s_publishStrategy_getIndustryConce;
  PyObject *__pyx_n_s_publishStrategy_getIndustryHotTa;
  PyObject *__pyx_n_s_publishStrategy_getSingleStockWa;
  PyObject *__pyx_n_s_publishStrategy_getSingleStockWa_2;
  PyObject *__pyx_n_s_publishStrategy_getSingleStockWa_3;
  PyObject *__pyx_n_s_publishStrategy_getStockHoldNumb;
  PyObject *__pyx_n_s_publishStrategy_getStockHoldNumb_2;
  PyObject *__pyx_n_s_publishStrategy_getStockHotTable;
  PyObject *__pyx_n_s_publishStrategy_getStockLadderTa;
  PyObject *__pyx_n_s_publishStrategy_getStockProperty;
  PyObject *__pyx_n_s_publishStrategy_getStockProperty_2;
  PyObject *__pyx_n_s_publishStrategy_getStockProperty_3;
  PyObject *__pyx_n_s_publishStrategy_getStockWavePric;
  PyObject *__pyx_n_s_publishStrategy_getStockWavePric_2;
  PyObject *__pyx_n_s_publishStrategy_getStrategyDataA;
  PyObject *__pyx_n_s_publishStrategy_getTradeDayChang;
  PyObject *__pyx_n_s_publishStrategy_getTradeDayChang_2;
  PyObject *__pyx_n_s_publishStrategy_getTradeDistribu;
  PyObject *__pyx_n_s_publishStrategy_getTradeDistribu_2;
  PyObject *__pyx_n_s_publishStrategy_getTradeDistribu_3;
  PyObject *__pyx_n_s_publishStrategy_reset;
  PyObject *__pyx_n_s_publishStrategy_stockSingleStock;
  PyObject *__pyx_n_s_publishStrategy_stockSingleStock_2;
  PyObject *__pyx_n_s_publishStrategy_update_hot_table;
  PyObject *__pyx_n_s_publish_strategy;
  PyObject *__pyx_n_s_pyecharts;
  PyObject *__pyx_n_s_pyecharts_charts;
  PyObject *__pyx_n_s_pyecharts_commons_utils;
  PyObject *__pyx_n_s_pyecharts_globals;
  PyObject *__pyx_n_s_pyecharts_render;
  PyObject *__pyx_n_s_pyplot;
  PyObject *__pyx_n_s_qfq;
  PyObject *__pyx_n_s_qfq_up_rate;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_quantile_amplitude_tr;
  PyObject *__pyx_n_s_quantile_tr;
  PyObject *__pyx_n_s_quantile_tr_max;
  PyObject *__pyx_n_s_quantile_tr_min;
  PyObject *__pyx_n_s_quarter;
  PyObject *__pyx_n_s_query;
  PyObject *__pyx_n_s_query_date;
  PyObject *__pyx_n_s_query_date_str;
  PyObject *__pyx_n_s_query_stock_df_dict;
  PyObject *__pyx_n_s_quit;
  PyObject *__pyx_n_s_r;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_range_end;
  PyObject *__pyx_n_s_rank_level;
  PyObject *__pyx_n_s_rate_hist_dict;
  PyObject *__pyx_n_s_rate_hist_dict_len;
  PyObject *__pyx_n_s_rate_hist_list;
  PyObject *__pyx_n_s_ratio_limit;
  PyObject *__pyx_n_s_rc;
  PyObject *__pyx_n_s_rcParams;
  PyObject *__pyx_n_s_read_sql;
  PyObject *__pyx_n_s_rely_strategy_key_name;
  PyObject *__pyx_n_s_remove;
  PyObject *__pyx_n_s_render;
  PyObject *__pyx_n_s_repeat_compute;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_report_date;
  PyObject *__pyx_n_s_res;
  PyObject *__pyx_n_s_res_list;
  PyObject *__pyx_n_s_res_names;
  PyObject *__pyx_n_s_reset;
  PyObject *__pyx_n_s_reset_index;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_result_df;
  PyObject *__pyx_n_s_ret;
  PyObject *__pyx_n_s_return;
  PyObject *__pyx_n_s_return_df;
  PyObject *__pyx_n_s_return_dict;
  PyObject *__pyx_n_s_returnfig;
  PyObject *__pyx_n_s_reverse;
  PyObject *__pyx_n_s_reversed;
  PyObject *__pyx_n_s_right_ax;
  PyObject *__pyx_n_s_right_index;
  PyObject *__pyx_n_s_round;
  PyObject *__pyx_n_s_row;
  PyObject *__pyx_kp_u_row_inch;
  PyObject *__pyx_n_s_row_inch_2;
  PyObject *__pyx_n_s_row_num;
  PyObject *__pyx_n_s_rows;
  PyObject *__pyx_n_s_rsi;
  PyObject *__pyx_kp_u_s;
  PyObject *__pyx_n_s_saveToImg;
  PyObject *__pyx_n_s_save_file;
  PyObject *__pyx_n_s_save_json;
  PyObject *__pyx_n_s_save_strategy;
  PyObject *__pyx_n_s_savefig;
  PyObject *__pyx_n_s_secondary_y;
  PyObject *__pyx_n_s_selectByArea;
  PyObject *__pyx_n_s_selectByConcept;
  PyObject *__pyx_n_s_selectByIndustry;
  PyObject *__pyx_n_s_selectByKeyProduct;
  PyObject *__pyx_n_s_selectByMarket;
  PyObject *__pyx_n_s_selectByMarketCap;
  PyObject *__pyx_n_s_selectByNameWord;
  PyObject *__pyx_n_s_selectByStockPrice;
  PyObject *__pyx_n_s_selectByStockPriceQuantile;
  PyObject *__pyx_n_s_selectByTechIndicator;
  PyObject *__pyx_n_s_select_code;
  PyObject *__pyx_n_s_select_df;
  PyObject *__pyx_n_s_select_market_cap_df;
  PyObject *__pyx_n_s_select_market_cap_stock_list;
  PyObject *__pyx_n_s_select_market_list;
  PyObject *__pyx_n_s_select_str;
  PyObject *__pyx_n_s_selection_df;
  PyObject *__pyx_n_s_selenium;
  PyObject *__pyx_n_s_selenium_webdriver_edge_options;
  PyObject *__pyx_n_s_selenium_webdriver_edge_service;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_series_name;
  PyObject *__pyx_n_s_service;
  PyObject *__pyx_n_s_session;
  PyObject *__pyx_n_s_session_offset;
  PyObject *__pyx_n_s_setFigureShow;
  PyObject *__pyx_n_s_setPlotTimeLock;
  PyObject *__pyx_n_s_setStockDataDf;
  PyObject *__pyx_n_s_setStrategyJsonFile;
  PyObject *__pyx_n_s_set_dpi;
  PyObject *__pyx_n_s_set_facecolor;
  PyObject *__pyx_n_s_set_figheight;
  PyObject *__pyx_n_s_set_figwidth;
  PyObject *__pyx_n_s_set_fontsize;
  PyObject *__pyx_n_s_set_global_opts;
  PyObject *__pyx_n_s_set_index;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_set_title;
  PyObject *__pyx_n_s_set_ylabel;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_sh_calendar;
  PyObject *__pyx_n_s_shape;
  PyObject *__pyx_n_s_sheet;
  PyObject *__pyx_n_s_show;
  PyObject *__pyx_n_s_show_fig;
  PyObject *__pyx_n_s_show_figure;
  PyObject *__pyx_n_s_signalperiod;
  PyObject *__pyx_n_s_silver;
  PyObject *__pyx_n_s_simple_test;
  PyObject *__pyx_n_s_single;
  PyObject *__pyx_n_s_slowd_matype;
  PyObject *__pyx_n_s_slowd_period;
  PyObject *__pyx_n_s_slowk_matype;
  PyObject *__pyx_n_s_slowk_period;
  PyObject *__pyx_n_s_slowperiod;
  PyObject *__pyx_n_s_snapshot;
  PyObject *__pyx_n_s_snapshot_selenium;
  PyObject *__pyx_n_s_sort;
  PyObject *__pyx_n_s_sort_values;
  PyObject *__pyx_n_s_sorted_df;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_spire;
  PyObject *__pyx_n_s_spire_xls;
  PyObject *__pyx_n_s_spire_xls_common;
  PyObject *__pyx_n_s_spires;
  PyObject *__pyx_n_s_spires_common;
  PyObject *__pyx_n_s_splitStockData;
  PyObject *__pyx_n_s_split_number;
  PyObject *__pyx_n_s_splitext;
  PyObject *__pyx_n_s_splitline_opts;
  PyObject *__pyx_n_s_sql_query;
  PyObject *__pyx_n_s_sqlalchemy;
  PyObject *__pyx_n_s_st_stock_dict;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_s_startWithDigit;
  PyObject *__pyx_n_s_start_date;
  PyObject *__pyx_n_s_start_datetime;
  PyObject *__pyx_n_s_startswith;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_statement;
  PyObject *__pyx_n_s_stockSingleStockProperty;
  PyObject *__pyx_n_s_stockTechInd;
  PyObject *__pyx_n_s_stockTechInd_BOLL;
  PyObject *__pyx_n_s_stockTechInd_CDL2CROWS;
  PyObject *__pyx_n_s_stockTechInd_CDL3INSIDE;
  PyObject *__pyx_n_s_stockTechInd_CDL3STARSINSOUTH;
  PyObject *__pyx_n_s_stockTechInd_CDL3WHITESOLDIERS;
  PyObject *__pyx_n_s_stockTechInd_CDLENGULFING;
  PyObject *__pyx_n_s_stockTechInd_CDLHAMMER;
  PyObject *__pyx_n_s_stockTechInd_CDLHARAMI;
  PyObject *__pyx_n_s_stockTechInd_CDLMORNINGSTAR;
  PyObject *__pyx_n_s_stockTechInd_CDLPIERCING;
  PyObject *__pyx_n_s_stockTechInd_CDLRISEFALL3METHODS;
  PyObject *__pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS;
  PyObject *__pyx_n_s_stockTechInd_DMI;
  PyObject *__pyx_n_s_stockTechInd_EMA;
  PyObject *__pyx_n_s_stockTechInd_KDJ;
  PyObject *__pyx_n_s_stockTechInd_MA;
  PyObject *__pyx_n_s_stockTechInd_MACD;
  PyObject *__pyx_n_s_stockTechInd_MaAll;
  PyObject *__pyx_n_s_stockTechInd_OBV;
  PyObject *__pyx_n_s_stockTechInd_RSI;
  PyObject *__pyx_n_s_stockTechInd_WILLR;
  PyObject *__pyx_n_s_stockTechInd___init;
  PyObject *__pyx_n_s_stockTechInd_setFigureShow;
  PyObject *__pyx_n_s_stockTechInd_setStockDataDf;
  PyObject *__pyx_n_s_stock_basic_info;
  PyObject *__pyx_n_s_stock_basic_info_df;
  PyObject *__pyx_n_s_stock_close_price_df;
  PyObject *__pyx_n_s_stock_code;
  PyObject *__pyx_n_s_stock_code_name;
  PyObject *__pyx_n_s_stock_code_name_all;
  PyObject *__pyx_n_s_stock_concept_basic_info;
  PyObject *__pyx_n_s_stock_concept_trade_day;
  PyObject *__pyx_n_s_stock_data;
  PyObject *__pyx_n_s_stock_data_df;
  PyObject *__pyx_n_s_stock_financial_quarter;
  PyObject *__pyx_n_s_stock_financial_report;
  PyObject *__pyx_n_s_stock_hold_num_table;
  PyObject *__pyx_n_s_stock_hold_number;
  PyObject *__pyx_n_s_stock_industry_basic_info;
  PyObject *__pyx_n_s_stock_industry_trade_day;
  PyObject *__pyx_n_s_stock_ladder;
  PyObject *__pyx_n_s_stock_ladder_dict;
  PyObject *__pyx_n_s_stock_ladder_dict_yesterday;
  PyObject *__pyx_n_s_stock_list;
  PyObject *__pyx_n_s_stock_name;
  PyObject *__pyx_n_s_stock_query_df;
  PyObject *__pyx_n_s_stock_simple_info;
  PyObject *__pyx_n_s_stock_tag;
  PyObject *__pyx_n_s_stock_tmp;
  PyObject *__pyx_n_s_stock_tmp_code_list;
  PyObject *__pyx_n_s_stock_tmp_dict;
  PyObject *__pyx_n_s_stock_trade_day;
  PyObject *__pyx_n_s_stock_trade_day_2024;
  PyObject *__pyx_n_s_stock_trade_day_df;
  PyObject *__pyx_n_s_stock_up_limit_list_today;
  PyObject *__pyx_n_s_stock_uplimt_ladder;
  PyObject *__pyx_n_s_stock_wave_down;
  PyObject *__pyx_n_s_stock_wave_down_df;
  PyObject *__pyx_n_s_stock_wave_down_dict;
  PyObject *__pyx_n_s_stock_wave_up;
  PyObject *__pyx_n_s_stock_wave_up_df;
  PyObject *__pyx_n_s_stock_wave_up_dict;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_n_s_strategyCount;
  PyObject *__pyx_n_s_strategy_code_list;
  PyObject *__pyx_n_s_strategy_data_df;
  PyObject *__pyx_n_s_strategy_data_dict;
  PyObject *__pyx_n_s_strategy_data_dict_2;
  PyObject *__pyx_n_s_strategy_date;
  PyObject *__pyx_n_s_strategy_img_path;
  PyObject *__pyx_n_s_strategy_json;
  PyObject *__pyx_n_s_strategy_json_file;
  PyObject *__pyx_n_s_strategy_key_name;
  PyObject *__pyx_n_s_strategy_key_name1;
  PyObject *__pyx_n_s_strategy_key_name2;
  PyObject *__pyx_n_s_strategy_name;
  PyObject *__pyx_kp_s_strategylog_json;
  PyObject *__pyx_n_s_strftime;
  PyObject *__pyx_n_s_strptime;
  PyObject *__pyx_n_s_style;
  PyObject *__pyx_n_s_sub_strategy_name;
  PyObject *__pyx_n_s_sub_table_title;
  PyObject *__pyx_n_s_submit;
  PyObject *__pyx_n_s_subplots;
  PyObject *__pyx_n_s_subset;
  PyObject *__pyx_n_s_subtitle;
  PyObject *__pyx_n_s_succeed;
  PyObject *__pyx_n_s_suffixes;
  PyObject *__pyx_n_s_sum;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_suspended_stock_list;
  PyObject *__pyx_n_s_symbol;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_tab;
  PyObject *__pyx_kp_u_table_has_been_updated;
  PyObject *__pyx_kp_u_table_has_been_updated_2;
  PyObject *__pyx_kp_u_table_has_not_been_updated;
  PyObject *__pyx_n_s_table_name;
  PyObject *__pyx_n_s_table_rows;
  PyObject *__pyx_n_s_table_save_excel_path;
  PyObject *__pyx_n_s_table_save_path;
  PyObject *__pyx_n_s_table_save_png_path;
  PyObject *__pyx_n_s_table_title;
  PyObject *__pyx_n_s_tail;
  PyObject *__pyx_n_s_talib;
  PyObject *__pyx_n_s_tbstock;
  PyObject *__pyx_n_s_tbstock_dataAcquisition_models;
  PyObject *__pyx_n_s_tbstock_dataManagement_dataPrepr;
  PyObject *__pyx_n_s_tbstock_tradeStrategy_stockStrat;
  PyObject *__pyx_kp_s_tbstock_tradeStrategy_stockStrat_2;
  PyObject *__pyx_n_s_tbstock_utils;
  PyObject *__pyx_n_s_tech_ind;
  PyObject *__pyx_n_s_tech_ind_method;
  PyObject *__pyx_n_s_tech_index;
  PyObject *__pyx_n_s_tech_name;
  PyObject *__pyx_n_s_technicalStockStrategy;
  PyObject *__pyx_kp_s_technicalStockStrategy___init;
  PyObject *__pyx_n_s_technicalStockStrategy_getStockB;
  PyObject *__pyx_n_s_technicalStockStrategy_judgeSing;
  PyObject *__pyx_n_s_technicalStockStrategy_selectByT;
  PyObject *__pyx_n_s_temp_dict;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_test_select_stock;
  PyObject *__pyx_n_s_text_cmap;
  PyObject *__pyx_n_s_textprops;
  PyObject *__pyx_n_s_theme;
  PyObject *__pyx_n_s_thread;
  PyObject *__pyx_n_s_tight;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_kp_u_time_cost;
  PyObject *__pyx_kp_u_time_cost_2;
  PyObject *__pyx_n_s_time_key;
  PyObject *__pyx_n_s_time_value;
  PyObject *__pyx_n_s_timeperiod;
  PyObject *__pyx_n_s_times;
  PyObject *__pyx_n_s_title;
  PyObject *__pyx_n_s_title_opts;
  PyObject *__pyx_kp_u_to;
  PyObject *__pyx_n_s_to_datetime;
  PyObject *__pyx_n_s_to_dict;
  PyObject *__pyx_n_s_to_list;
  PyObject *__pyx_n_s_today_condition_amount;
  PyObject *__pyx_n_s_tolist;
  PyObject *__pyx_n_s_tooltip_opts;
  PyObject *__pyx_n_s_top_10_amplitude;
  PyObject *__pyx_n_s_top_10_amplitude_dict;
  PyObject *__pyx_n_s_top_10_up_limit;
  PyObject *__pyx_n_s_top_10_up_limit_dict;
  PyObject *__pyx_n_s_top_amplitude;
  PyObject *__pyx_n_s_top_up_limit;
  PyObject *__pyx_n_s_total;
  PyObject *__pyx_n_s_total_operate_revenue_tb;
  PyObject *__pyx_n_s_tqdm;
  PyObject *__pyx_n_s_trade_date;
  PyObject *__pyx_n_s_trade_day_df;
  PyObject *__pyx_n_s_trade_day_len;
  PyObject *__pyx_n_s_trade_day_table_name;
  PyObject *__pyx_n_s_trade_distribution_code;
  PyObject *__pyx_n_s_trade_distribution_len;
  PyObject *__pyx_kp_s_trade_distribution_len_html;
  PyObject *__pyx_n_s_transform;
  PyObject *__pyx_n_s_trigger;
  PyObject *__pyx_n_s_trigger_date;
  PyObject *__pyx_n_s_type;
  PyObject *__pyx_n_s_type_2;
  PyObject *__pyx_n_s_type_name;
  PyObject *__pyx_n_s_types;
  PyObject *__pyx_n_s_typing;
  PyObject *__pyx_n_s_union_list;
  PyObject *__pyx_n_s_union_stock_list;
  PyObject *__pyx_n_s_up;
  PyObject *__pyx_n_s_upLimit_times;
  PyObject *__pyx_n_s_up_limit;
  PyObject *__pyx_n_s_up_limit_stocks_list;
  PyObject *__pyx_n_s_up_num;
  PyObject *__pyx_n_s_up_row_index;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_updateRateHist;
  PyObject *__pyx_n_s_updateRateHist_2;
  PyObject *__pyx_n_s_update_day_hot_info;
  PyObject *__pyx_n_s_update_db_logs_dir;
  PyObject *__pyx_n_s_update_hot_table;
  PyObject *__pyx_n_s_update_json;
  PyObject *__pyx_n_s_update_range;
  PyObject *__pyx_n_s_update_range_dict;
  PyObject *__pyx_n_s_update_strategy_logs_dir;
  PyObject *__pyx_n_s_updated;
  PyObject *__pyx_n_s_updated_database_file;
  PyObject *__pyx_kp_s_updatelog_json;
  PyObject *__pyx_n_s_uplimt_num;
  PyObject *__pyx_n_s_upper;
  PyObject *__pyx_n_s_use_date;
  PyObject *__pyx_kp_s_use_date_2;
  PyObject *__pyx_n_s_use_date_now;
  PyObject *__pyx_n_s_use_date_previous;
  PyObject *__pyx_n_s_use_datetime;
  PyObject *__pyx_n_s_use_ma;
  PyObject *__pyx_n_s_use_num_cold;
  PyObject *__pyx_n_s_use_num_hot;
  PyObject *__pyx_n_s_use_st_stock;
  PyObject *__pyx_n_s_utils;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_value_dict;
  PyObject *__pyx_n_s_value_list;
  PyObject *__pyx_n_s_value_ratio;
  PyObject *__pyx_n_s_values;
  PyObject *__pyx_kp_s_var_barData;
  PyObject *__pyx_n_s_visualStock;
  PyObject *__pyx_n_s_visualStock___init;
  PyObject *__pyx_n_s_visualStock__convertDictToPandas;
  PyObject *__pyx_n_s_visualStock__plotHotColdTables;
  PyObject *__pyx_n_s_visualStock__plotTablePandas;
  PyObject *__pyx_n_s_visualStock__saveToImg;
  PyObject *__pyx_n_s_visualStock_closeDriver;
  PyObject *__pyx_n_s_visualStock_drawKlineChart;
  PyObject *__pyx_n_s_visualStock_dumpJsonToFile;
  PyObject *__pyx_n_s_visualStock_getWebDriver;
  PyObject *__pyx_n_s_visualStock_plotHoldNumberDecrea;
  PyObject *__pyx_n_s_visualStock_plotHotColdConceptTa;
  PyObject *__pyx_n_s_visualStock_plotHotColdFutureTab;
  PyObject *__pyx_n_s_visualStock_plotHotColdIndexTabl;
  PyObject *__pyx_n_s_visualStock_plotHotColdIndustryC;
  PyObject *__pyx_n_s_visualStock_plotHotColdIndustryT;
  PyObject *__pyx_n_s_visualStock_plotHotColdStockTabl;
  PyObject *__pyx_n_s_visualStock_plotKline;
  PyObject *__pyx_n_s_visualStock_plotKlineMpl;
  PyObject *__pyx_n_s_visualStock_plotStockUplimtLadde;
  PyObject *__pyx_n_s_visualStock_plotStrategyFigure;
  PyObject *__pyx_n_s_visualStock_plotTop10Amplitude;
  PyObject *__pyx_n_s_visualStock_plotTop10UpLimit;
  PyObject *__pyx_n_s_visualStock_plotTradeDistributio;
  PyObject *__pyx_n_s_visualStock_plotWaveDownRank;
  PyObject *__pyx_n_s_visualStock_plotWaveUpRank;
  PyObject *__pyx_n_s_visualStock_setPlotTimeLock;
  PyObject *__pyx_n_s_visualStock_setStrategyJsonFile;
  PyObject *__pyx_n_s_visualStock_splitStockData;
  PyObject *__pyx_n_s_vols;
  PyObject *__pyx_n_s_volume;
  PyObject *__pyx_n_s_warning;
  PyObject *__pyx_n_s_wave_down_ratio_record;
  PyObject *__pyx_n_s_wave_ratio;
  PyObject *__pyx_n_s_wave_up_rank_list;
  PyObject *__pyx_n_s_wave_up_ratio_record;
  PyObject *__pyx_n_s_webdriver;
  PyObject *__pyx_n_s_week;
  PyObject *__pyx_n_s_week_2;
  PyObject *__pyx_n_s_week_levels;
  PyObject *__pyx_n_s_wick;
  PyObject *__pyx_n_s_width;
  PyObject *__pyx_n_s_workbook;
  PyObject *__pyx_n_s_workers;
  PyObject *__pyx_kp_u_x;
  PyObject *__pyx_n_s_x_2;
  PyObject *__pyx_n_s_xaxis_data;
  PyObject *__pyx_n_s_xaxis_index;
  PyObject *__pyx_n_s_xaxis_opts;
  PyObject *__pyx_n_s_xlabel;
  PyObject *__pyx_n_s_xls;
  PyObject *__pyx_n_s_y;
  PyObject *__pyx_n_s_y_axis;
  PyObject *__pyx_n_s_yaxis_index;
  PyObject *__pyx_n_s_yaxis_opts;
  PyObject *__pyx_n_s_year;
  PyObject *__pyx_n_s_year_end;
  PyObject *__pyx_n_s_year_levels;
  PyObject *__pyx_n_s_year_start;
  PyObject *__pyx_n_s_year_str;
  PyObject *__pyx_n_s_ylabel;
  PyObject *__pyx_n_s_zero_num;
  PyObject *__pyx_float_0_0;
  PyObject *__pyx_float_0_1;
  PyObject *__pyx_float_0_2;
  PyObject *__pyx_float_0_3;
  PyObject *__pyx_float_0_4;
  PyObject *__pyx_float_0_5;
  PyObject *__pyx_float_0_8;
  PyObject *__pyx_float_1_0;
  PyObject *__pyx_float_1_5;
  PyObject *__pyx_float_5_0;
  PyObject *__pyx_float_0_01;
  PyObject *__pyx_float_10_0;
  PyObject *__pyx_float_25_0;
  PyObject *__pyx_float_30_0;
  PyObject *__pyx_float_50_0;
  PyObject *__pyx_float_9_85;
  PyObject *__pyx_float_100_0;
  PyObject *__pyx_float_neg_9_85;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_3;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_5;
  PyObject *__pyx_int_6;
  PyObject *__pyx_int_7;
  PyObject *__pyx_int_8;
  PyObject *__pyx_int_9;
  PyObject *__pyx_int_10;
  PyObject *__pyx_int_12;
  PyObject *__pyx_int_14;
  PyObject *__pyx_int_15;
  PyObject *__pyx_int_16;
  PyObject *__pyx_int_20;
  PyObject *__pyx_int_25;
  PyObject *__pyx_int_26;
  PyObject *__pyx_int_30;
  PyObject *__pyx_int_31;
  PyObject *__pyx_int_50;
  PyObject *__pyx_int_60;
  PyObject *__pyx_int_72;
  PyObject *__pyx_int_80;
  PyObject *__pyx_int_90;
  PyObject *__pyx_int_100;
  PyObject *__pyx_int_120;
  PyObject *__pyx_int_250;
  PyObject *__pyx_int_252;
  PyObject *__pyx_int_300;
  PyObject *__pyx_int_500;
  PyObject *__pyx_int_1900;
  PyObject *__pyx_int_2023;
  PyObject *__pyx_int_2024;
  PyObject *__pyx_int_1000000;
  PyObject *__pyx_int_50000000;
  PyObject *__pyx_int_100000000;
  PyObject *__pyx_int_neg_1;
  PyObject *__pyx_int_neg_4;
  PyObject *__pyx_int_neg_5;
  PyObject *__pyx_int_neg_59;
  PyObject *__pyx_slice_;
  PyObject *__pyx_tuple__8;
  PyObject *__pyx_slice__31;
  PyObject *__pyx_slice__39;
  PyObject *__pyx_slice__44;
  PyObject *__pyx_slice__73;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_tuple__32;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__56;
  PyObject *__pyx_tuple__57;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__76;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__78;
  PyObject *__pyx_tuple__79;
  PyObject *__pyx_tuple__90;
  PyObject *__pyx_tuple__93;
  PyObject *__pyx_tuple__94;
  PyObject *__pyx_tuple__97;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__99;
  PyObject *__pyx_slice__101;
  PyObject *__pyx_slice__137;
  PyObject *__pyx_tuple__100;
  PyObject *__pyx_tuple__106;
  PyObject *__pyx_tuple__109;
  PyObject *__pyx_tuple__110;
  PyObject *__pyx_tuple__111;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__113;
  PyObject *__pyx_tuple__114;
  PyObject *__pyx_tuple__115;
  PyObject *__pyx_tuple__116;
  PyObject *__pyx_tuple__118;
  PyObject *__pyx_tuple__119;
  PyObject *__pyx_tuple__120;
  PyObject *__pyx_tuple__121;
  PyObject *__pyx_tuple__122;
  PyObject *__pyx_tuple__123;
  PyObject *__pyx_tuple__124;
  PyObject *__pyx_tuple__125;
  PyObject *__pyx_tuple__127;
  PyObject *__pyx_tuple__130;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__134;
  PyObject *__pyx_tuple__136;
  PyObject *__pyx_tuple__138;
  PyObject *__pyx_tuple__145;
  PyObject *__pyx_tuple__146;
  PyObject *__pyx_tuple__153;
  PyObject *__pyx_tuple__154;
  PyObject *__pyx_tuple__155;
  PyObject *__pyx_tuple__156;
  PyObject *__pyx_tuple__157;
  PyObject *__pyx_tuple__158;
  PyObject *__pyx_tuple__159;
  PyObject *__pyx_tuple__161;
  PyObject *__pyx_tuple__165;
  PyObject *__pyx_tuple__168;
  PyObject *__pyx_tuple__170;
  PyObject *__pyx_tuple__173;
  PyObject *__pyx_tuple__175;
  PyObject *__pyx_tuple__177;
  PyObject *__pyx_tuple__179;
  PyObject *__pyx_tuple__181;
  PyObject *__pyx_tuple__183;
  PyObject *__pyx_tuple__184;
  PyObject *__pyx_tuple__186;
  PyObject *__pyx_tuple__188;
  PyObject *__pyx_tuple__190;
  PyObject *__pyx_tuple__192;
  PyObject *__pyx_tuple__193;
  PyObject *__pyx_tuple__199;
  PyObject *__pyx_tuple__201;
  PyObject *__pyx_tuple__202;
  PyObject *__pyx_tuple__204;
  PyObject *__pyx_tuple__206;
  PyObject *__pyx_tuple__208;
  PyObject *__pyx_tuple__209;
  PyObject *__pyx_tuple__211;
  PyObject *__pyx_tuple__212;
  PyObject *__pyx_tuple__213;
  PyObject *__pyx_tuple__214;
  PyObject *__pyx_tuple__216;
  PyObject *__pyx_tuple__218;
  PyObject *__pyx_tuple__220;
  PyObject *__pyx_tuple__222;
  PyObject *__pyx_tuple__224;
  PyObject *__pyx_tuple__226;
  PyObject *__pyx_tuple__228;
  PyObject *__pyx_tuple__230;
  PyObject *__pyx_tuple__236;
  PyObject *__pyx_tuple__248;
  PyObject *__pyx_tuple__249;
  PyObject *__pyx_tuple__250;
  PyObject *__pyx_tuple__252;
  PyObject *__pyx_tuple__255;
  PyObject *__pyx_tuple__257;
  PyObject *__pyx_tuple__260;
  PyObject *__pyx_tuple__262;
  PyObject *__pyx_tuple__264;
  PyObject *__pyx_tuple__266;
  PyObject *__pyx_tuple__268;
  PyObject *__pyx_tuple__270;
  PyObject *__pyx_tuple__273;
  PyObject *__pyx_tuple__275;
  PyObject *__pyx_tuple__276;
  PyObject *__pyx_tuple__278;
  PyObject *__pyx_tuple__280;
  PyObject *__pyx_tuple__281;
  PyObject *__pyx_tuple__283;
  PyObject *__pyx_tuple__285;
  PyObject *__pyx_tuple__287;
  PyObject *__pyx_tuple__289;
  PyObject *__pyx_tuple__291;
  PyObject *__pyx_tuple__293;
  PyObject *__pyx_tuple__295;
  PyObject *__pyx_tuple__297;
  PyObject *__pyx_tuple__299;
  PyObject *__pyx_tuple__301;
  PyObject *__pyx_tuple__303;
  PyObject *__pyx_tuple__305;
  PyObject *__pyx_tuple__306;
  PyObject *__pyx_tuple__308;
  PyObject *__pyx_tuple__310;
  PyObject *__pyx_tuple__312;
  PyObject *__pyx_tuple__313;
  PyObject *__pyx_tuple__315;
  PyObject *__pyx_tuple__316;
  PyObject *__pyx_tuple__318;
  PyObject *__pyx_tuple__320;
  PyObject *__pyx_tuple__322;
  PyObject *__pyx_tuple__323;
  PyObject *__pyx_tuple__326;
  PyObject *__pyx_tuple__328;
  PyObject *__pyx_tuple__329;
  PyObject *__pyx_tuple__331;
  PyObject *__pyx_tuple__333;
  PyObject *__pyx_tuple__335;
  PyObject *__pyx_tuple__337;
  PyObject *__pyx_tuple__339;
  PyObject *__pyx_tuple__340;
  PyObject *__pyx_tuple__342;
  PyObject *__pyx_tuple__344;
  PyObject *__pyx_tuple__345;
  PyObject *__pyx_tuple__347;
  PyObject *__pyx_tuple__348;
  PyObject *__pyx_tuple__350;
  PyObject *__pyx_tuple__351;
  PyObject *__pyx_tuple__353;
  PyObject *__pyx_tuple__354;
  PyObject *__pyx_tuple__356;
  PyObject *__pyx_tuple__357;
  PyObject *__pyx_tuple__359;
  PyObject *__pyx_tuple__360;
  PyObject *__pyx_tuple__362;
  PyObject *__pyx_tuple__364;
  PyObject *__pyx_tuple__365;
  PyObject *__pyx_tuple__367;
  PyObject *__pyx_tuple__369;
  PyObject *__pyx_tuple__370;
  PyObject *__pyx_tuple__372;
  PyObject *__pyx_tuple__373;
  PyObject *__pyx_tuple__375;
  PyObject *__pyx_tuple__377;
  PyObject *__pyx_tuple__379;
  PyObject *__pyx_tuple__382;
  PyObject *__pyx_tuple__384;
  PyObject *__pyx_tuple__385;
  PyObject *__pyx_tuple__387;
  PyObject *__pyx_tuple__389;
  PyObject *__pyx_tuple__391;
  PyObject *__pyx_tuple__393;
  PyObject *__pyx_codeobj__107;
  PyObject *__pyx_codeobj__126;
  PyObject *__pyx_codeobj__131;
  PyObject *__pyx_codeobj__133;
  PyObject *__pyx_codeobj__135;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__163;
  PyObject *__pyx_codeobj__164;
  PyObject *__pyx_codeobj__166;
  PyObject *__pyx_codeobj__167;
  PyObject *__pyx_codeobj__169;
  PyObject *__pyx_codeobj__171;
  PyObject *__pyx_codeobj__172;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__176;
  PyObject *__pyx_codeobj__178;
  PyObject *__pyx_codeobj__180;
  PyObject *__pyx_codeobj__182;
  PyObject *__pyx_codeobj__185;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__189;
  PyObject *__pyx_codeobj__191;
  PyObject *__pyx_codeobj__194;
  PyObject *__pyx_codeobj__195;
  PyObject *__pyx_codeobj__196;
  PyObject *__pyx_codeobj__197;
  PyObject *__pyx_codeobj__198;
  PyObject *__pyx_codeobj__200;
  PyObject *__pyx_codeobj__203;
  PyObject *__pyx_codeobj__205;
  PyObject *__pyx_codeobj__207;
  PyObject *__pyx_codeobj__210;
  PyObject *__pyx_codeobj__215;
  PyObject *__pyx_codeobj__217;
  PyObject *__pyx_codeobj__219;
  PyObject *__pyx_codeobj__221;
  PyObject *__pyx_codeobj__223;
  PyObject *__pyx_codeobj__225;
  PyObject *__pyx_codeobj__227;
  PyObject *__pyx_codeobj__229;
  PyObject *__pyx_codeobj__231;
  PyObject *__pyx_codeobj__232;
  PyObject *__pyx_codeobj__233;
  PyObject *__pyx_codeobj__234;
  PyObject *__pyx_codeobj__235;
  PyObject *__pyx_codeobj__237;
  PyObject *__pyx_codeobj__238;
  PyObject *__pyx_codeobj__239;
  PyObject *__pyx_codeobj__240;
  PyObject *__pyx_codeobj__241;
  PyObject *__pyx_codeobj__242;
  PyObject *__pyx_codeobj__243;
  PyObject *__pyx_codeobj__244;
  PyObject *__pyx_codeobj__245;
  PyObject *__pyx_codeobj__246;
  PyObject *__pyx_codeobj__247;
  PyObject *__pyx_codeobj__251;
  PyObject *__pyx_codeobj__253;
  PyObject *__pyx_codeobj__254;
  PyObject *__pyx_codeobj__256;
  PyObject *__pyx_codeobj__258;
  PyObject *__pyx_codeobj__259;
  PyObject *__pyx_codeobj__261;
  PyObject *__pyx_codeobj__263;
  PyObject *__pyx_codeobj__265;
  PyObject *__pyx_codeobj__267;
  PyObject *__pyx_codeobj__269;
  PyObject *__pyx_codeobj__271;
  PyObject *__pyx_codeobj__272;
  PyObject *__pyx_codeobj__274;
  PyObject *__pyx_codeobj__277;
  PyObject *__pyx_codeobj__279;
  PyObject *__pyx_codeobj__282;
  PyObject *__pyx_codeobj__284;
  PyObject *__pyx_codeobj__286;
  PyObject *__pyx_codeobj__288;
  PyObject *__pyx_codeobj__290;
  PyObject *__pyx_codeobj__292;
  PyObject *__pyx_codeobj__294;
  PyObject *__pyx_codeobj__296;
  PyObject *__pyx_codeobj__298;
  PyObject *__pyx_codeobj__300;
  PyObject *__pyx_codeobj__302;
  PyObject *__pyx_codeobj__304;
  PyObject *__pyx_codeobj__307;
  PyObject *__pyx_codeobj__309;
  PyObject *__pyx_codeobj__311;
  PyObject *__pyx_codeobj__314;
  PyObject *__pyx_codeobj__317;
  PyObject *__pyx_codeobj__319;
  PyObject *__pyx_codeobj__321;
  PyObject *__pyx_codeobj__324;
  PyObject *__pyx_codeobj__325;
  PyObject *__pyx_codeobj__327;
  PyObject *__pyx_codeobj__330;
  PyObject *__pyx_codeobj__332;
  PyObject *__pyx_codeobj__334;
  PyObject *__pyx_codeobj__336;
  PyObject *__pyx_codeobj__338;
  PyObject *__pyx_codeobj__341;
  PyObject *__pyx_codeobj__343;
  PyObject *__pyx_codeobj__346;
  PyObject *__pyx_codeobj__349;
  PyObject *__pyx_codeobj__352;
  PyObject *__pyx_codeobj__355;
  PyObject *__pyx_codeobj__358;
  PyObject *__pyx_codeobj__361;
  PyObject *__pyx_codeobj__363;
  PyObject *__pyx_codeobj__366;
  PyObject *__pyx_codeobj__368;
  PyObject *__pyx_codeobj__371;
  PyObject *__pyx_codeobj__374;
  PyObject *__pyx_codeobj__376;
  PyObject *__pyx_codeobj__378;
  PyObject *__pyx_codeobj__380;
  PyObject *__pyx_codeobj__381;
  PyObject *__pyx_codeobj__383;
  PyObject *__pyx_codeobj__386;
  PyObject *__pyx_codeobj__388;
  PyObject *__pyx_codeobj__390;
  PyObject *__pyx_codeobj__392;
  PyObject *__pyx_codeobj__394;
} __pyx_mstate;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_00);
  Py_CLEAR(clear_module_state->__pyx_kp_u_0_1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0_1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0_399003);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0_82_0_83_0_85);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_10);
  Py_CLEAR(clear_module_state->__pyx_kp_s_14);
  Py_CLEAR(clear_module_state->__pyx_kp_s_14b143);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_000003);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_000012);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_000013);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_2_3_4_finished);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_2_3_4_quarter_finished_4_repo);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_5);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_K_2_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_finished_2_finished_3_finishe);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1_x_finished_x_finished_x_finis);
  Py_CLEAR(clear_module_state->__pyx_kp_s_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20240101);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20240625);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20240813);
  Py_CLEAR(clear_module_state->__pyx_kp_s_2f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_30);
  Py_CLEAR(clear_module_state->__pyx_kp_s_300416);
  Py_CLEAR(clear_module_state->__pyx_kp_s_4);
  Py_CLEAR(clear_module_state->__pyx_kp_s_5_1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_5_9_85);
  Py_CLEAR(clear_module_state->__pyx_n_u_6);
  Py_CLEAR(clear_module_state->__pyx_kp_s_60);
  Py_CLEAR(clear_module_state->__pyx_kp_s_601360);
  Py_CLEAR(clear_module_state->__pyx_kp_s_60_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_68);
  Py_CLEAR(clear_module_state->__pyx_kp_s_71);
  Py_CLEAR(clear_module_state->__pyx_kp_s_8);
  Py_CLEAR(clear_module_state->__pyx_kp_s_82);
  Py_CLEAR(clear_module_state->__pyx_kp_s_97);
  Py_CLEAR(clear_module_state->__pyx_kp_s_9_85);
  Py_CLEAR(clear_module_state->__pyx_kp_s_9_85_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_9_85_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_ADX);
  Py_CLEAR(clear_module_state->__pyx_n_s_ADXR);
  Py_CLEAR(clear_module_state->__pyx_kp_s_AI);
  Py_CLEAR(clear_module_state->__pyx_kp_s_AR_PL_UKai_CN);
  Py_CLEAR(clear_module_state->__pyx_n_s_AxisLineOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_AxisOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_AxisTickOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_BBANDS);
  Py_CLEAR(clear_module_state->__pyx_n_s_BK0815);
  Py_CLEAR(clear_module_state->__pyx_n_s_BK0816);
  Py_CLEAR(clear_module_state->__pyx_n_s_BK0817);
  Py_CLEAR(clear_module_state->__pyx_n_s_BK1050);
  Py_CLEAR(clear_module_state->__pyx_n_s_BK1051);
  Py_CLEAR(clear_module_state->__pyx_n_s_BOLL);
  Py_CLEAR(clear_module_state->__pyx_n_s_Bar);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Beginning);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Bollinger_Bands);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDL2CROWS);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDL3INSIDE);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDL3STARSINSOUTH);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDL3WHITESOLDIERS);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLENGULFING);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLHAMMER);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLHARAMI);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLMORNINGSTAR);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLPIERCING);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLRISEFALL3METHODS);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDLXSIDEGAP3METHODS);
  Py_CLEAR(clear_module_state->__pyx_n_s_CRO);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Can_t_load);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Candle_Chart);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ColDef);
  Py_CLEAR(clear_module_state->__pyx_n_s_Counter);
  Py_CLEAR(clear_module_state->__pyx_n_s_D);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEA);
  Py_CLEAR(clear_module_state->__pyx_n_s_DEMA);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DI);
  Py_CLEAR(clear_module_state->__pyx_n_s_DIF);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DI_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DMI);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DRG_DIP);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataFrame);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataZoomOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_Dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_Dispose);
  Py_CLEAR(clear_module_state->__pyx_n_s_EMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_Edge);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Exponential_Moving_Average_EMA_l);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_getStockTradeDayInfoSq);
  Py_CLEAR(clear_module_state->__pyx_n_s_FirstColumn);
  Py_CLEAR(clear_module_state->__pyx_n_s_FirstRow);
  Py_CLEAR(clear_module_state->__pyx_n_s_Grid);
  Py_CLEAR(clear_module_state->__pyx_n_s_GridOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_H_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_InitOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_ItemStyleOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_J);
  Py_CLEAR(clear_module_state->__pyx_n_s_JsCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_K);
  Py_CLEAR(clear_module_state->__pyx_n_s_KAMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_KDJ);
  Py_CLEAR(clear_module_state->__pyx_n_s_Kline);
  Py_CLEAR(clear_module_state->__pyx_n_u_Kline_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Kline_png);
  Py_CLEAR(clear_module_state->__pyx_n_s_LIGHT);
  Py_CLEAR(clear_module_state->__pyx_n_s_L_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_LabelOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_LastColumn);
  Py_CLEAR(clear_module_state->__pyx_n_s_LastRow);
  Py_CLEAR(clear_module_state->__pyx_n_s_LegendOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_Line);
  Py_CLEAR(clear_module_state->__pyx_n_s_LineStyleOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_List);
  Py_CLEAR(clear_module_state->__pyx_n_s_LoadFromFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA10);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA20);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA30);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA5);
  Py_CLEAR(clear_module_state->__pyx_n_s_MA60);
  Py_CLEAR(clear_module_state->__pyx_n_s_MACD);
  Py_CLEAR(clear_module_state->__pyx_n_s_MAMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_MINUS_DI);
  Py_CLEAR(clear_module_state->__pyx_n_s_M_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_MaAll);
  Py_CLEAR(clear_module_state->__pyx_n_s_MarkPointItem);
  Py_CLEAR(clear_module_state->__pyx_n_s_MarkPointOpts);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Moving_average_MA_lines);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Mysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_NA);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Need_to_update_database_table);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Need_to_update_strategy);
  Py_CLEAR(clear_module_state->__pyx_n_s_OBV);
  Py_CLEAR(clear_module_state->__pyx_n_s_Options);
  Py_CLEAR(clear_module_state->__pyx_n_s_PLUS_DI);
  Py_CLEAR(clear_module_state->__pyx_n_s_ProcessPoolExecutor);
  Py_CLEAR(clear_module_state->__pyx_n_s_RSI);
  Py_CLEAR(clear_module_state->__pyx_n_s_Reds);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_SMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_ST);
  Py_CLEAR(clear_module_state->__pyx_n_s_STOCH);
  Py_CLEAR(clear_module_state->__pyx_n_s_Save);
  Py_CLEAR(clear_module_state->__pyx_n_s_Service);
  Py_CLEAR(clear_module_state->__pyx_n_s_SplitLineOpts);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Strategy_figure_has_generated);
  Py_CLEAR(clear_module_state->__pyx_n_s_T3);
  Py_CLEAR(clear_module_state->__pyx_n_s_TEMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_TIMI_COUNT);
  Py_CLEAR(clear_module_state->__pyx_n_s_TRIMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_Table);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The);
  Py_CLEAR(clear_module_state->__pyx_n_s_ThemeType);
  Py_CLEAR(clear_module_state->__pyx_n_s_ThreadPoolExecutor);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timestamp);
  Py_CLEAR(clear_module_state->__pyx_n_s_TitleOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_ToImage);
  Py_CLEAR(clear_module_state->__pyx_n_s_TooltipOpts);
  Py_CLEAR(clear_module_state->__pyx_n_s_Union);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Union_Dict_None);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Union_List_None);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Volumn);
  Py_CLEAR(clear_module_state->__pyx_n_s_WILLR);
  Py_CLEAR(clear_module_state->__pyx_n_s_WMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_WR);
  Py_CLEAR(clear_module_state->__pyx_n_s_Workbook);
  Py_CLEAR(clear_module_state->__pyx_n_s_Worksheets);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Y_m_d);
  Py_CLEAR(clear_module_state->__pyx_n_u__10);
  Py_CLEAR(clear_module_state->__pyx_kp_s__102);
  Py_CLEAR(clear_module_state->__pyx_kp_s__103);
  Py_CLEAR(clear_module_state->__pyx_kp_s__104);
  Py_CLEAR(clear_module_state->__pyx_kp_s__105);
  Py_CLEAR(clear_module_state->__pyx_kp_s__108);
  Py_CLEAR(clear_module_state->__pyx_kp_u__108);
  Py_CLEAR(clear_module_state->__pyx_kp_s__11);
  Py_CLEAR(clear_module_state->__pyx_kp_u__11);
  Py_CLEAR(clear_module_state->__pyx_n_s__117);
  Py_CLEAR(clear_module_state->__pyx_n_u__12);
  Py_CLEAR(clear_module_state->__pyx_kp_s__128);
  Py_CLEAR(clear_module_state->__pyx_kp_s__129);
  Py_CLEAR(clear_module_state->__pyx_kp_s__13);
  Py_CLEAR(clear_module_state->__pyx_kp_s__139);
  Py_CLEAR(clear_module_state->__pyx_kp_s__14);
  Py_CLEAR(clear_module_state->__pyx_kp_s__140);
  Py_CLEAR(clear_module_state->__pyx_kp_s__141);
  Py_CLEAR(clear_module_state->__pyx_kp_s__142);
  Py_CLEAR(clear_module_state->__pyx_kp_s__143);
  Py_CLEAR(clear_module_state->__pyx_kp_s__144);
  Py_CLEAR(clear_module_state->__pyx_kp_s__147);
  Py_CLEAR(clear_module_state->__pyx_kp_s__148);
  Py_CLEAR(clear_module_state->__pyx_kp_s__149);
  Py_CLEAR(clear_module_state->__pyx_kp_s__15);
  Py_CLEAR(clear_module_state->__pyx_n_u__150);
  Py_CLEAR(clear_module_state->__pyx_kp_u__151);
  Py_CLEAR(clear_module_state->__pyx_kp_s__152);
  Py_CLEAR(clear_module_state->__pyx_n_u__16);
  Py_CLEAR(clear_module_state->__pyx_kp_s__17);
  Py_CLEAR(clear_module_state->__pyx_n_u__18);
  Py_CLEAR(clear_module_state->__pyx_kp_u__19);
  Py_CLEAR(clear_module_state->__pyx_n_u__2);
  Py_CLEAR(clear_module_state->__pyx_kp_u__20);
  Py_CLEAR(clear_module_state->__pyx_kp_u__21);
  Py_CLEAR(clear_module_state->__pyx_kp_u__22);
  Py_CLEAR(clear_module_state->__pyx_kp_s__23);
  Py_CLEAR(clear_module_state->__pyx_kp_s__24);
  Py_CLEAR(clear_module_state->__pyx_kp_s__25);
  Py_CLEAR(clear_module_state->__pyx_kp_s__26);
  Py_CLEAR(clear_module_state->__pyx_kp_u__27);
  Py_CLEAR(clear_module_state->__pyx_kp_s__28);
  Py_CLEAR(clear_module_state->__pyx_kp_s__29);
  Py_CLEAR(clear_module_state->__pyx_kp_u__3);
  Py_CLEAR(clear_module_state->__pyx_kp_s__33);
  Py_CLEAR(clear_module_state->__pyx_kp_s__34);
  Py_CLEAR(clear_module_state->__pyx_kp_u__35);
  Py_CLEAR(clear_module_state->__pyx_n_u__36);
  Py_CLEAR(clear_module_state->__pyx_n_u__37);
  Py_CLEAR(clear_module_state->__pyx_kp_u__38);
  Py_CLEAR(clear_module_state->__pyx_n_s__395);
  Py_CLEAR(clear_module_state->__pyx_kp_s__4);
  Py_CLEAR(clear_module_state->__pyx_kp_u__4);
  Py_CLEAR(clear_module_state->__pyx_kp_s__40);
  Py_CLEAR(clear_module_state->__pyx_n_u__41);
  Py_CLEAR(clear_module_state->__pyx_n_u__42);
  Py_CLEAR(clear_module_state->__pyx_kp_s__43);
  Py_CLEAR(clear_module_state->__pyx_n_s__45);
  Py_CLEAR(clear_module_state->__pyx_n_u__45);
  Py_CLEAR(clear_module_state->__pyx_n_s__46);
  Py_CLEAR(clear_module_state->__pyx_n_u__46);
  Py_CLEAR(clear_module_state->__pyx_kp_s__47);
  Py_CLEAR(clear_module_state->__pyx_kp_s__49);
  Py_CLEAR(clear_module_state->__pyx_kp_s__5);
  Py_CLEAR(clear_module_state->__pyx_kp_s__50);
  Py_CLEAR(clear_module_state->__pyx_kp_s__51);
  Py_CLEAR(clear_module_state->__pyx_kp_s__52);
  Py_CLEAR(clear_module_state->__pyx_kp_s__53);
  Py_CLEAR(clear_module_state->__pyx_kp_s__54);
  Py_CLEAR(clear_module_state->__pyx_kp_s__55);
  Py_CLEAR(clear_module_state->__pyx_n_s__58);
  Py_CLEAR(clear_module_state->__pyx_kp_s__6);
  Py_CLEAR(clear_module_state->__pyx_kp_s__60);
  Py_CLEAR(clear_module_state->__pyx_kp_s__61);
  Py_CLEAR(clear_module_state->__pyx_kp_s__62);
  Py_CLEAR(clear_module_state->__pyx_kp_s__63);
  Py_CLEAR(clear_module_state->__pyx_kp_u__64);
  Py_CLEAR(clear_module_state->__pyx_n_u__65);
  Py_CLEAR(clear_module_state->__pyx_kp_u__66);
  Py_CLEAR(clear_module_state->__pyx_kp_s__67);
  Py_CLEAR(clear_module_state->__pyx_kp_s__68);
  Py_CLEAR(clear_module_state->__pyx_kp_s__69);
  Py_CLEAR(clear_module_state->__pyx_kp_s__7);
  Py_CLEAR(clear_module_state->__pyx_kp_s__70);
  Py_CLEAR(clear_module_state->__pyx_kp_s__71);
  Py_CLEAR(clear_module_state->__pyx_kp_s__72);
  Py_CLEAR(clear_module_state->__pyx_kp_s__74);
  Py_CLEAR(clear_module_state->__pyx_kp_s__75);
  Py_CLEAR(clear_module_state->__pyx_kp_s__80);
  Py_CLEAR(clear_module_state->__pyx_kp_s__81);
  Py_CLEAR(clear_module_state->__pyx_kp_s__82);
  Py_CLEAR(clear_module_state->__pyx_kp_s__83);
  Py_CLEAR(clear_module_state->__pyx_kp_s__84);
  Py_CLEAR(clear_module_state->__pyx_kp_s__85);
  Py_CLEAR(clear_module_state->__pyx_kp_s__86);
  Py_CLEAR(clear_module_state->__pyx_kp_s__87);
  Py_CLEAR(clear_module_state->__pyx_kp_s__88);
  Py_CLEAR(clear_module_state->__pyx_kp_s__89);
  Py_CLEAR(clear_module_state->__pyx_kp_u__9);
  Py_CLEAR(clear_module_state->__pyx_n_u__91);
  Py_CLEAR(clear_module_state->__pyx_kp_u__92);
  Py_CLEAR(clear_module_state->__pyx_kp_s__95);
  Py_CLEAR(clear_module_state->__pyx_kp_s__96);
  Py_CLEAR(clear_module_state->__pyx_n_s_add);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_js_funcs);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_xaxis);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_yaxis);
  Py_CLEAR(clear_module_state->__pyx_n_s_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_near_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_stock_simple_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_time_day_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_time_month_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_time_week_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_amount);
  Py_CLEAR(clear_module_state->__pyx_n_s_amount_ma);
  Py_CLEAR(clear_module_state->__pyx_n_s_amount_th);
  Py_CLEAR(clear_module_state->__pyx_n_s_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_amplitude_tr_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_amplitude_tr_min);
  Py_CLEAR(clear_module_state->__pyx_n_s_and);
  Py_CLEAR(clear_module_state->__pyx_kp_u_and_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_apply);
  Py_CLEAR(clear_module_state->__pyx_n_s_area_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_area_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_arg);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_completed);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascending);
  Py_CLEAR(clear_module_state->__pyx_n_s_astype);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_autumn_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_average_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_avg_amount_pa);
  Py_CLEAR(clear_module_state->__pyx_n_s_ax);
  Py_CLEAR(clear_module_state->__pyx_n_s_axes);
  Py_CLEAR(clear_module_state->__pyx_kp_s_axes_unicode_minus);
  Py_CLEAR(clear_module_state->__pyx_n_s_axis);
  Py_CLEAR(clear_module_state->__pyx_n_s_axis_pointer_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_axislabel_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_axisline_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_axistick_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_bar_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_bar_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_baseStrategy);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy___getstate);
  Py_CLEAR(clear_module_state->__pyx_kp_s_baseStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy___setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_checkDatabaseTableU);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_dumpJsonToFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_getAllDelistStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_getAllNewStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_getAllStStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_getStockNameByCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_isDelistStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_isDownLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_isNewStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_isStStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_isUpLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_listIntersection);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_listUnion);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_reset);
  Py_CLEAR(clear_module_state->__pyx_n_s_baseStrategy_strategyCount);
  Py_CLEAR(clear_module_state->__pyx_n_s_base_filename);
  Py_CLEAR(clear_module_state->__pyx_n_s_base_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_basename);
  Py_CLEAR(clear_module_state->__pyx_n_s_bbox_inches);
  Py_CLEAR(clear_module_state->__pyx_kp_u_begin_to_create);
  Py_CLEAR(clear_module_state->__pyx_kp_u_between);
  Py_CLEAR(clear_module_state->__pyx_n_s_bg_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_bind);
  Py_CLEAR(clear_module_state->__pyx_n_s_bool);
  Py_CLEAR(clear_module_state->__pyx_n_s_border_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_border_color0);
  Py_CLEAR(clear_module_state->__pyx_n_s_boundary_gap);
  Py_CLEAR(clear_module_state->__pyx_n_s_bwr_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_by);
  Py_CLEAR(clear_module_state->__pyx_n_s_cal_max_th);
  Py_CLEAR(clear_module_state->__pyx_n_s_cal_min_th);
  Py_CLEAR(clear_module_state->__pyx_n_s_candle);
  Py_CLEAR(clear_module_state->__pyx_kp_u_cant_get_stock_name_for);
  Py_CLEAR(clear_module_state->__pyx_n_s_capitalStockStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_capitalStockStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_capitalStockStrategy_getAllHighA);
  Py_CLEAR(clear_module_state->__pyx_n_s_capitalStockStrategy_isLowAmount);
  Py_CLEAR(clear_module_state->__pyx_n_s_category);
  Py_CLEAR(clear_module_state->__pyx_n_s_ceil);
  Py_CLEAR(clear_module_state->__pyx_n_s_center);
  Py_CLEAR(clear_module_state->__pyx_n_s_change_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_checkDatabaseTableUpdate);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_serializability);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_closeDriver);
  Py_CLEAR(clear_module_state->__pyx_n_s_cm);
  Py_CLEAR(clear_module_state->__pyx_n_s_cmap);
  Py_CLEAR(clear_module_state->__pyx_n_s_co_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_code_name_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_codes_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_codes_str);
  Py_CLEAR(clear_module_state->__pyx_kp_u_col_inch);
  Py_CLEAR(clear_module_state->__pyx_n_s_col_inch_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_col_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_col_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_col_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_collections);
  Py_CLEAR(clear_module_state->__pyx_n_s_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_color0);
  Py_CLEAR(clear_module_state->__pyx_n_s_color_function);
  Py_CLEAR(clear_module_state->__pyx_n_s_color_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_column_definitions);
  Py_CLEAR(clear_module_state->__pyx_n_s_column_name_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_columns);
  Py_CLEAR(clear_module_state->__pyx_n_s_common);
  Py_CLEAR(clear_module_state->__pyx_kp_u_compute_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_concat);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_concurrent_futures);
  Py_CLEAR(clear_module_state->__pyx_n_s_convertDictToPandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_count);
  Py_CLEAR(clear_module_state->__pyx_n_s_create_engine_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_cumprod);
  Py_CLEAR(clear_module_state->__pyx_n_s_cumprod_change_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_cumulative_product);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_price);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataManagement);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataMax);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataMin);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataPreprocess);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_list);
  Py_CLEAR(clear_module_state->__pyx_kp_s_data_must_be_a_dictionary);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_simple_info_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataproc);
  Py_CLEAR(clear_module_state->__pyx_n_s_datas);
  Py_CLEAR(clear_module_state->__pyx_n_s_datazoom_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_to_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_datetime);
  Py_CLEAR(clear_module_state->__pyx_kp_s_datetime64_ns);
  Py_CLEAR(clear_module_state->__pyx_n_s_datetime_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_cold_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_cold_frequency_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_hot_cold_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_hot_cold_frequency_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_hot_cold_frequency_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_hot_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_hot_frequency_df);
  Py_CLEAR(clear_module_state->__pyx_kp_u_day_info_firstly);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_day_levels);
  Py_CLEAR(clear_module_state->__pyx_n_s_deas);
  Py_CLEAR(clear_module_state->__pyx_n_s_decrease_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_deepcopy);
  Py_CLEAR(clear_module_state->__pyx_n_s_delist_stock_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dependent_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_depth);
  Py_CLEAR(clear_module_state->__pyx_n_s_desc);
  Py_CLEAR(clear_module_state->__pyx_n_s_desc_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_df_filtered);
  Py_CLEAR(clear_module_state->__pyx_n_s_df_grouped);
  Py_CLEAR(clear_module_state->__pyx_n_s_df_left);
  Py_CLEAR(clear_module_state->__pyx_n_s_df_ma);
  Py_CLEAR(clear_module_state->__pyx_n_s_df_right);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_difs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_dispose);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_n_s_down);
  Py_CLEAR(clear_module_state->__pyx_n_s_down_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_down_row_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_downlimt_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_dpi);
  Py_CLEAR(clear_module_state->__pyx_n_s_drawKlineChart);
  Py_CLEAR(clear_module_state->__pyx_n_s_driver);
  Py_CLEAR(clear_module_state->__pyx_n_s_drop);
  Py_CLEAR(clear_module_state->__pyx_n_s_drop_duplicates);
  Py_CLEAR(clear_module_state->__pyx_n_s_dt);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_dumpJsonToFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_driver_path);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ef232a);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_10);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_20);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_30);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_60);
  Py_CLEAR(clear_module_state->__pyx_n_s_ema_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_end1);
  Py_CLEAR(clear_module_state->__pyx_n_s_end5);
  Py_CLEAR(clear_module_state->__pyx_n_s_end_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_engine);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_error);
  Py_CLEAR(clear_module_state->__pyx_n_s_exclude_codes);
  Py_CLEAR(clear_module_state->__pyx_n_s_exclude_concepts);
  Py_CLEAR(clear_module_state->__pyx_n_s_exclude_indexes);
  Py_CLEAR(clear_module_state->__pyx_n_s_executable_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_executor);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_f_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_facecolor);
  Py_CLEAR(clear_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoF);
  Py_CLEAR(clear_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoF_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoS);
  Py_CLEAR(clear_module_state->__pyx_n_s_family);
  Py_CLEAR(clear_module_state->__pyx_n_s_fastk_period);
  Py_CLEAR(clear_module_state->__pyx_n_s_fastperiod);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ffffff);
  Py_CLEAR(clear_module_state->__pyx_n_s_fig);
  Py_CLEAR(clear_module_state->__pyx_n_s_fig_bar);
  Py_CLEAR(clear_module_state->__pyx_n_s_figcolor);
  Py_CLEAR(clear_module_state->__pyx_n_s_figsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_figure);
  Py_CLEAR(clear_module_state->__pyx_n_s_figure_save_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_figure_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_figured);
  Py_CLEAR(clear_module_state->__pyx_n_s_file_extension);
  Py_CLEAR(clear_module_state->__pyx_n_s_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_filename);
  Py_CLEAR(clear_module_state->__pyx_n_s_fillna);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter_dict_item);
  Py_CLEAR(clear_module_state->__pyx_kp_s_filter_dict_report_date_should_b);
  Py_CLEAR(clear_module_state->__pyx_kp_s_filter_dict_report_date_should_n);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_financialStockStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_financialStockStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_financialStockStrategy_getStockB);
  Py_CLEAR(clear_module_state->__pyx_n_s_financialStockStrategy_getStockM);
  Py_CLEAR(clear_module_state->__pyx_n_s_financial_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_financial_quarter_selection);
  Py_CLEAR(clear_module_state->__pyx_n_s_financial_report_selection);
  Py_CLEAR(clear_module_state->__pyx_n_s_first);
  Py_CLEAR(clear_module_state->__pyx_n_s_first_uplimit_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_first_use_date);
  Py_CLEAR(clear_module_state->__pyx_kp_u_firstly);
  Py_CLEAR(clear_module_state->__pyx_n_s_floor);
  Py_CLEAR(clear_module_state->__pyx_n_s_font);
  Py_CLEAR(clear_module_state->__pyx_n_s_fontsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_foot_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_formatter);
  Py_CLEAR(clear_module_state->__pyx_n_s_fun_driver);
  Py_CLEAR(clear_module_state->__pyx_n_s_fun_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_function_params_if_params_dataI);
  Py_CLEAR(clear_module_state->__pyx_kp_s_function_params_var_colorList_i);
  Py_CLEAR(clear_module_state->__pyx_kp_s_function_params_var_colorList_i_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_fundamentalStockStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_getSing);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_10);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_11);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_12);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_4);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_6);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_7);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_9);
  Py_CLEAR(clear_module_state->__pyx_n_s_future);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_futures);
  Py_CLEAR(clear_module_state->__pyx_n_s_g);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_getAllDelistStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getAllHighAmountStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getAllNewStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getAllStStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getAreaStockCodes);
  Py_CLEAR(clear_module_state->__pyx_n_s_getConceptHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getConceptStockCodes);
  Py_CLEAR(clear_module_state->__pyx_n_s_getFutureHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndexHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndustryConceptHotFrequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndustryHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndustryStockCodes);
  Py_CLEAR(clear_module_state->__pyx_n_s_getNameByTableCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_getOneWaveRatio);
  Py_CLEAR(clear_module_state->__pyx_n_s_getPotentialConceptStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getPotentialIndustryStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_getPotentialLimitUpStockNearDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_getSingleStockPriceQuantile);
  Py_CLEAR(clear_module_state->__pyx_n_s_getSingleStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_getSingleStockWavePriceRatio_tim);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockByFinancialData);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockByTechIndicator);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockHoldNumberChangeTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockLadder);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockLadderTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockLimitUp);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockMultiFinancialData);
  Py_CLEAR(clear_module_state->__pyx_kp_u_getStockMultiFinancialData_quart);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockNameByCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockProperty);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockProperty_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockSimpleInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockTradeDayInfoFq);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockTradeDayInfoSqlalchemy);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockWavePriceRatio);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStrategyDataAndImg);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStrategyDataAndImg_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_getSuspendedStocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_getTradeDayChangeRankBetweenDate);
  Py_CLEAR(clear_module_state->__pyx_n_s_getTradeDistributionTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_getWebDriver);
  Py_CLEAR(clear_module_state->__pyx_n_s_getYearStartEndDate);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_Item);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_facecolor);
  Py_CLEAR(clear_module_state->__pyx_n_s_getframe);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_grid_chart);
  Py_CLEAR(clear_module_state->__pyx_n_s_grid_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_grid_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_gridcolor);
  Py_CLEAR(clear_module_state->__pyx_n_s_gross_profit_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_group_column);
  Py_CLEAR(clear_module_state->__pyx_n_s_group_keys);
  Py_CLEAR(clear_module_state->__pyx_n_s_groupby);
  Py_CLEAR(clear_module_state->__pyx_n_s_grouped_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_ha);
  Py_CLEAR(clear_module_state->__pyx_n_s_has_strategy_file);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_suspended_at);
  Py_CLEAR(clear_module_state->__pyx_n_s_has_update_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_head);
  Py_CLEAR(clear_module_state->__pyx_n_s_head_tail_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_height);
  Py_CLEAR(clear_module_state->__pyx_n_s_high);
  Py_CLEAR(clear_module_state->__pyx_n_s_high_amount_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_hit);
  Py_CLEAR(clear_module_state->__pyx_n_s_hold_number_decrease);
  Py_CLEAR(clear_module_state->__pyx_n_s_holder_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_cold_concept_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_cold_future_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_cold_index_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_cold_industry_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_cold_stock_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_concept_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_concept_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_future_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_index_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_industry_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_industry_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_stock_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_day_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_month);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_month_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_near_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_week);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_week_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_year);
  Py_CLEAR(clear_module_state->__pyx_n_s_hot_table_year_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_how);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_idxmax);
  Py_CLEAR(clear_module_state->__pyx_n_s_idxmin);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_iloc);
  Py_CLEAR(clear_module_state->__pyx_n_s_image);
  Py_CLEAR(clear_module_state->__pyx_n_s_img_save_path_root);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_kp_u_in);
  Py_CLEAR(clear_module_state->__pyx_n_s_include_groups);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_left);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_right);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_inherit);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_inner);
  Py_CLEAR(clear_module_state->__pyx_n_s_inplace);
  Py_CLEAR(clear_module_state->__pyx_n_s_input_codes);
  Py_CLEAR(clear_module_state->__pyx_n_s_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_inside);
  Py_CLEAR(clear_module_state->__pyx_n_s_int);
  Py_CLEAR(clear_module_state->__pyx_kp_s_int_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_intersect_stock_list);
  Py_CLEAR(clear_module_state->__pyx_kp_u_intersect_stock_list_is_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_intersection_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_interval);
  Py_CLEAR(clear_module_state->__pyx_n_s_isDelistStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_isDownLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_isLowAmountStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_isMonthLastTradeDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_isNewStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_isStStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_isUpLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_isWeekLastTradeDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_isYearLastTradeDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_delist);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_down_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_fill_bg_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_get_max_level);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_month_last);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_on_zero);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_scale);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_show);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_smooth);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_st);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_up_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_week_last);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_year_last);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_isin);
  Py_CLEAR(clear_module_state->__pyx_n_s_item_down);
  Py_CLEAR(clear_module_state->__pyx_n_s_item_up);
  Py_CLEAR(clear_module_state->__pyx_n_s_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_itemstyle_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_iterrows);
  Py_CLEAR(clear_module_state->__pyx_n_s_j);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_json_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_judgeSingleStockByTechIndicator);
  Py_CLEAR(clear_module_state->__pyx_n_s_keep);
  Py_CLEAR(clear_module_state->__pyx_n_s_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_pandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_products);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_keys);
  Py_CLEAR(clear_module_state->__pyx_n_s_kf_net_profit_tb);
  Py_CLEAR(clear_module_state->__pyx_n_s_kline);
  Py_CLEAR(clear_module_state->__pyx_kp_u_kline_html);
  Py_CLEAR(clear_module_state->__pyx_n_s_kline_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_label_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_ladder_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_last_five_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_last_five_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_latest_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_left_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_legend_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_level);
  Py_CLEAR(clear_module_state->__pyx_n_s_level_code_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_limit_up_code_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_line_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_linestyle_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_listIntersection);
  Py_CLEAR(clear_module_state->__pyx_n_s_listUnion);
  Py_CLEAR(clear_module_state->__pyx_n_s_list_2_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_list_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadJsonData);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadTableContentByDate);
  Py_CLEAR(clear_module_state->__pyx_n_s_load_json_file);
  Py_CLEAR(clear_module_state->__pyx_kp_s_load_json_file_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_loc);
  Py_CLEAR(clear_module_state->__pyx_n_s_lock_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_logger);
  Py_CLEAR(clear_module_state->__pyx_n_s_low);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_10);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_20);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_30);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_60);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_column);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_ma_time_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_macd);
  Py_CLEAR(clear_module_state->__pyx_n_s_macd_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_macdhist);
  Py_CLEAR(clear_module_state->__pyx_n_s_macds);
  Py_CLEAR(clear_module_state->__pyx_n_s_macdsignal);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_business);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_marketcolors);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_mpf_style);
  Py_CLEAR(clear_module_state->__pyx_n_s_make_snapshot);
  Py_CLEAR(clear_module_state->__pyx_n_s_map);
  Py_CLEAR(clear_module_state->__pyx_n_s_marker_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_market);
  Py_CLEAR(clear_module_state->__pyx_n_s_market_cap);
  Py_CLEAR(clear_module_state->__pyx_n_s_market_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_marketcolors);
  Py_CLEAR(clear_module_state->__pyx_n_s_markpoint_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_math);
  Py_CLEAR(clear_module_state->__pyx_n_s_matplotlib);
  Py_CLEAR(clear_module_state->__pyx_n_s_matplotlib_pyplot);
  Py_CLEAR(clear_module_state->__pyx_n_s_matype);
  Py_CLEAR(clear_module_state->__pyx_n_s_mav);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_depth);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_item_down);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_item_up);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_level);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_price);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_price_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_price_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_workers);
  Py_CLEAR(clear_module_state->__pyx_n_s_mean);
  Py_CLEAR(clear_module_state->__pyx_n_s_merge);
  Py_CLEAR(clear_module_state->__pyx_n_s_merged_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_min);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_price);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_price_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_price_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_kp_s_mode_must_switch_in_industry_con);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_month);
  Py_CLEAR(clear_module_state->__pyx_n_s_month_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_month_levels);
  Py_CLEAR(clear_module_state->__pyx_n_s_mpf);
  Py_CLEAR(clear_module_state->__pyx_n_s_mplfinance);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_multi_thread);
  Py_CLEAR(clear_module_state->__pyx_n_s_multi_type);
  Py_CLEAR(clear_module_state->__pyx_kp_u_multi_type_parameter_set_wrong);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_color);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_dataproc);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_method);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_plot);
  Py_CLEAR(clear_module_state->__pyx_n_s_my_style);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_up_limit_times);
  Py_CLEAR(clear_module_state->__pyx_n_s_nbdevdn);
  Py_CLEAR(clear_module_state->__pyx_n_s_nbdevup);
  Py_CLEAR(clear_module_state->__pyx_n_s_near);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_10);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_20);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_30);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_60);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_day_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_day_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_levels);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_near_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_need_database_tables);
  Py_CLEAR(clear_module_state->__pyx_n_s_negative_infinity);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_base_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_date_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_datetime_threshold);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_dict);
  Py_CLEAR(clear_module_state->__pyx_kp_s_new_end_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_row_cold);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_row_hot);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_short_day_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_stock_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_stock_thr_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_thr);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_serializable_attrs);
  Py_CLEAR(clear_module_state->__pyx_n_s_none);
  Py_CLEAR(clear_module_state->__pyx_n_s_normed_cmap);
  Py_CLEAR(clear_module_state->__pyx_n_s_not);
  Py_CLEAR(clear_module_state->__pyx_n_s_now_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_now_price);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_k);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_quantile);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_rank);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_tr);
  Py_CLEAR(clear_module_state->__pyx_n_s_object);
  Py_CLEAR(clear_module_state->__pyx_n_s_objs);
  Py_CLEAR(clear_module_state->__pyx_n_s_opacity);
  Py_CLEAR(clear_module_state->__pyx_n_s_open);
  Py_CLEAR(clear_module_state->__pyx_n_s_options);
  Py_CLEAR(clear_module_state->__pyx_n_s_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_or);
  Py_CLEAR(clear_module_state->__pyx_n_s_ori_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_origin_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_os);
  Py_CLEAR(clear_module_state->__pyx_n_s_output_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_outstand_share);
  Py_CLEAR(clear_module_state->__pyx_n_s_overlap);
  Py_CLEAR(clear_module_state->__pyx_n_s_overlap_bar_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_overlap_kline_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_pacoSelectStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pacoSelectStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialC);
  Py_CLEAR(clear_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialI);
  Py_CLEAR(clear_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialL);
  Py_CLEAR(clear_module_state->__pyx_n_s_pandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_pd);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pd_DataFrame);
  Py_CLEAR(clear_module_state->__pyx_kp_s_pd_DataFrame_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_per_row_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_plot);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHoldNumberDecrease);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdConceptTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdFutureTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdIndexTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdIndustryConceptFreque);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdIndustryTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdStockTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotHotColdTables);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotKline);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotKlineMpl);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotStockUplimtLadder);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotStrategyFigure);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotTablePandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotTop10Amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotTop10UpLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotTradeDistributionLen);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotWaveDownRank);
  Py_CLEAR(clear_module_state->__pyx_n_s_plotWaveUpRank);
  Py_CLEAR(clear_module_state->__pyx_n_s_plot_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_plottable);
  Py_CLEAR(clear_module_state->__pyx_n_s_plottable_cmap);
  Py_CLEAR(clear_module_state->__pyx_n_s_plt);
  Py_CLEAR(clear_module_state->__pyx_kp_u_png);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos_left);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos_right);
  Py_CLEAR(clear_module_state->__pyx_n_s_pos_top);
  Py_CLEAR(clear_module_state->__pyx_n_s_positive_infinity);
  Py_CLEAR(clear_module_state->__pyx_n_s_pre_close);
  Py_CLEAR(clear_module_state->__pyx_kp_u_pre_close_equal_zero_when_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_pre_fig_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_prev_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_previous);
  Py_CLEAR(clear_module_state->__pyx_n_s_previous_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_price);
  Py_CLEAR(clear_module_state->__pyx_n_s_price_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_price_down_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_price_quantile);
  Py_CLEAR(clear_module_state->__pyx_n_s_price_up_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_print);
  Py_CLEAR(clear_module_state->__pyx_n_s_process);
  Py_CLEAR(clear_module_state->__pyx_n_s_product_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_publishStrategy_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy___getStockLadder);
  Py_CLEAR(clear_module_state->__pyx_kp_s_publishStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy__getStockLadder);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getConceptHotTab);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getFutureHotTabl);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getIndexHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getIndustryConce);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getIndustryHotTa);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getSingleStockWa);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getSingleStockWa_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getSingleStockWa_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockHoldNumb);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockHoldNumb_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockHotTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockLadderTa);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockProperty);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockProperty_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockProperty_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockWavePric);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStockWavePric_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getStrategyDataA);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getTradeDayChang);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getTradeDayChang_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getTradeDistribu);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getTradeDistribu_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_getTradeDistribu_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_reset);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_stockSingleStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_stockSingleStock_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_publishStrategy_update_hot_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_publish_strategy);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyecharts);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyecharts_charts);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyecharts_commons_utils);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyecharts_globals);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyecharts_render);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyplot);
  Py_CLEAR(clear_module_state->__pyx_n_s_qfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_qfq_up_rate);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_quantile_amplitude_tr);
  Py_CLEAR(clear_module_state->__pyx_n_s_quantile_tr);
  Py_CLEAR(clear_module_state->__pyx_n_s_quantile_tr_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_quantile_tr_min);
  Py_CLEAR(clear_module_state->__pyx_n_s_quarter);
  Py_CLEAR(clear_module_state->__pyx_n_s_query);
  Py_CLEAR(clear_module_state->__pyx_n_s_query_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_query_date_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_query_stock_df_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_quit);
  Py_CLEAR(clear_module_state->__pyx_n_s_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_range_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_rank_level);
  Py_CLEAR(clear_module_state->__pyx_n_s_rate_hist_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_rate_hist_dict_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_rate_hist_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_ratio_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_rc);
  Py_CLEAR(clear_module_state->__pyx_n_s_rcParams);
  Py_CLEAR(clear_module_state->__pyx_n_s_read_sql);
  Py_CLEAR(clear_module_state->__pyx_n_s_rely_strategy_key_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_render);
  Py_CLEAR(clear_module_state->__pyx_n_s_repeat_compute);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_report_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_res);
  Py_CLEAR(clear_module_state->__pyx_n_s_res_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_res_names);
  Py_CLEAR(clear_module_state->__pyx_n_s_reset);
  Py_CLEAR(clear_module_state->__pyx_n_s_reset_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_result_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_ret);
  Py_CLEAR(clear_module_state->__pyx_n_s_return);
  Py_CLEAR(clear_module_state->__pyx_n_s_return_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_return_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_returnfig);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverse);
  Py_CLEAR(clear_module_state->__pyx_n_s_reversed);
  Py_CLEAR(clear_module_state->__pyx_n_s_right_ax);
  Py_CLEAR(clear_module_state->__pyx_n_s_right_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_round);
  Py_CLEAR(clear_module_state->__pyx_n_s_row);
  Py_CLEAR(clear_module_state->__pyx_kp_u_row_inch);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_inch_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_rsi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_saveToImg);
  Py_CLEAR(clear_module_state->__pyx_n_s_save_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_save_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_save_strategy);
  Py_CLEAR(clear_module_state->__pyx_n_s_savefig);
  Py_CLEAR(clear_module_state->__pyx_n_s_secondary_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByArea);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByConcept);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByIndustry);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByKeyProduct);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByMarket);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByMarketCap);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByNameWord);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByStockPrice);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByStockPriceQuantile);
  Py_CLEAR(clear_module_state->__pyx_n_s_selectByTechIndicator);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_market_cap_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_market_cap_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_market_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_select_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_selection_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_selenium);
  Py_CLEAR(clear_module_state->__pyx_n_s_selenium_webdriver_edge_options);
  Py_CLEAR(clear_module_state->__pyx_n_s_selenium_webdriver_edge_service);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_series_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_service);
  Py_CLEAR(clear_module_state->__pyx_n_s_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_session_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_setFigureShow);
  Py_CLEAR(clear_module_state->__pyx_n_s_setPlotTimeLock);
  Py_CLEAR(clear_module_state->__pyx_n_s_setStockDataDf);
  Py_CLEAR(clear_module_state->__pyx_n_s_setStrategyJsonFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_dpi);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_facecolor);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_figheight);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_figwidth);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_fontsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_global_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_ylabel);
  Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_sh_calendar);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_sheet);
  Py_CLEAR(clear_module_state->__pyx_n_s_show);
  Py_CLEAR(clear_module_state->__pyx_n_s_show_fig);
  Py_CLEAR(clear_module_state->__pyx_n_s_show_figure);
  Py_CLEAR(clear_module_state->__pyx_n_s_signalperiod);
  Py_CLEAR(clear_module_state->__pyx_n_s_silver);
  Py_CLEAR(clear_module_state->__pyx_n_s_simple_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_single);
  Py_CLEAR(clear_module_state->__pyx_n_s_slowd_matype);
  Py_CLEAR(clear_module_state->__pyx_n_s_slowd_period);
  Py_CLEAR(clear_module_state->__pyx_n_s_slowk_matype);
  Py_CLEAR(clear_module_state->__pyx_n_s_slowk_period);
  Py_CLEAR(clear_module_state->__pyx_n_s_slowperiod);
  Py_CLEAR(clear_module_state->__pyx_n_s_snapshot);
  Py_CLEAR(clear_module_state->__pyx_n_s_snapshot_selenium);
  Py_CLEAR(clear_module_state->__pyx_n_s_sort);
  Py_CLEAR(clear_module_state->__pyx_n_s_sort_values);
  Py_CLEAR(clear_module_state->__pyx_n_s_sorted_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_spire);
  Py_CLEAR(clear_module_state->__pyx_n_s_spire_xls);
  Py_CLEAR(clear_module_state->__pyx_n_s_spire_xls_common);
  Py_CLEAR(clear_module_state->__pyx_n_s_spires);
  Py_CLEAR(clear_module_state->__pyx_n_s_spires_common);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitStockData);
  Py_CLEAR(clear_module_state->__pyx_n_s_split_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitext);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitline_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_sql_query);
  Py_CLEAR(clear_module_state->__pyx_n_s_sqlalchemy);
  Py_CLEAR(clear_module_state->__pyx_n_s_st_stock_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_startWithDigit);
  Py_CLEAR(clear_module_state->__pyx_n_s_start_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_start_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_startswith);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_statement);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockSingleStockProperty);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_BOLL);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDL2CROWS);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDL3INSIDE);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDL3STARSINSOUTH);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDL3WHITESOLDIERS);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLENGULFING);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLHAMMER);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLHARAMI);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLMORNINGSTAR);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLPIERCING);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLRISEFALL3METHODS);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_DMI);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_EMA);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_KDJ);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_MA);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_MACD);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_MaAll);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_OBV);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_RSI);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_WILLR);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_setFigureShow);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockTechInd_setStockDataDf);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_basic_info_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_close_price_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_code_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_code_name_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_concept_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_concept_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_financial_quarter);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_financial_report);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_hold_num_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_hold_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_ladder);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_ladder_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_ladder_dict_yesterday);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_query_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_simple_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tag);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tmp);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tmp_code_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tmp_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2024);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_up_limit_list_today);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_uplimt_ladder);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_down);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_down_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_down_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_up);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_up_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_wave_up_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategyCount);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_code_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_data_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_data_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_img_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_json_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_key_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_key_name1);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_key_name2);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_strategylog_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_strftime);
  Py_CLEAR(clear_module_state->__pyx_n_s_strptime);
  Py_CLEAR(clear_module_state->__pyx_n_s_style);
  Py_CLEAR(clear_module_state->__pyx_n_s_sub_strategy_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_sub_table_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_submit);
  Py_CLEAR(clear_module_state->__pyx_n_s_subplots);
  Py_CLEAR(clear_module_state->__pyx_n_s_subset);
  Py_CLEAR(clear_module_state->__pyx_n_s_subtitle);
  Py_CLEAR(clear_module_state->__pyx_n_s_succeed);
  Py_CLEAR(clear_module_state->__pyx_n_s_suffixes);
  Py_CLEAR(clear_module_state->__pyx_n_s_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_suspended_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_symbol);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_tab);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_not_been_updated);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_save_excel_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_save_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_save_png_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_tail);
  Py_CLEAR(clear_module_state->__pyx_n_s_talib);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataAcquisition_models);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataManagement_dataPrepr);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_tradeStrategy_stockStrat);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tbstock_tradeStrategy_stockStrat_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_utils);
  Py_CLEAR(clear_module_state->__pyx_n_s_tech_ind);
  Py_CLEAR(clear_module_state->__pyx_n_s_tech_ind_method);
  Py_CLEAR(clear_module_state->__pyx_n_s_tech_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_tech_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_technicalStockStrategy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_technicalStockStrategy___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_technicalStockStrategy_getStockB);
  Py_CLEAR(clear_module_state->__pyx_n_s_technicalStockStrategy_judgeSing);
  Py_CLEAR(clear_module_state->__pyx_n_s_technicalStockStrategy_selectByT);
  Py_CLEAR(clear_module_state->__pyx_n_s_temp_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_test_select_stock);
  Py_CLEAR(clear_module_state->__pyx_n_s_text_cmap);
  Py_CLEAR(clear_module_state->__pyx_n_s_textprops);
  Py_CLEAR(clear_module_state->__pyx_n_s_theme);
  Py_CLEAR(clear_module_state->__pyx_n_s_thread);
  Py_CLEAR(clear_module_state->__pyx_n_s_tight);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_kp_u_time_cost);
  Py_CLEAR(clear_module_state->__pyx_kp_u_time_cost_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_time_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_time_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_timeperiod);
  Py_CLEAR(clear_module_state->__pyx_n_s_times);
  Py_CLEAR(clear_module_state->__pyx_n_s_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_title_opts);
  Py_CLEAR(clear_module_state->__pyx_kp_u_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_today_condition_amount);
  Py_CLEAR(clear_module_state->__pyx_n_s_tolist);
  Py_CLEAR(clear_module_state->__pyx_n_s_tooltip_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_10_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_10_amplitude_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_10_up_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_10_up_limit_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_top_up_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_total);
  Py_CLEAR(clear_module_state->__pyx_n_s_total_operate_revenue_tb);
  Py_CLEAR(clear_module_state->__pyx_n_s_tqdm);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_day_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_day_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_day_table_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_distribution_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_trade_distribution_len);
  Py_CLEAR(clear_module_state->__pyx_kp_s_trade_distribution_len_html);
  Py_CLEAR(clear_module_state->__pyx_n_s_transform);
  Py_CLEAR(clear_module_state->__pyx_n_s_trigger);
  Py_CLEAR(clear_module_state->__pyx_n_s_trigger_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_type_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_type_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_typing);
  Py_CLEAR(clear_module_state->__pyx_n_s_union_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_union_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_up);
  Py_CLEAR(clear_module_state->__pyx_n_s_upLimit_times);
  Py_CLEAR(clear_module_state->__pyx_n_s_up_limit);
  Py_CLEAR(clear_module_state->__pyx_n_s_up_limit_stocks_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_up_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_up_row_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateRateHist);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateRateHist_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_day_hot_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_db_logs_dir);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_hot_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_range_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_strategy_logs_dir);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated_database_file);
  Py_CLEAR(clear_module_state->__pyx_kp_s_updatelog_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_uplimt_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_upper);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_date);
  Py_CLEAR(clear_module_state->__pyx_kp_s_use_date_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_date_now);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_date_previous);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_ma);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_num_cold);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_num_hot);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_st_stock);
  Py_CLEAR(clear_module_state->__pyx_n_s_utils);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_value_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_value_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_value_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_values);
  Py_CLEAR(clear_module_state->__pyx_kp_s_var_barData);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock__convertDictToPandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock__plotHotColdTables);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock__plotTablePandas);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock__saveToImg);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_closeDriver);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_drawKlineChart);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_dumpJsonToFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_getWebDriver);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHoldNumberDecrea);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdConceptTa);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdFutureTab);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdIndexTabl);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdIndustryC);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdIndustryT);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotHotColdStockTabl);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotKline);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotKlineMpl);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotStockUplimtLadde);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotStrategyFigure);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotTop10Amplitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotTop10UpLimit);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotTradeDistributio);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotWaveDownRank);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_plotWaveUpRank);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_setPlotTimeLock);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_setStrategyJsonFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_visualStock_splitStockData);
  Py_CLEAR(clear_module_state->__pyx_n_s_vols);
  Py_CLEAR(clear_module_state->__pyx_n_s_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_warning);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_down_ratio_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_ratio);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_up_rank_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_wave_up_ratio_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_webdriver);
  Py_CLEAR(clear_module_state->__pyx_n_s_week);
  Py_CLEAR(clear_module_state->__pyx_n_s_week_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_week_levels);
  Py_CLEAR(clear_module_state->__pyx_n_s_wick);
  Py_CLEAR(clear_module_state->__pyx_n_s_width);
  Py_CLEAR(clear_module_state->__pyx_n_s_workbook);
  Py_CLEAR(clear_module_state->__pyx_n_s_workers);
  Py_CLEAR(clear_module_state->__pyx_kp_u_x);
  Py_CLEAR(clear_module_state->__pyx_n_s_x_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_xaxis_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_xaxis_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_xaxis_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_xlabel);
  Py_CLEAR(clear_module_state->__pyx_n_s_xls);
  Py_CLEAR(clear_module_state->__pyx_n_s_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_y_axis);
  Py_CLEAR(clear_module_state->__pyx_n_s_yaxis_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_yaxis_opts);
  Py_CLEAR(clear_module_state->__pyx_n_s_year);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_levels);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_ylabel);
  Py_CLEAR(clear_module_state->__pyx_n_s_zero_num);
  Py_CLEAR(clear_module_state->__pyx_float_0_0);
  Py_CLEAR(clear_module_state->__pyx_float_0_1);
  Py_CLEAR(clear_module_state->__pyx_float_0_2);
  Py_CLEAR(clear_module_state->__pyx_float_0_3);
  Py_CLEAR(clear_module_state->__pyx_float_0_4);
  Py_CLEAR(clear_module_state->__pyx_float_0_5);
  Py_CLEAR(clear_module_state->__pyx_float_0_8);
  Py_CLEAR(clear_module_state->__pyx_float_1_0);
  Py_CLEAR(clear_module_state->__pyx_float_1_5);
  Py_CLEAR(clear_module_state->__pyx_float_5_0);
  Py_CLEAR(clear_module_state->__pyx_float_0_01);
  Py_CLEAR(clear_module_state->__pyx_float_10_0);
  Py_CLEAR(clear_module_state->__pyx_float_25_0);
  Py_CLEAR(clear_module_state->__pyx_float_30_0);
  Py_CLEAR(clear_module_state->__pyx_float_50_0);
  Py_CLEAR(clear_module_state->__pyx_float_9_85);
  Py_CLEAR(clear_module_state->__pyx_float_100_0);
  Py_CLEAR(clear_module_state->__pyx_float_neg_9_85);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_3);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_5);
  Py_CLEAR(clear_module_state->__pyx_int_6);
  Py_CLEAR(clear_module_state->__pyx_int_7);
  Py_CLEAR(clear_module_state->__pyx_int_8);
  Py_CLEAR(clear_module_state->__pyx_int_9);
  Py_CLEAR(clear_module_state->__pyx_int_10);
  Py_CLEAR(clear_module_state->__pyx_int_12);
  Py_CLEAR(clear_module_state->__pyx_int_14);
  Py_CLEAR(clear_module_state->__pyx_int_15);
  Py_CLEAR(clear_module_state->__pyx_int_16);
  Py_CLEAR(clear_module_state->__pyx_int_20);
  Py_CLEAR(clear_module_state->__pyx_int_25);
  Py_CLEAR(clear_module_state->__pyx_int_26);
  Py_CLEAR(clear_module_state->__pyx_int_30);
  Py_CLEAR(clear_module_state->__pyx_int_31);
  Py_CLEAR(clear_module_state->__pyx_int_50);
  Py_CLEAR(clear_module_state->__pyx_int_60);
  Py_CLEAR(clear_module_state->__pyx_int_72);
  Py_CLEAR(clear_module_state->__pyx_int_80);
  Py_CLEAR(clear_module_state->__pyx_int_90);
  Py_CLEAR(clear_module_state->__pyx_int_100);
  Py_CLEAR(clear_module_state->__pyx_int_120);
  Py_CLEAR(clear_module_state->__pyx_int_250);
  Py_CLEAR(clear_module_state->__pyx_int_252);
  Py_CLEAR(clear_module_state->__pyx_int_300);
  Py_CLEAR(clear_module_state->__pyx_int_500);
  Py_CLEAR(clear_module_state->__pyx_int_1900);
  Py_CLEAR(clear_module_state->__pyx_int_2023);
  Py_CLEAR(clear_module_state->__pyx_int_2024);
  Py_CLEAR(clear_module_state->__pyx_int_1000000);
  Py_CLEAR(clear_module_state->__pyx_int_50000000);
  Py_CLEAR(clear_module_state->__pyx_int_100000000);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_int_neg_4);
  Py_CLEAR(clear_module_state->__pyx_int_neg_5);
  Py_CLEAR(clear_module_state->__pyx_int_neg_59);
  Py_CLEAR(clear_module_state->__pyx_slice_);
  Py_CLEAR(clear_module_state->__pyx_tuple__8);
  Py_CLEAR(clear_module_state->__pyx_slice__31);
  Py_CLEAR(clear_module_state->__pyx_slice__39);
  Py_CLEAR(clear_module_state->__pyx_slice__44);
  Py_CLEAR(clear_module_state->__pyx_slice__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__56);
  Py_CLEAR(clear_module_state->__pyx_tuple__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__76);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__78);
  Py_CLEAR(clear_module_state->__pyx_tuple__79);
  Py_CLEAR(clear_module_state->__pyx_tuple__90);
  Py_CLEAR(clear_module_state->__pyx_tuple__93);
  Py_CLEAR(clear_module_state->__pyx_tuple__94);
  Py_CLEAR(clear_module_state->__pyx_tuple__97);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__99);
  Py_CLEAR(clear_module_state->__pyx_slice__101);
  Py_CLEAR(clear_module_state->__pyx_slice__137);
  Py_CLEAR(clear_module_state->__pyx_tuple__100);
  Py_CLEAR(clear_module_state->__pyx_tuple__106);
  Py_CLEAR(clear_module_state->__pyx_tuple__109);
  Py_CLEAR(clear_module_state->__pyx_tuple__110);
  Py_CLEAR(clear_module_state->__pyx_tuple__111);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__113);
  Py_CLEAR(clear_module_state->__pyx_tuple__114);
  Py_CLEAR(clear_module_state->__pyx_tuple__115);
  Py_CLEAR(clear_module_state->__pyx_tuple__116);
  Py_CLEAR(clear_module_state->__pyx_tuple__118);
  Py_CLEAR(clear_module_state->__pyx_tuple__119);
  Py_CLEAR(clear_module_state->__pyx_tuple__120);
  Py_CLEAR(clear_module_state->__pyx_tuple__121);
  Py_CLEAR(clear_module_state->__pyx_tuple__122);
  Py_CLEAR(clear_module_state->__pyx_tuple__123);
  Py_CLEAR(clear_module_state->__pyx_tuple__124);
  Py_CLEAR(clear_module_state->__pyx_tuple__125);
  Py_CLEAR(clear_module_state->__pyx_tuple__127);
  Py_CLEAR(clear_module_state->__pyx_tuple__130);
  Py_CLEAR(clear_module_state->__pyx_tuple__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__134);
  Py_CLEAR(clear_module_state->__pyx_tuple__136);
  Py_CLEAR(clear_module_state->__pyx_tuple__138);
  Py_CLEAR(clear_module_state->__pyx_tuple__145);
  Py_CLEAR(clear_module_state->__pyx_tuple__146);
  Py_CLEAR(clear_module_state->__pyx_tuple__153);
  Py_CLEAR(clear_module_state->__pyx_tuple__154);
  Py_CLEAR(clear_module_state->__pyx_tuple__155);
  Py_CLEAR(clear_module_state->__pyx_tuple__156);
  Py_CLEAR(clear_module_state->__pyx_tuple__157);
  Py_CLEAR(clear_module_state->__pyx_tuple__158);
  Py_CLEAR(clear_module_state->__pyx_tuple__159);
  Py_CLEAR(clear_module_state->__pyx_tuple__161);
  Py_CLEAR(clear_module_state->__pyx_tuple__165);
  Py_CLEAR(clear_module_state->__pyx_tuple__168);
  Py_CLEAR(clear_module_state->__pyx_tuple__170);
  Py_CLEAR(clear_module_state->__pyx_tuple__173);
  Py_CLEAR(clear_module_state->__pyx_tuple__175);
  Py_CLEAR(clear_module_state->__pyx_tuple__177);
  Py_CLEAR(clear_module_state->__pyx_tuple__179);
  Py_CLEAR(clear_module_state->__pyx_tuple__181);
  Py_CLEAR(clear_module_state->__pyx_tuple__183);
  Py_CLEAR(clear_module_state->__pyx_tuple__184);
  Py_CLEAR(clear_module_state->__pyx_tuple__186);
  Py_CLEAR(clear_module_state->__pyx_tuple__188);
  Py_CLEAR(clear_module_state->__pyx_tuple__190);
  Py_CLEAR(clear_module_state->__pyx_tuple__192);
  Py_CLEAR(clear_module_state->__pyx_tuple__193);
  Py_CLEAR(clear_module_state->__pyx_tuple__199);
  Py_CLEAR(clear_module_state->__pyx_tuple__201);
  Py_CLEAR(clear_module_state->__pyx_tuple__202);
  Py_CLEAR(clear_module_state->__pyx_tuple__204);
  Py_CLEAR(clear_module_state->__pyx_tuple__206);
  Py_CLEAR(clear_module_state->__pyx_tuple__208);
  Py_CLEAR(clear_module_state->__pyx_tuple__209);
  Py_CLEAR(clear_module_state->__pyx_tuple__211);
  Py_CLEAR(clear_module_state->__pyx_tuple__212);
  Py_CLEAR(clear_module_state->__pyx_tuple__213);
  Py_CLEAR(clear_module_state->__pyx_tuple__214);
  Py_CLEAR(clear_module_state->__pyx_tuple__216);
  Py_CLEAR(clear_module_state->__pyx_tuple__218);
  Py_CLEAR(clear_module_state->__pyx_tuple__220);
  Py_CLEAR(clear_module_state->__pyx_tuple__222);
  Py_CLEAR(clear_module_state->__pyx_tuple__224);
  Py_CLEAR(clear_module_state->__pyx_tuple__226);
  Py_CLEAR(clear_module_state->__pyx_tuple__228);
  Py_CLEAR(clear_module_state->__pyx_tuple__230);
  Py_CLEAR(clear_module_state->__pyx_tuple__236);
  Py_CLEAR(clear_module_state->__pyx_tuple__248);
  Py_CLEAR(clear_module_state->__pyx_tuple__249);
  Py_CLEAR(clear_module_state->__pyx_tuple__250);
  Py_CLEAR(clear_module_state->__pyx_tuple__252);
  Py_CLEAR(clear_module_state->__pyx_tuple__255);
  Py_CLEAR(clear_module_state->__pyx_tuple__257);
  Py_CLEAR(clear_module_state->__pyx_tuple__260);
  Py_CLEAR(clear_module_state->__pyx_tuple__262);
  Py_CLEAR(clear_module_state->__pyx_tuple__264);
  Py_CLEAR(clear_module_state->__pyx_tuple__266);
  Py_CLEAR(clear_module_state->__pyx_tuple__268);
  Py_CLEAR(clear_module_state->__pyx_tuple__270);
  Py_CLEAR(clear_module_state->__pyx_tuple__273);
  Py_CLEAR(clear_module_state->__pyx_tuple__275);
  Py_CLEAR(clear_module_state->__pyx_tuple__276);
  Py_CLEAR(clear_module_state->__pyx_tuple__278);
  Py_CLEAR(clear_module_state->__pyx_tuple__280);
  Py_CLEAR(clear_module_state->__pyx_tuple__281);
  Py_CLEAR(clear_module_state->__pyx_tuple__283);
  Py_CLEAR(clear_module_state->__pyx_tuple__285);
  Py_CLEAR(clear_module_state->__pyx_tuple__287);
  Py_CLEAR(clear_module_state->__pyx_tuple__289);
  Py_CLEAR(clear_module_state->__pyx_tuple__291);
  Py_CLEAR(clear_module_state->__pyx_tuple__293);
  Py_CLEAR(clear_module_state->__pyx_tuple__295);
  Py_CLEAR(clear_module_state->__pyx_tuple__297);
  Py_CLEAR(clear_module_state->__pyx_tuple__299);
  Py_CLEAR(clear_module_state->__pyx_tuple__301);
  Py_CLEAR(clear_module_state->__pyx_tuple__303);
  Py_CLEAR(clear_module_state->__pyx_tuple__305);
  Py_CLEAR(clear_module_state->__pyx_tuple__306);
  Py_CLEAR(clear_module_state->__pyx_tuple__308);
  Py_CLEAR(clear_module_state->__pyx_tuple__310);
  Py_CLEAR(clear_module_state->__pyx_tuple__312);
  Py_CLEAR(clear_module_state->__pyx_tuple__313);
  Py_CLEAR(clear_module_state->__pyx_tuple__315);
  Py_CLEAR(clear_module_state->__pyx_tuple__316);
  Py_CLEAR(clear_module_state->__pyx_tuple__318);
  Py_CLEAR(clear_module_state->__pyx_tuple__320);
  Py_CLEAR(clear_module_state->__pyx_tuple__322);
  Py_CLEAR(clear_module_state->__pyx_tuple__323);
  Py_CLEAR(clear_module_state->__pyx_tuple__326);
  Py_CLEAR(clear_module_state->__pyx_tuple__328);
  Py_CLEAR(clear_module_state->__pyx_tuple__329);
  Py_CLEAR(clear_module_state->__pyx_tuple__331);
  Py_CLEAR(clear_module_state->__pyx_tuple__333);
  Py_CLEAR(clear_module_state->__pyx_tuple__335);
  Py_CLEAR(clear_module_state->__pyx_tuple__337);
  Py_CLEAR(clear_module_state->__pyx_tuple__339);
  Py_CLEAR(clear_module_state->__pyx_tuple__340);
  Py_CLEAR(clear_module_state->__pyx_tuple__342);
  Py_CLEAR(clear_module_state->__pyx_tuple__344);
  Py_CLEAR(clear_module_state->__pyx_tuple__345);
  Py_CLEAR(clear_module_state->__pyx_tuple__347);
  Py_CLEAR(clear_module_state->__pyx_tuple__348);
  Py_CLEAR(clear_module_state->__pyx_tuple__350);
  Py_CLEAR(clear_module_state->__pyx_tuple__351);
  Py_CLEAR(clear_module_state->__pyx_tuple__353);
  Py_CLEAR(clear_module_state->__pyx_tuple__354);
  Py_CLEAR(clear_module_state->__pyx_tuple__356);
  Py_CLEAR(clear_module_state->__pyx_tuple__357);
  Py_CLEAR(clear_module_state->__pyx_tuple__359);
  Py_CLEAR(clear_module_state->__pyx_tuple__360);
  Py_CLEAR(clear_module_state->__pyx_tuple__362);
  Py_CLEAR(clear_module_state->__pyx_tuple__364);
  Py_CLEAR(clear_module_state->__pyx_tuple__365);
  Py_CLEAR(clear_module_state->__pyx_tuple__367);
  Py_CLEAR(clear_module_state->__pyx_tuple__369);
  Py_CLEAR(clear_module_state->__pyx_tuple__370);
  Py_CLEAR(clear_module_state->__pyx_tuple__372);
  Py_CLEAR(clear_module_state->__pyx_tuple__373);
  Py_CLEAR(clear_module_state->__pyx_tuple__375);
  Py_CLEAR(clear_module_state->__pyx_tuple__377);
  Py_CLEAR(clear_module_state->__pyx_tuple__379);
  Py_CLEAR(clear_module_state->__pyx_tuple__382);
  Py_CLEAR(clear_module_state->__pyx_tuple__384);
  Py_CLEAR(clear_module_state->__pyx_tuple__385);
  Py_CLEAR(clear_module_state->__pyx_tuple__387);
  Py_CLEAR(clear_module_state->__pyx_tuple__389);
  Py_CLEAR(clear_module_state->__pyx_tuple__391);
  Py_CLEAR(clear_module_state->__pyx_tuple__393);
  Py_CLEAR(clear_module_state->__pyx_codeobj__107);
  Py_CLEAR(clear_module_state->__pyx_codeobj__126);
  Py_CLEAR(clear_module_state->__pyx_codeobj__131);
  Py_CLEAR(clear_module_state->__pyx_codeobj__133);
  Py_CLEAR(clear_module_state->__pyx_codeobj__135);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__163);
  Py_CLEAR(clear_module_state->__pyx_codeobj__164);
  Py_CLEAR(clear_module_state->__pyx_codeobj__166);
  Py_CLEAR(clear_module_state->__pyx_codeobj__167);
  Py_CLEAR(clear_module_state->__pyx_codeobj__169);
  Py_CLEAR(clear_module_state->__pyx_codeobj__171);
  Py_CLEAR(clear_module_state->__pyx_codeobj__172);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  Py_CLEAR(clear_module_state->__pyx_codeobj__178);
  Py_CLEAR(clear_module_state->__pyx_codeobj__180);
  Py_CLEAR(clear_module_state->__pyx_codeobj__182);
  Py_CLEAR(clear_module_state->__pyx_codeobj__185);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__189);
  Py_CLEAR(clear_module_state->__pyx_codeobj__191);
  Py_CLEAR(clear_module_state->__pyx_codeobj__194);
  Py_CLEAR(clear_module_state->__pyx_codeobj__195);
  Py_CLEAR(clear_module_state->__pyx_codeobj__196);
  Py_CLEAR(clear_module_state->__pyx_codeobj__197);
  Py_CLEAR(clear_module_state->__pyx_codeobj__198);
  Py_CLEAR(clear_module_state->__pyx_codeobj__200);
  Py_CLEAR(clear_module_state->__pyx_codeobj__203);
  Py_CLEAR(clear_module_state->__pyx_codeobj__205);
  Py_CLEAR(clear_module_state->__pyx_codeobj__207);
  Py_CLEAR(clear_module_state->__pyx_codeobj__210);
  Py_CLEAR(clear_module_state->__pyx_codeobj__215);
  Py_CLEAR(clear_module_state->__pyx_codeobj__217);
  Py_CLEAR(clear_module_state->__pyx_codeobj__219);
  Py_CLEAR(clear_module_state->__pyx_codeobj__221);
  Py_CLEAR(clear_module_state->__pyx_codeobj__223);
  Py_CLEAR(clear_module_state->__pyx_codeobj__225);
  Py_CLEAR(clear_module_state->__pyx_codeobj__227);
  Py_CLEAR(clear_module_state->__pyx_codeobj__229);
  Py_CLEAR(clear_module_state->__pyx_codeobj__231);
  Py_CLEAR(clear_module_state->__pyx_codeobj__232);
  Py_CLEAR(clear_module_state->__pyx_codeobj__233);
  Py_CLEAR(clear_module_state->__pyx_codeobj__234);
  Py_CLEAR(clear_module_state->__pyx_codeobj__235);
  Py_CLEAR(clear_module_state->__pyx_codeobj__237);
  Py_CLEAR(clear_module_state->__pyx_codeobj__238);
  Py_CLEAR(clear_module_state->__pyx_codeobj__239);
  Py_CLEAR(clear_module_state->__pyx_codeobj__240);
  Py_CLEAR(clear_module_state->__pyx_codeobj__241);
  Py_CLEAR(clear_module_state->__pyx_codeobj__242);
  Py_CLEAR(clear_module_state->__pyx_codeobj__243);
  Py_CLEAR(clear_module_state->__pyx_codeobj__244);
  Py_CLEAR(clear_module_state->__pyx_codeobj__245);
  Py_CLEAR(clear_module_state->__pyx_codeobj__246);
  Py_CLEAR(clear_module_state->__pyx_codeobj__247);
  Py_CLEAR(clear_module_state->__pyx_codeobj__251);
  Py_CLEAR(clear_module_state->__pyx_codeobj__253);
  Py_CLEAR(clear_module_state->__pyx_codeobj__254);
  Py_CLEAR(clear_module_state->__pyx_codeobj__256);
  Py_CLEAR(clear_module_state->__pyx_codeobj__258);
  Py_CLEAR(clear_module_state->__pyx_codeobj__259);
  Py_CLEAR(clear_module_state->__pyx_codeobj__261);
  Py_CLEAR(clear_module_state->__pyx_codeobj__263);
  Py_CLEAR(clear_module_state->__pyx_codeobj__265);
  Py_CLEAR(clear_module_state->__pyx_codeobj__267);
  Py_CLEAR(clear_module_state->__pyx_codeobj__269);
  Py_CLEAR(clear_module_state->__pyx_codeobj__271);
  Py_CLEAR(clear_module_state->__pyx_codeobj__272);
  Py_CLEAR(clear_module_state->__pyx_codeobj__274);
  Py_CLEAR(clear_module_state->__pyx_codeobj__277);
  Py_CLEAR(clear_module_state->__pyx_codeobj__279);
  Py_CLEAR(clear_module_state->__pyx_codeobj__282);
  Py_CLEAR(clear_module_state->__pyx_codeobj__284);
  Py_CLEAR(clear_module_state->__pyx_codeobj__286);
  Py_CLEAR(clear_module_state->__pyx_codeobj__288);
  Py_CLEAR(clear_module_state->__pyx_codeobj__290);
  Py_CLEAR(clear_module_state->__pyx_codeobj__292);
  Py_CLEAR(clear_module_state->__pyx_codeobj__294);
  Py_CLEAR(clear_module_state->__pyx_codeobj__296);
  Py_CLEAR(clear_module_state->__pyx_codeobj__298);
  Py_CLEAR(clear_module_state->__pyx_codeobj__300);
  Py_CLEAR(clear_module_state->__pyx_codeobj__302);
  Py_CLEAR(clear_module_state->__pyx_codeobj__304);
  Py_CLEAR(clear_module_state->__pyx_codeobj__307);
  Py_CLEAR(clear_module_state->__pyx_codeobj__309);
  Py_CLEAR(clear_module_state->__pyx_codeobj__311);
  Py_CLEAR(clear_module_state->__pyx_codeobj__314);
  Py_CLEAR(clear_module_state->__pyx_codeobj__317);
  Py_CLEAR(clear_module_state->__pyx_codeobj__319);
  Py_CLEAR(clear_module_state->__pyx_codeobj__321);
  Py_CLEAR(clear_module_state->__pyx_codeobj__324);
  Py_CLEAR(clear_module_state->__pyx_codeobj__325);
  Py_CLEAR(clear_module_state->__pyx_codeobj__327);
  Py_CLEAR(clear_module_state->__pyx_codeobj__330);
  Py_CLEAR(clear_module_state->__pyx_codeobj__332);
  Py_CLEAR(clear_module_state->__pyx_codeobj__334);
  Py_CLEAR(clear_module_state->__pyx_codeobj__336);
  Py_CLEAR(clear_module_state->__pyx_codeobj__338);
  Py_CLEAR(clear_module_state->__pyx_codeobj__341);
  Py_CLEAR(clear_module_state->__pyx_codeobj__343);
  Py_CLEAR(clear_module_state->__pyx_codeobj__346);
  Py_CLEAR(clear_module_state->__pyx_codeobj__349);
  Py_CLEAR(clear_module_state->__pyx_codeobj__352);
  Py_CLEAR(clear_module_state->__pyx_codeobj__355);
  Py_CLEAR(clear_module_state->__pyx_codeobj__358);
  Py_CLEAR(clear_module_state->__pyx_codeobj__361);
  Py_CLEAR(clear_module_state->__pyx_codeobj__363);
  Py_CLEAR(clear_module_state->__pyx_codeobj__366);
  Py_CLEAR(clear_module_state->__pyx_codeobj__368);
  Py_CLEAR(clear_module_state->__pyx_codeobj__371);
  Py_CLEAR(clear_module_state->__pyx_codeobj__374);
  Py_CLEAR(clear_module_state->__pyx_codeobj__376);
  Py_CLEAR(clear_module_state->__pyx_codeobj__378);
  Py_CLEAR(clear_module_state->__pyx_codeobj__380);
  Py_CLEAR(clear_module_state->__pyx_codeobj__381);
  Py_CLEAR(clear_module_state->__pyx_codeobj__383);
  Py_CLEAR(clear_module_state->__pyx_codeobj__386);
  Py_CLEAR(clear_module_state->__pyx_codeobj__388);
  Py_CLEAR(clear_module_state->__pyx_codeobj__390);
  Py_CLEAR(clear_module_state->__pyx_codeobj__392);
  Py_CLEAR(clear_module_state->__pyx_codeobj__394);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_00);
  Py_VISIT(traverse_module_state->__pyx_kp_u_0_1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0_1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0_399003);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0_82_0_83_0_85);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_10);
  Py_VISIT(traverse_module_state->__pyx_kp_s_14);
  Py_VISIT(traverse_module_state->__pyx_kp_s_14b143);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_000003);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_000012);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_000013);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_2_3_4_finished);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_2_3_4_quarter_finished_4_repo);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_5);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_K_2_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_finished_2_finished_3_finishe);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1_x_finished_x_finished_x_finis);
  Py_VISIT(traverse_module_state->__pyx_kp_s_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20240101);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20240625);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20240813);
  Py_VISIT(traverse_module_state->__pyx_kp_s_2f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_30);
  Py_VISIT(traverse_module_state->__pyx_kp_s_300416);
  Py_VISIT(traverse_module_state->__pyx_kp_s_4);
  Py_VISIT(traverse_module_state->__pyx_kp_s_5_1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_5_9_85);
  Py_VISIT(traverse_module_state->__pyx_n_u_6);
  Py_VISIT(traverse_module_state->__pyx_kp_s_60);
  Py_VISIT(traverse_module_state->__pyx_kp_s_601360);
  Py_VISIT(traverse_module_state->__pyx_kp_s_60_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_68);
  Py_VISIT(traverse_module_state->__pyx_kp_s_71);
  Py_VISIT(traverse_module_state->__pyx_kp_s_8);
  Py_VISIT(traverse_module_state->__pyx_kp_s_82);
  Py_VISIT(traverse_module_state->__pyx_kp_s_97);
  Py_VISIT(traverse_module_state->__pyx_kp_s_9_85);
  Py_VISIT(traverse_module_state->__pyx_kp_s_9_85_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_9_85_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_ADX);
  Py_VISIT(traverse_module_state->__pyx_n_s_ADXR);
  Py_VISIT(traverse_module_state->__pyx_kp_s_AI);
  Py_VISIT(traverse_module_state->__pyx_kp_s_AR_PL_UKai_CN);
  Py_VISIT(traverse_module_state->__pyx_n_s_AxisLineOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_AxisOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_AxisTickOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_BBANDS);
  Py_VISIT(traverse_module_state->__pyx_n_s_BK0815);
  Py_VISIT(traverse_module_state->__pyx_n_s_BK0816);
  Py_VISIT(traverse_module_state->__pyx_n_s_BK0817);
  Py_VISIT(traverse_module_state->__pyx_n_s_BK1050);
  Py_VISIT(traverse_module_state->__pyx_n_s_BK1051);
  Py_VISIT(traverse_module_state->__pyx_n_s_BOLL);
  Py_VISIT(traverse_module_state->__pyx_n_s_Bar);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Beginning);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Bollinger_Bands);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDL2CROWS);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDL3INSIDE);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDL3STARSINSOUTH);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDL3WHITESOLDIERS);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLENGULFING);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLHAMMER);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLHARAMI);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLMORNINGSTAR);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLPIERCING);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLRISEFALL3METHODS);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDLXSIDEGAP3METHODS);
  Py_VISIT(traverse_module_state->__pyx_n_s_CRO);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Can_t_load);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Candle_Chart);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ColDef);
  Py_VISIT(traverse_module_state->__pyx_n_s_Counter);
  Py_VISIT(traverse_module_state->__pyx_n_s_D);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEA);
  Py_VISIT(traverse_module_state->__pyx_n_s_DEMA);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DI);
  Py_VISIT(traverse_module_state->__pyx_n_s_DIF);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DI_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DMI);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DRG_DIP);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataFrame);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataZoomOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_Dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_Dispose);
  Py_VISIT(traverse_module_state->__pyx_n_s_EMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_Edge);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Exponential_Moving_Average_EMA_l);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_getStockTradeDayInfoSq);
  Py_VISIT(traverse_module_state->__pyx_n_s_FirstColumn);
  Py_VISIT(traverse_module_state->__pyx_n_s_FirstRow);
  Py_VISIT(traverse_module_state->__pyx_n_s_Grid);
  Py_VISIT(traverse_module_state->__pyx_n_s_GridOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_H_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_InitOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_ItemStyleOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_J);
  Py_VISIT(traverse_module_state->__pyx_n_s_JsCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_K);
  Py_VISIT(traverse_module_state->__pyx_n_s_KAMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_KDJ);
  Py_VISIT(traverse_module_state->__pyx_n_s_Kline);
  Py_VISIT(traverse_module_state->__pyx_n_u_Kline_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Kline_png);
  Py_VISIT(traverse_module_state->__pyx_n_s_LIGHT);
  Py_VISIT(traverse_module_state->__pyx_n_s_L_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_LabelOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_LastColumn);
  Py_VISIT(traverse_module_state->__pyx_n_s_LastRow);
  Py_VISIT(traverse_module_state->__pyx_n_s_LegendOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_Line);
  Py_VISIT(traverse_module_state->__pyx_n_s_LineStyleOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_List);
  Py_VISIT(traverse_module_state->__pyx_n_s_LoadFromFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA10);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA20);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA30);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA5);
  Py_VISIT(traverse_module_state->__pyx_n_s_MA60);
  Py_VISIT(traverse_module_state->__pyx_n_s_MACD);
  Py_VISIT(traverse_module_state->__pyx_n_s_MAMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_MINUS_DI);
  Py_VISIT(traverse_module_state->__pyx_n_s_M_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_MaAll);
  Py_VISIT(traverse_module_state->__pyx_n_s_MarkPointItem);
  Py_VISIT(traverse_module_state->__pyx_n_s_MarkPointOpts);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Moving_average_MA_lines);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Mysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_NA);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Need_to_update_database_table);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Need_to_update_strategy);
  Py_VISIT(traverse_module_state->__pyx_n_s_OBV);
  Py_VISIT(traverse_module_state->__pyx_n_s_Options);
  Py_VISIT(traverse_module_state->__pyx_n_s_PLUS_DI);
  Py_VISIT(traverse_module_state->__pyx_n_s_ProcessPoolExecutor);
  Py_VISIT(traverse_module_state->__pyx_n_s_RSI);
  Py_VISIT(traverse_module_state->__pyx_n_s_Reds);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_SMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_ST);
  Py_VISIT(traverse_module_state->__pyx_n_s_STOCH);
  Py_VISIT(traverse_module_state->__pyx_n_s_Save);
  Py_VISIT(traverse_module_state->__pyx_n_s_Service);
  Py_VISIT(traverse_module_state->__pyx_n_s_SplitLineOpts);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Strategy_figure_has_generated);
  Py_VISIT(traverse_module_state->__pyx_n_s_T3);
  Py_VISIT(traverse_module_state->__pyx_n_s_TEMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_TIMI_COUNT);
  Py_VISIT(traverse_module_state->__pyx_n_s_TRIMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_Table);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The);
  Py_VISIT(traverse_module_state->__pyx_n_s_ThemeType);
  Py_VISIT(traverse_module_state->__pyx_n_s_ThreadPoolExecutor);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timestamp);
  Py_VISIT(traverse_module_state->__pyx_n_s_TitleOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_ToImage);
  Py_VISIT(traverse_module_state->__pyx_n_s_TooltipOpts);
  Py_VISIT(traverse_module_state->__pyx_n_s_Union);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Union_Dict_None);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Union_List_None);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Volumn);
  Py_VISIT(traverse_module_state->__pyx_n_s_WILLR);
  Py_VISIT(traverse_module_state->__pyx_n_s_WMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_WR);
  Py_VISIT(traverse_module_state->__pyx_n_s_Workbook);
  Py_VISIT(traverse_module_state->__pyx_n_s_Worksheets);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Y_m_d);
  Py_VISIT(traverse_module_state->__pyx_n_u__10);
  Py_VISIT(traverse_module_state->__pyx_kp_s__102);
  Py_VISIT(traverse_module_state->__pyx_kp_s__103);
  Py_VISIT(traverse_module_state->__pyx_kp_s__104);
  Py_VISIT(traverse_module_state->__pyx_kp_s__105);
  Py_VISIT(traverse_module_state->__pyx_kp_s__108);
  Py_VISIT(traverse_module_state->__pyx_kp_u__108);
  Py_VISIT(traverse_module_state->__pyx_kp_s__11);
  Py_VISIT(traverse_module_state->__pyx_kp_u__11);
  Py_VISIT(traverse_module_state->__pyx_n_s__117);
  Py_VISIT(traverse_module_state->__pyx_n_u__12);
  Py_VISIT(traverse_module_state->__pyx_kp_s__128);
  Py_VISIT(traverse_module_state->__pyx_kp_s__129);
  Py_VISIT(traverse_module_state->__pyx_kp_s__13);
  Py_VISIT(traverse_module_state->__pyx_kp_s__139);
  Py_VISIT(traverse_module_state->__pyx_kp_s__14);
  Py_VISIT(traverse_module_state->__pyx_kp_s__140);
  Py_VISIT(traverse_module_state->__pyx_kp_s__141);
  Py_VISIT(traverse_module_state->__pyx_kp_s__142);
  Py_VISIT(traverse_module_state->__pyx_kp_s__143);
  Py_VISIT(traverse_module_state->__pyx_kp_s__144);
  Py_VISIT(traverse_module_state->__pyx_kp_s__147);
  Py_VISIT(traverse_module_state->__pyx_kp_s__148);
  Py_VISIT(traverse_module_state->__pyx_kp_s__149);
  Py_VISIT(traverse_module_state->__pyx_kp_s__15);
  Py_VISIT(traverse_module_state->__pyx_n_u__150);
  Py_VISIT(traverse_module_state->__pyx_kp_u__151);
  Py_VISIT(traverse_module_state->__pyx_kp_s__152);
  Py_VISIT(traverse_module_state->__pyx_n_u__16);
  Py_VISIT(traverse_module_state->__pyx_kp_s__17);
  Py_VISIT(traverse_module_state->__pyx_n_u__18);
  Py_VISIT(traverse_module_state->__pyx_kp_u__19);
  Py_VISIT(traverse_module_state->__pyx_n_u__2);
  Py_VISIT(traverse_module_state->__pyx_kp_u__20);
  Py_VISIT(traverse_module_state->__pyx_kp_u__21);
  Py_VISIT(traverse_module_state->__pyx_kp_u__22);
  Py_VISIT(traverse_module_state->__pyx_kp_s__23);
  Py_VISIT(traverse_module_state->__pyx_kp_s__24);
  Py_VISIT(traverse_module_state->__pyx_kp_s__25);
  Py_VISIT(traverse_module_state->__pyx_kp_s__26);
  Py_VISIT(traverse_module_state->__pyx_kp_u__27);
  Py_VISIT(traverse_module_state->__pyx_kp_s__28);
  Py_VISIT(traverse_module_state->__pyx_kp_s__29);
  Py_VISIT(traverse_module_state->__pyx_kp_u__3);
  Py_VISIT(traverse_module_state->__pyx_kp_s__33);
  Py_VISIT(traverse_module_state->__pyx_kp_s__34);
  Py_VISIT(traverse_module_state->__pyx_kp_u__35);
  Py_VISIT(traverse_module_state->__pyx_n_u__36);
  Py_VISIT(traverse_module_state->__pyx_n_u__37);
  Py_VISIT(traverse_module_state->__pyx_kp_u__38);
  Py_VISIT(traverse_module_state->__pyx_n_s__395);
  Py_VISIT(traverse_module_state->__pyx_kp_s__4);
  Py_VISIT(traverse_module_state->__pyx_kp_u__4);
  Py_VISIT(traverse_module_state->__pyx_kp_s__40);
  Py_VISIT(traverse_module_state->__pyx_n_u__41);
  Py_VISIT(traverse_module_state->__pyx_n_u__42);
  Py_VISIT(traverse_module_state->__pyx_kp_s__43);
  Py_VISIT(traverse_module_state->__pyx_n_s__45);
  Py_VISIT(traverse_module_state->__pyx_n_u__45);
  Py_VISIT(traverse_module_state->__pyx_n_s__46);
  Py_VISIT(traverse_module_state->__pyx_n_u__46);
  Py_VISIT(traverse_module_state->__pyx_kp_s__47);
  Py_VISIT(traverse_module_state->__pyx_kp_s__49);
  Py_VISIT(traverse_module_state->__pyx_kp_s__5);
  Py_VISIT(traverse_module_state->__pyx_kp_s__50);
  Py_VISIT(traverse_module_state->__pyx_kp_s__51);
  Py_VISIT(traverse_module_state->__pyx_kp_s__52);
  Py_VISIT(traverse_module_state->__pyx_kp_s__53);
  Py_VISIT(traverse_module_state->__pyx_kp_s__54);
  Py_VISIT(traverse_module_state->__pyx_kp_s__55);
  Py_VISIT(traverse_module_state->__pyx_n_s__58);
  Py_VISIT(traverse_module_state->__pyx_kp_s__6);
  Py_VISIT(traverse_module_state->__pyx_kp_s__60);
  Py_VISIT(traverse_module_state->__pyx_kp_s__61);
  Py_VISIT(traverse_module_state->__pyx_kp_s__62);
  Py_VISIT(traverse_module_state->__pyx_kp_s__63);
  Py_VISIT(traverse_module_state->__pyx_kp_u__64);
  Py_VISIT(traverse_module_state->__pyx_n_u__65);
  Py_VISIT(traverse_module_state->__pyx_kp_u__66);
  Py_VISIT(traverse_module_state->__pyx_kp_s__67);
  Py_VISIT(traverse_module_state->__pyx_kp_s__68);
  Py_VISIT(traverse_module_state->__pyx_kp_s__69);
  Py_VISIT(traverse_module_state->__pyx_kp_s__7);
  Py_VISIT(traverse_module_state->__pyx_kp_s__70);
  Py_VISIT(traverse_module_state->__pyx_kp_s__71);
  Py_VISIT(traverse_module_state->__pyx_kp_s__72);
  Py_VISIT(traverse_module_state->__pyx_kp_s__74);
  Py_VISIT(traverse_module_state->__pyx_kp_s__75);
  Py_VISIT(traverse_module_state->__pyx_kp_s__80);
  Py_VISIT(traverse_module_state->__pyx_kp_s__81);
  Py_VISIT(traverse_module_state->__pyx_kp_s__82);
  Py_VISIT(traverse_module_state->__pyx_kp_s__83);
  Py_VISIT(traverse_module_state->__pyx_kp_s__84);
  Py_VISIT(traverse_module_state->__pyx_kp_s__85);
  Py_VISIT(traverse_module_state->__pyx_kp_s__86);
  Py_VISIT(traverse_module_state->__pyx_kp_s__87);
  Py_VISIT(traverse_module_state->__pyx_kp_s__88);
  Py_VISIT(traverse_module_state->__pyx_kp_s__89);
  Py_VISIT(traverse_module_state->__pyx_kp_u__9);
  Py_VISIT(traverse_module_state->__pyx_n_u__91);
  Py_VISIT(traverse_module_state->__pyx_kp_u__92);
  Py_VISIT(traverse_module_state->__pyx_kp_s__95);
  Py_VISIT(traverse_module_state->__pyx_kp_s__96);
  Py_VISIT(traverse_module_state->__pyx_n_s_add);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_js_funcs);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_xaxis);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_yaxis);
  Py_VISIT(traverse_module_state->__pyx_n_s_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_near_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_stock_simple_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_time_day_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_time_month_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_time_week_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_amount);
  Py_VISIT(traverse_module_state->__pyx_n_s_amount_ma);
  Py_VISIT(traverse_module_state->__pyx_n_s_amount_th);
  Py_VISIT(traverse_module_state->__pyx_n_s_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_amplitude_tr_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_amplitude_tr_min);
  Py_VISIT(traverse_module_state->__pyx_n_s_and);
  Py_VISIT(traverse_module_state->__pyx_kp_u_and_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_apply);
  Py_VISIT(traverse_module_state->__pyx_n_s_area_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_area_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_arg);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_completed);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascending);
  Py_VISIT(traverse_module_state->__pyx_n_s_astype);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_autumn_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_average_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_avg_amount_pa);
  Py_VISIT(traverse_module_state->__pyx_n_s_ax);
  Py_VISIT(traverse_module_state->__pyx_n_s_axes);
  Py_VISIT(traverse_module_state->__pyx_kp_s_axes_unicode_minus);
  Py_VISIT(traverse_module_state->__pyx_n_s_axis);
  Py_VISIT(traverse_module_state->__pyx_n_s_axis_pointer_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_axislabel_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_axisline_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_axistick_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_bar_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_bar_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_baseStrategy);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy___getstate);
  Py_VISIT(traverse_module_state->__pyx_kp_s_baseStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy___setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_checkDatabaseTableU);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_dumpJsonToFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_getAllDelistStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_getAllNewStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_getAllStStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_getStockNameByCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_isDelistStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_isDownLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_isNewStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_isStStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_isUpLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_listIntersection);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_listUnion);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_reset);
  Py_VISIT(traverse_module_state->__pyx_n_s_baseStrategy_strategyCount);
  Py_VISIT(traverse_module_state->__pyx_n_s_base_filename);
  Py_VISIT(traverse_module_state->__pyx_n_s_base_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_basename);
  Py_VISIT(traverse_module_state->__pyx_n_s_bbox_inches);
  Py_VISIT(traverse_module_state->__pyx_kp_u_begin_to_create);
  Py_VISIT(traverse_module_state->__pyx_kp_u_between);
  Py_VISIT(traverse_module_state->__pyx_n_s_bg_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_bind);
  Py_VISIT(traverse_module_state->__pyx_n_s_bool);
  Py_VISIT(traverse_module_state->__pyx_n_s_border_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_border_color0);
  Py_VISIT(traverse_module_state->__pyx_n_s_boundary_gap);
  Py_VISIT(traverse_module_state->__pyx_n_s_bwr_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_by);
  Py_VISIT(traverse_module_state->__pyx_n_s_cal_max_th);
  Py_VISIT(traverse_module_state->__pyx_n_s_cal_min_th);
  Py_VISIT(traverse_module_state->__pyx_n_s_candle);
  Py_VISIT(traverse_module_state->__pyx_kp_u_cant_get_stock_name_for);
  Py_VISIT(traverse_module_state->__pyx_n_s_capitalStockStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_capitalStockStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_capitalStockStrategy_getAllHighA);
  Py_VISIT(traverse_module_state->__pyx_n_s_capitalStockStrategy_isLowAmount);
  Py_VISIT(traverse_module_state->__pyx_n_s_category);
  Py_VISIT(traverse_module_state->__pyx_n_s_ceil);
  Py_VISIT(traverse_module_state->__pyx_n_s_center);
  Py_VISIT(traverse_module_state->__pyx_n_s_change_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_checkDatabaseTableUpdate);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_serializability);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_closeDriver);
  Py_VISIT(traverse_module_state->__pyx_n_s_cm);
  Py_VISIT(traverse_module_state->__pyx_n_s_cmap);
  Py_VISIT(traverse_module_state->__pyx_n_s_co_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_code_name_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_codes_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_codes_str);
  Py_VISIT(traverse_module_state->__pyx_kp_u_col_inch);
  Py_VISIT(traverse_module_state->__pyx_n_s_col_inch_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_col_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_col_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_col_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_collections);
  Py_VISIT(traverse_module_state->__pyx_n_s_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_color0);
  Py_VISIT(traverse_module_state->__pyx_n_s_color_function);
  Py_VISIT(traverse_module_state->__pyx_n_s_color_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_column_definitions);
  Py_VISIT(traverse_module_state->__pyx_n_s_column_name_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_columns);
  Py_VISIT(traverse_module_state->__pyx_n_s_common);
  Py_VISIT(traverse_module_state->__pyx_kp_u_compute_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_concat);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_concurrent_futures);
  Py_VISIT(traverse_module_state->__pyx_n_s_convertDictToPandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_count);
  Py_VISIT(traverse_module_state->__pyx_n_s_create_engine_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_cumprod);
  Py_VISIT(traverse_module_state->__pyx_n_s_cumprod_change_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_cumulative_product);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_price);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataManagement);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataMax);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataMin);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataPreprocess);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_list);
  Py_VISIT(traverse_module_state->__pyx_kp_s_data_must_be_a_dictionary);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_simple_info_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataproc);
  Py_VISIT(traverse_module_state->__pyx_n_s_datas);
  Py_VISIT(traverse_module_state->__pyx_n_s_datazoom_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_to_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_datetime);
  Py_VISIT(traverse_module_state->__pyx_kp_s_datetime64_ns);
  Py_VISIT(traverse_module_state->__pyx_n_s_datetime_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_cold_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_cold_frequency_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_hot_cold_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_hot_cold_frequency_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_hot_cold_frequency_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_hot_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_hot_frequency_df);
  Py_VISIT(traverse_module_state->__pyx_kp_u_day_info_firstly);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_day_levels);
  Py_VISIT(traverse_module_state->__pyx_n_s_deas);
  Py_VISIT(traverse_module_state->__pyx_n_s_decrease_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_deepcopy);
  Py_VISIT(traverse_module_state->__pyx_n_s_delist_stock_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dependent_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_depth);
  Py_VISIT(traverse_module_state->__pyx_n_s_desc);
  Py_VISIT(traverse_module_state->__pyx_n_s_desc_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_df_filtered);
  Py_VISIT(traverse_module_state->__pyx_n_s_df_grouped);
  Py_VISIT(traverse_module_state->__pyx_n_s_df_left);
  Py_VISIT(traverse_module_state->__pyx_n_s_df_ma);
  Py_VISIT(traverse_module_state->__pyx_n_s_df_right);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_difs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_dispose);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_n_s_down);
  Py_VISIT(traverse_module_state->__pyx_n_s_down_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_down_row_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_downlimt_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_dpi);
  Py_VISIT(traverse_module_state->__pyx_n_s_drawKlineChart);
  Py_VISIT(traverse_module_state->__pyx_n_s_driver);
  Py_VISIT(traverse_module_state->__pyx_n_s_drop);
  Py_VISIT(traverse_module_state->__pyx_n_s_drop_duplicates);
  Py_VISIT(traverse_module_state->__pyx_n_s_dt);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_dumpJsonToFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_driver_path);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ef232a);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_10);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_20);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_30);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_60);
  Py_VISIT(traverse_module_state->__pyx_n_s_ema_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_end1);
  Py_VISIT(traverse_module_state->__pyx_n_s_end5);
  Py_VISIT(traverse_module_state->__pyx_n_s_end_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_engine);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_error);
  Py_VISIT(traverse_module_state->__pyx_n_s_exclude_codes);
  Py_VISIT(traverse_module_state->__pyx_n_s_exclude_concepts);
  Py_VISIT(traverse_module_state->__pyx_n_s_exclude_indexes);
  Py_VISIT(traverse_module_state->__pyx_n_s_executable_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_executor);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_f_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_facecolor);
  Py_VISIT(traverse_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoF);
  Py_VISIT(traverse_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoF_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_failed_to_getStockTradeDayInfoS);
  Py_VISIT(traverse_module_state->__pyx_n_s_family);
  Py_VISIT(traverse_module_state->__pyx_n_s_fastk_period);
  Py_VISIT(traverse_module_state->__pyx_n_s_fastperiod);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ffffff);
  Py_VISIT(traverse_module_state->__pyx_n_s_fig);
  Py_VISIT(traverse_module_state->__pyx_n_s_fig_bar);
  Py_VISIT(traverse_module_state->__pyx_n_s_figcolor);
  Py_VISIT(traverse_module_state->__pyx_n_s_figsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_figure);
  Py_VISIT(traverse_module_state->__pyx_n_s_figure_save_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_figure_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_figured);
  Py_VISIT(traverse_module_state->__pyx_n_s_file_extension);
  Py_VISIT(traverse_module_state->__pyx_n_s_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_filename);
  Py_VISIT(traverse_module_state->__pyx_n_s_fillna);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter_dict_item);
  Py_VISIT(traverse_module_state->__pyx_kp_s_filter_dict_report_date_should_b);
  Py_VISIT(traverse_module_state->__pyx_kp_s_filter_dict_report_date_should_n);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_financialStockStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_financialStockStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_financialStockStrategy_getStockB);
  Py_VISIT(traverse_module_state->__pyx_n_s_financialStockStrategy_getStockM);
  Py_VISIT(traverse_module_state->__pyx_n_s_financial_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_financial_quarter_selection);
  Py_VISIT(traverse_module_state->__pyx_n_s_financial_report_selection);
  Py_VISIT(traverse_module_state->__pyx_n_s_first);
  Py_VISIT(traverse_module_state->__pyx_n_s_first_uplimit_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_first_use_date);
  Py_VISIT(traverse_module_state->__pyx_kp_u_firstly);
  Py_VISIT(traverse_module_state->__pyx_n_s_floor);
  Py_VISIT(traverse_module_state->__pyx_n_s_font);
  Py_VISIT(traverse_module_state->__pyx_n_s_fontsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_foot_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_formatter);
  Py_VISIT(traverse_module_state->__pyx_n_s_fun_driver);
  Py_VISIT(traverse_module_state->__pyx_n_s_fun_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_function_params_if_params_dataI);
  Py_VISIT(traverse_module_state->__pyx_kp_s_function_params_var_colorList_i);
  Py_VISIT(traverse_module_state->__pyx_kp_s_function_params_var_colorList_i_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_fundamentalStockStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_getSing);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_10);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_11);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_12);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_4);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_6);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_7);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamentalStockStrategy_selectB_9);
  Py_VISIT(traverse_module_state->__pyx_n_s_future);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_futures);
  Py_VISIT(traverse_module_state->__pyx_n_s_g);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_getAllDelistStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getAllHighAmountStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getAllNewStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getAllStStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getAreaStockCodes);
  Py_VISIT(traverse_module_state->__pyx_n_s_getConceptHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getConceptStockCodes);
  Py_VISIT(traverse_module_state->__pyx_n_s_getFutureHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndexHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndustryConceptHotFrequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndustryHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndustryStockCodes);
  Py_VISIT(traverse_module_state->__pyx_n_s_getNameByTableCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_getOneWaveRatio);
  Py_VISIT(traverse_module_state->__pyx_n_s_getPotentialConceptStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getPotentialIndustryStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_getPotentialLimitUpStockNearDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_getSingleStockPriceQuantile);
  Py_VISIT(traverse_module_state->__pyx_n_s_getSingleStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_getSingleStockWavePriceRatio_tim);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockByFinancialData);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockByTechIndicator);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockHoldNumberChangeTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockLadder);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockLadderTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockLimitUp);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockMultiFinancialData);
  Py_VISIT(traverse_module_state->__pyx_kp_u_getStockMultiFinancialData_quart);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockNameByCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockProperty);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockProperty_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockSimpleInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockTradeDayInfoFq);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockTradeDayInfoSqlalchemy);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockWavePriceRatio);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStrategyDataAndImg);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStrategyDataAndImg_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_getSuspendedStocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_getTradeDayChangeRankBetweenDate);
  Py_VISIT(traverse_module_state->__pyx_n_s_getTradeDistributionTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_getWebDriver);
  Py_VISIT(traverse_module_state->__pyx_n_s_getYearStartEndDate);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_Item);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_facecolor);
  Py_VISIT(traverse_module_state->__pyx_n_s_getframe);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_grid_chart);
  Py_VISIT(traverse_module_state->__pyx_n_s_grid_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_grid_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_gridcolor);
  Py_VISIT(traverse_module_state->__pyx_n_s_gross_profit_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_group_column);
  Py_VISIT(traverse_module_state->__pyx_n_s_group_keys);
  Py_VISIT(traverse_module_state->__pyx_n_s_groupby);
  Py_VISIT(traverse_module_state->__pyx_n_s_grouped_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_ha);
  Py_VISIT(traverse_module_state->__pyx_n_s_has_strategy_file);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_suspended_at);
  Py_VISIT(traverse_module_state->__pyx_n_s_has_update_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_head);
  Py_VISIT(traverse_module_state->__pyx_n_s_head_tail_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_height);
  Py_VISIT(traverse_module_state->__pyx_n_s_high);
  Py_VISIT(traverse_module_state->__pyx_n_s_high_amount_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_hit);
  Py_VISIT(traverse_module_state->__pyx_n_s_hold_number_decrease);
  Py_VISIT(traverse_module_state->__pyx_n_s_holder_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_cold_concept_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_cold_future_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_cold_index_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_cold_industry_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_cold_stock_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_concept_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_concept_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_future_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_index_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_industry_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_industry_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_stock_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_day_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_month);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_month_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_near_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_week);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_week_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_year);
  Py_VISIT(traverse_module_state->__pyx_n_s_hot_table_year_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_how);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_idxmax);
  Py_VISIT(traverse_module_state->__pyx_n_s_idxmin);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_iloc);
  Py_VISIT(traverse_module_state->__pyx_n_s_image);
  Py_VISIT(traverse_module_state->__pyx_n_s_img_save_path_root);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_kp_u_in);
  Py_VISIT(traverse_module_state->__pyx_n_s_include_groups);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_left);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_right);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_inherit);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_inner);
  Py_VISIT(traverse_module_state->__pyx_n_s_inplace);
  Py_VISIT(traverse_module_state->__pyx_n_s_input_codes);
  Py_VISIT(traverse_module_state->__pyx_n_s_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_inside);
  Py_VISIT(traverse_module_state->__pyx_n_s_int);
  Py_VISIT(traverse_module_state->__pyx_kp_s_int_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_intersect_stock_list);
  Py_VISIT(traverse_module_state->__pyx_kp_u_intersect_stock_list_is_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_intersection_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_interval);
  Py_VISIT(traverse_module_state->__pyx_n_s_isDelistStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_isDownLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_isLowAmountStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_isMonthLastTradeDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_isNewStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_isStStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_isUpLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_isWeekLastTradeDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_isYearLastTradeDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_delist);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_down_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_fill_bg_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_get_max_level);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_month_last);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_on_zero);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_scale);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_show);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_smooth);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_st);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_up_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_week_last);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_year_last);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_isin);
  Py_VISIT(traverse_module_state->__pyx_n_s_item_down);
  Py_VISIT(traverse_module_state->__pyx_n_s_item_up);
  Py_VISIT(traverse_module_state->__pyx_n_s_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_itemstyle_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_iterrows);
  Py_VISIT(traverse_module_state->__pyx_n_s_j);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_json_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_judgeSingleStockByTechIndicator);
  Py_VISIT(traverse_module_state->__pyx_n_s_keep);
  Py_VISIT(traverse_module_state->__pyx_n_s_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_pandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_products);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_keys);
  Py_VISIT(traverse_module_state->__pyx_n_s_kf_net_profit_tb);
  Py_VISIT(traverse_module_state->__pyx_n_s_kline);
  Py_VISIT(traverse_module_state->__pyx_kp_u_kline_html);
  Py_VISIT(traverse_module_state->__pyx_n_s_kline_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_label_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_ladder_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_last_five_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_last_five_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_latest_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_left_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_legend_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_level);
  Py_VISIT(traverse_module_state->__pyx_n_s_level_code_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_limit_up_code_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_line_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_linestyle_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_listIntersection);
  Py_VISIT(traverse_module_state->__pyx_n_s_listUnion);
  Py_VISIT(traverse_module_state->__pyx_n_s_list_2_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_list_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadJsonData);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadTableContentByDate);
  Py_VISIT(traverse_module_state->__pyx_n_s_load_json_file);
  Py_VISIT(traverse_module_state->__pyx_kp_s_load_json_file_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_loc);
  Py_VISIT(traverse_module_state->__pyx_n_s_lock_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_logger);
  Py_VISIT(traverse_module_state->__pyx_n_s_low);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_10);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_20);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_30);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_60);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_column);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_ma_time_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_macd);
  Py_VISIT(traverse_module_state->__pyx_n_s_macd_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_macdhist);
  Py_VISIT(traverse_module_state->__pyx_n_s_macds);
  Py_VISIT(traverse_module_state->__pyx_n_s_macdsignal);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_business);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_marketcolors);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_mpf_style);
  Py_VISIT(traverse_module_state->__pyx_n_s_make_snapshot);
  Py_VISIT(traverse_module_state->__pyx_n_s_map);
  Py_VISIT(traverse_module_state->__pyx_n_s_marker_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_market);
  Py_VISIT(traverse_module_state->__pyx_n_s_market_cap);
  Py_VISIT(traverse_module_state->__pyx_n_s_market_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_marketcolors);
  Py_VISIT(traverse_module_state->__pyx_n_s_markpoint_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_math);
  Py_VISIT(traverse_module_state->__pyx_n_s_matplotlib);
  Py_VISIT(traverse_module_state->__pyx_n_s_matplotlib_pyplot);
  Py_VISIT(traverse_module_state->__pyx_n_s_matype);
  Py_VISIT(traverse_module_state->__pyx_n_s_mav);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_depth);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_item_down);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_item_up);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_level);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_price);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_price_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_price_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_workers);
  Py_VISIT(traverse_module_state->__pyx_n_s_mean);
  Py_VISIT(traverse_module_state->__pyx_n_s_merge);
  Py_VISIT(traverse_module_state->__pyx_n_s_merged_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_min);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_price);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_price_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_price_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_kp_s_mode_must_switch_in_industry_con);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_month);
  Py_VISIT(traverse_module_state->__pyx_n_s_month_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_month_levels);
  Py_VISIT(traverse_module_state->__pyx_n_s_mpf);
  Py_VISIT(traverse_module_state->__pyx_n_s_mplfinance);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_multi_thread);
  Py_VISIT(traverse_module_state->__pyx_n_s_multi_type);
  Py_VISIT(traverse_module_state->__pyx_kp_u_multi_type_parameter_set_wrong);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_color);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_dataproc);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_method);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_plot);
  Py_VISIT(traverse_module_state->__pyx_n_s_my_style);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_up_limit_times);
  Py_VISIT(traverse_module_state->__pyx_n_s_nbdevdn);
  Py_VISIT(traverse_module_state->__pyx_n_s_nbdevup);
  Py_VISIT(traverse_module_state->__pyx_n_s_near);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_10);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_20);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_30);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_60);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_day_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_day_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_levels);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_near_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_need_database_tables);
  Py_VISIT(traverse_module_state->__pyx_n_s_negative_infinity);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_base_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_date_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_datetime_threshold);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_dict);
  Py_VISIT(traverse_module_state->__pyx_kp_s_new_end_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_row_cold);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_row_hot);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_short_day_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_stock_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_stock_thr_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_thr);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_serializable_attrs);
  Py_VISIT(traverse_module_state->__pyx_n_s_none);
  Py_VISIT(traverse_module_state->__pyx_n_s_normed_cmap);
  Py_VISIT(traverse_module_state->__pyx_n_s_not);
  Py_VISIT(traverse_module_state->__pyx_n_s_now_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_now_price);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_k);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_quantile);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_rank);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_tr);
  Py_VISIT(traverse_module_state->__pyx_n_s_object);
  Py_VISIT(traverse_module_state->__pyx_n_s_objs);
  Py_VISIT(traverse_module_state->__pyx_n_s_opacity);
  Py_VISIT(traverse_module_state->__pyx_n_s_open);
  Py_VISIT(traverse_module_state->__pyx_n_s_options);
  Py_VISIT(traverse_module_state->__pyx_n_s_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_or);
  Py_VISIT(traverse_module_state->__pyx_n_s_ori_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_origin_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_os);
  Py_VISIT(traverse_module_state->__pyx_n_s_output_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_outstand_share);
  Py_VISIT(traverse_module_state->__pyx_n_s_overlap);
  Py_VISIT(traverse_module_state->__pyx_n_s_overlap_bar_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_overlap_kline_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_pacoSelectStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pacoSelectStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialC);
  Py_VISIT(traverse_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialI);
  Py_VISIT(traverse_module_state->__pyx_n_s_pacoSelectStrategy_getPotentialL);
  Py_VISIT(traverse_module_state->__pyx_n_s_pandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_pd);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pd_DataFrame);
  Py_VISIT(traverse_module_state->__pyx_kp_s_pd_DataFrame_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_per_row_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_plot);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHoldNumberDecrease);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdConceptTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdFutureTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdIndexTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdIndustryConceptFreque);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdIndustryTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdStockTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotHotColdTables);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotKline);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotKlineMpl);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotStockUplimtLadder);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotStrategyFigure);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotTablePandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotTop10Amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotTop10UpLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotTradeDistributionLen);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotWaveDownRank);
  Py_VISIT(traverse_module_state->__pyx_n_s_plotWaveUpRank);
  Py_VISIT(traverse_module_state->__pyx_n_s_plot_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_plottable);
  Py_VISIT(traverse_module_state->__pyx_n_s_plottable_cmap);
  Py_VISIT(traverse_module_state->__pyx_n_s_plt);
  Py_VISIT(traverse_module_state->__pyx_kp_u_png);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos_left);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos_right);
  Py_VISIT(traverse_module_state->__pyx_n_s_pos_top);
  Py_VISIT(traverse_module_state->__pyx_n_s_positive_infinity);
  Py_VISIT(traverse_module_state->__pyx_n_s_pre_close);
  Py_VISIT(traverse_module_state->__pyx_kp_u_pre_close_equal_zero_when_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_pre_fig_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_prev_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_previous);
  Py_VISIT(traverse_module_state->__pyx_n_s_previous_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_price);
  Py_VISIT(traverse_module_state->__pyx_n_s_price_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_price_down_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_price_quantile);
  Py_VISIT(traverse_module_state->__pyx_n_s_price_up_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_print);
  Py_VISIT(traverse_module_state->__pyx_n_s_process);
  Py_VISIT(traverse_module_state->__pyx_n_s_product_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_publishStrategy_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy___getStockLadder);
  Py_VISIT(traverse_module_state->__pyx_kp_s_publishStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy__getStockLadder);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getConceptHotTab);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getFutureHotTabl);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getIndexHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getIndustryConce);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getIndustryHotTa);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getSingleStockWa);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getSingleStockWa_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getSingleStockWa_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockHoldNumb);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockHoldNumb_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockHotTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockLadderTa);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockProperty);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockProperty_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockProperty_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockWavePric);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStockWavePric_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getStrategyDataA);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getTradeDayChang);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getTradeDayChang_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getTradeDistribu);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getTradeDistribu_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_getTradeDistribu_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_reset);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_stockSingleStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_stockSingleStock_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_publishStrategy_update_hot_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_publish_strategy);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyecharts);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyecharts_charts);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyecharts_commons_utils);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyecharts_globals);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyecharts_render);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyplot);
  Py_VISIT(traverse_module_state->__pyx_n_s_qfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_qfq_up_rate);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_quantile_amplitude_tr);
  Py_VISIT(traverse_module_state->__pyx_n_s_quantile_tr);
  Py_VISIT(traverse_module_state->__pyx_n_s_quantile_tr_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_quantile_tr_min);
  Py_VISIT(traverse_module_state->__pyx_n_s_quarter);
  Py_VISIT(traverse_module_state->__pyx_n_s_query);
  Py_VISIT(traverse_module_state->__pyx_n_s_query_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_query_date_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_query_stock_df_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_quit);
  Py_VISIT(traverse_module_state->__pyx_n_s_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_range_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_rank_level);
  Py_VISIT(traverse_module_state->__pyx_n_s_rate_hist_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_rate_hist_dict_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_rate_hist_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_ratio_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_rc);
  Py_VISIT(traverse_module_state->__pyx_n_s_rcParams);
  Py_VISIT(traverse_module_state->__pyx_n_s_read_sql);
  Py_VISIT(traverse_module_state->__pyx_n_s_rely_strategy_key_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_render);
  Py_VISIT(traverse_module_state->__pyx_n_s_repeat_compute);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_report_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_res);
  Py_VISIT(traverse_module_state->__pyx_n_s_res_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_res_names);
  Py_VISIT(traverse_module_state->__pyx_n_s_reset);
  Py_VISIT(traverse_module_state->__pyx_n_s_reset_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_result_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_ret);
  Py_VISIT(traverse_module_state->__pyx_n_s_return);
  Py_VISIT(traverse_module_state->__pyx_n_s_return_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_return_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_returnfig);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverse);
  Py_VISIT(traverse_module_state->__pyx_n_s_reversed);
  Py_VISIT(traverse_module_state->__pyx_n_s_right_ax);
  Py_VISIT(traverse_module_state->__pyx_n_s_right_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_round);
  Py_VISIT(traverse_module_state->__pyx_n_s_row);
  Py_VISIT(traverse_module_state->__pyx_kp_u_row_inch);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_inch_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_rsi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_saveToImg);
  Py_VISIT(traverse_module_state->__pyx_n_s_save_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_save_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_save_strategy);
  Py_VISIT(traverse_module_state->__pyx_n_s_savefig);
  Py_VISIT(traverse_module_state->__pyx_n_s_secondary_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByArea);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByConcept);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByIndustry);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByKeyProduct);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByMarket);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByMarketCap);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByNameWord);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByStockPrice);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByStockPriceQuantile);
  Py_VISIT(traverse_module_state->__pyx_n_s_selectByTechIndicator);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_market_cap_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_market_cap_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_market_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_select_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_selection_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_selenium);
  Py_VISIT(traverse_module_state->__pyx_n_s_selenium_webdriver_edge_options);
  Py_VISIT(traverse_module_state->__pyx_n_s_selenium_webdriver_edge_service);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_series_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_service);
  Py_VISIT(traverse_module_state->__pyx_n_s_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_session_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_setFigureShow);
  Py_VISIT(traverse_module_state->__pyx_n_s_setPlotTimeLock);
  Py_VISIT(traverse_module_state->__pyx_n_s_setStockDataDf);
  Py_VISIT(traverse_module_state->__pyx_n_s_setStrategyJsonFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_dpi);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_facecolor);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_figheight);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_figwidth);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_fontsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_global_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_ylabel);
  Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_sh_calendar);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_sheet);
  Py_VISIT(traverse_module_state->__pyx_n_s_show);
  Py_VISIT(traverse_module_state->__pyx_n_s_show_fig);
  Py_VISIT(traverse_module_state->__pyx_n_s_show_figure);
  Py_VISIT(traverse_module_state->__pyx_n_s_signalperiod);
  Py_VISIT(traverse_module_state->__pyx_n_s_silver);
  Py_VISIT(traverse_module_state->__pyx_n_s_simple_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_single);
  Py_VISIT(traverse_module_state->__pyx_n_s_slowd_matype);
  Py_VISIT(traverse_module_state->__pyx_n_s_slowd_period);
  Py_VISIT(traverse_module_state->__pyx_n_s_slowk_matype);
  Py_VISIT(traverse_module_state->__pyx_n_s_slowk_period);
  Py_VISIT(traverse_module_state->__pyx_n_s_slowperiod);
  Py_VISIT(traverse_module_state->__pyx_n_s_snapshot);
  Py_VISIT(traverse_module_state->__pyx_n_s_snapshot_selenium);
  Py_VISIT(traverse_module_state->__pyx_n_s_sort);
  Py_VISIT(traverse_module_state->__pyx_n_s_sort_values);
  Py_VISIT(traverse_module_state->__pyx_n_s_sorted_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_spire);
  Py_VISIT(traverse_module_state->__pyx_n_s_spire_xls);
  Py_VISIT(traverse_module_state->__pyx_n_s_spire_xls_common);
  Py_VISIT(traverse_module_state->__pyx_n_s_spires);
  Py_VISIT(traverse_module_state->__pyx_n_s_spires_common);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitStockData);
  Py_VISIT(traverse_module_state->__pyx_n_s_split_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitext);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitline_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_sql_query);
  Py_VISIT(traverse_module_state->__pyx_n_s_sqlalchemy);
  Py_VISIT(traverse_module_state->__pyx_n_s_st_stock_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_startWithDigit);
  Py_VISIT(traverse_module_state->__pyx_n_s_start_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_start_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_startswith);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_statement);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockSingleStockProperty);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_BOLL);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDL2CROWS);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDL3INSIDE);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDL3STARSINSOUTH);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDL3WHITESOLDIERS);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLENGULFING);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLHAMMER);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLHARAMI);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLMORNINGSTAR);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLPIERCING);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLRISEFALL3METHODS);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_DMI);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_EMA);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_KDJ);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_MA);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_MACD);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_MaAll);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_OBV);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_RSI);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_WILLR);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_setFigureShow);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockTechInd_setStockDataDf);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_basic_info_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_close_price_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_code_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_code_name_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_concept_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_concept_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_financial_quarter);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_financial_report);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_hold_num_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_hold_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_ladder);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_ladder_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_ladder_dict_yesterday);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_query_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_simple_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tag);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tmp);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tmp_code_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tmp_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2024);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_up_limit_list_today);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_uplimt_ladder);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_down);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_down_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_down_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_up);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_up_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_wave_up_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategyCount);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_code_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_data_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_data_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_img_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_json_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_key_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_key_name1);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_key_name2);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_strategylog_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_strftime);
  Py_VISIT(traverse_module_state->__pyx_n_s_strptime);
  Py_VISIT(traverse_module_state->__pyx_n_s_style);
  Py_VISIT(traverse_module_state->__pyx_n_s_sub_strategy_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_sub_table_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_submit);
  Py_VISIT(traverse_module_state->__pyx_n_s_subplots);
  Py_VISIT(traverse_module_state->__pyx_n_s_subset);
  Py_VISIT(traverse_module_state->__pyx_n_s_subtitle);
  Py_VISIT(traverse_module_state->__pyx_n_s_succeed);
  Py_VISIT(traverse_module_state->__pyx_n_s_suffixes);
  Py_VISIT(traverse_module_state->__pyx_n_s_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_suspended_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_symbol);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_tab);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_not_been_updated);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_save_excel_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_save_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_save_png_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_tail);
  Py_VISIT(traverse_module_state->__pyx_n_s_talib);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataAcquisition_models);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataManagement_dataPrepr);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_tradeStrategy_stockStrat);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tbstock_tradeStrategy_stockStrat_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_utils);
  Py_VISIT(traverse_module_state->__pyx_n_s_tech_ind);
  Py_VISIT(traverse_module_state->__pyx_n_s_tech_ind_method);
  Py_VISIT(traverse_module_state->__pyx_n_s_tech_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_tech_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_technicalStockStrategy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_technicalStockStrategy___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_technicalStockStrategy_getStockB);
  Py_VISIT(traverse_module_state->__pyx_n_s_technicalStockStrategy_judgeSing);
  Py_VISIT(traverse_module_state->__pyx_n_s_technicalStockStrategy_selectByT);
  Py_VISIT(traverse_module_state->__pyx_n_s_temp_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_test_select_stock);
  Py_VISIT(traverse_module_state->__pyx_n_s_text_cmap);
  Py_VISIT(traverse_module_state->__pyx_n_s_textprops);
  Py_VISIT(traverse_module_state->__pyx_n_s_theme);
  Py_VISIT(traverse_module_state->__pyx_n_s_thread);
  Py_VISIT(traverse_module_state->__pyx_n_s_tight);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_kp_u_time_cost);
  Py_VISIT(traverse_module_state->__pyx_kp_u_time_cost_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_time_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_time_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_timeperiod);
  Py_VISIT(traverse_module_state->__pyx_n_s_times);
  Py_VISIT(traverse_module_state->__pyx_n_s_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_title_opts);
  Py_VISIT(traverse_module_state->__pyx_kp_u_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_today_condition_amount);
  Py_VISIT(traverse_module_state->__pyx_n_s_tolist);
  Py_VISIT(traverse_module_state->__pyx_n_s_tooltip_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_10_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_10_amplitude_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_10_up_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_10_up_limit_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_top_up_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_total);
  Py_VISIT(traverse_module_state->__pyx_n_s_total_operate_revenue_tb);
  Py_VISIT(traverse_module_state->__pyx_n_s_tqdm);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_day_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_day_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_day_table_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_distribution_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_trade_distribution_len);
  Py_VISIT(traverse_module_state->__pyx_kp_s_trade_distribution_len_html);
  Py_VISIT(traverse_module_state->__pyx_n_s_transform);
  Py_VISIT(traverse_module_state->__pyx_n_s_trigger);
  Py_VISIT(traverse_module_state->__pyx_n_s_trigger_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_type_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_type_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_typing);
  Py_VISIT(traverse_module_state->__pyx_n_s_union_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_union_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_up);
  Py_VISIT(traverse_module_state->__pyx_n_s_upLimit_times);
  Py_VISIT(traverse_module_state->__pyx_n_s_up_limit);
  Py_VISIT(traverse_module_state->__pyx_n_s_up_limit_stocks_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_up_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_up_row_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateRateHist);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateRateHist_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_day_hot_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_db_logs_dir);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_hot_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_range_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_strategy_logs_dir);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated_database_file);
  Py_VISIT(traverse_module_state->__pyx_kp_s_updatelog_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_uplimt_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_upper);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_date);
  Py_VISIT(traverse_module_state->__pyx_kp_s_use_date_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_date_now);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_date_previous);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_ma);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_num_cold);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_num_hot);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_st_stock);
  Py_VISIT(traverse_module_state->__pyx_n_s_utils);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_value_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_value_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_value_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_values);
  Py_VISIT(traverse_module_state->__pyx_kp_s_var_barData);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock__convertDictToPandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock__plotHotColdTables);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock__plotTablePandas);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock__saveToImg);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_closeDriver);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_drawKlineChart);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_dumpJsonToFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_getWebDriver);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHoldNumberDecrea);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdConceptTa);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdFutureTab);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdIndexTabl);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdIndustryC);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdIndustryT);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotHotColdStockTabl);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotKline);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotKlineMpl);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotStockUplimtLadde);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotStrategyFigure);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotTop10Amplitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotTop10UpLimit);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotTradeDistributio);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotWaveDownRank);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_plotWaveUpRank);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_setPlotTimeLock);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_setStrategyJsonFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_visualStock_splitStockData);
  Py_VISIT(traverse_module_state->__pyx_n_s_vols);
  Py_VISIT(traverse_module_state->__pyx_n_s_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_warning);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_down_ratio_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_ratio);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_up_rank_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_wave_up_ratio_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_webdriver);
  Py_VISIT(traverse_module_state->__pyx_n_s_week);
  Py_VISIT(traverse_module_state->__pyx_n_s_week_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_week_levels);
  Py_VISIT(traverse_module_state->__pyx_n_s_wick);
  Py_VISIT(traverse_module_state->__pyx_n_s_width);
  Py_VISIT(traverse_module_state->__pyx_n_s_workbook);
  Py_VISIT(traverse_module_state->__pyx_n_s_workers);
  Py_VISIT(traverse_module_state->__pyx_kp_u_x);
  Py_VISIT(traverse_module_state->__pyx_n_s_x_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_xaxis_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_xaxis_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_xaxis_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_xlabel);
  Py_VISIT(traverse_module_state->__pyx_n_s_xls);
  Py_VISIT(traverse_module_state->__pyx_n_s_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_y_axis);
  Py_VISIT(traverse_module_state->__pyx_n_s_yaxis_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_yaxis_opts);
  Py_VISIT(traverse_module_state->__pyx_n_s_year);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_levels);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_ylabel);
  Py_VISIT(traverse_module_state->__pyx_n_s_zero_num);
  Py_VISIT(traverse_module_state->__pyx_float_0_0);
  Py_VISIT(traverse_module_state->__pyx_float_0_1);
  Py_VISIT(traverse_module_state->__pyx_float_0_2);
  Py_VISIT(traverse_module_state->__pyx_float_0_3);
  Py_VISIT(traverse_module_state->__pyx_float_0_4);
  Py_VISIT(traverse_module_state->__pyx_float_0_5);
  Py_VISIT(traverse_module_state->__pyx_float_0_8);
  Py_VISIT(traverse_module_state->__pyx_float_1_0);
  Py_VISIT(traverse_module_state->__pyx_float_1_5);
  Py_VISIT(traverse_module_state->__pyx_float_5_0);
  Py_VISIT(traverse_module_state->__pyx_float_0_01);
  Py_VISIT(traverse_module_state->__pyx_float_10_0);
  Py_VISIT(traverse_module_state->__pyx_float_25_0);
  Py_VISIT(traverse_module_state->__pyx_float_30_0);
  Py_VISIT(traverse_module_state->__pyx_float_50_0);
  Py_VISIT(traverse_module_state->__pyx_float_9_85);
  Py_VISIT(traverse_module_state->__pyx_float_100_0);
  Py_VISIT(traverse_module_state->__pyx_float_neg_9_85);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_3);
  Py_VISIT(traverse_module_state->__pyx_int_4);
  Py_VISIT(traverse_module_state->__pyx_int_5);
  Py_VISIT(traverse_module_state->__pyx_int_6);
  Py_VISIT(traverse_module_state->__pyx_int_7);
  Py_VISIT(traverse_module_state->__pyx_int_8);
  Py_VISIT(traverse_module_state->__pyx_int_9);
  Py_VISIT(traverse_module_state->__pyx_int_10);
  Py_VISIT(traverse_module_state->__pyx_int_12);
  Py_VISIT(traverse_module_state->__pyx_int_14);
  Py_VISIT(traverse_module_state->__pyx_int_15);
  Py_VISIT(traverse_module_state->__pyx_int_16);
  Py_VISIT(traverse_module_state->__pyx_int_20);
  Py_VISIT(traverse_module_state->__pyx_int_25);
  Py_VISIT(traverse_module_state->__pyx_int_26);
  Py_VISIT(traverse_module_state->__pyx_int_30);
  Py_VISIT(traverse_module_state->__pyx_int_31);
  Py_VISIT(traverse_module_state->__pyx_int_50);
  Py_VISIT(traverse_module_state->__pyx_int_60);
  Py_VISIT(traverse_module_state->__pyx_int_72);
  Py_VISIT(traverse_module_state->__pyx_int_80);
  Py_VISIT(traverse_module_state->__pyx_int_90);
  Py_VISIT(traverse_module_state->__pyx_int_100);
  Py_VISIT(traverse_module_state->__pyx_int_120);
  Py_VISIT(traverse_module_state->__pyx_int_250);
  Py_VISIT(traverse_module_state->__pyx_int_252);
  Py_VISIT(traverse_module_state->__pyx_int_300);
  Py_VISIT(traverse_module_state->__pyx_int_500);
  Py_VISIT(traverse_module_state->__pyx_int_1900);
  Py_VISIT(traverse_module_state->__pyx_int_2023);
  Py_VISIT(traverse_module_state->__pyx_int_2024);
  Py_VISIT(traverse_module_state->__pyx_int_1000000);
  Py_VISIT(traverse_module_state->__pyx_int_50000000);
  Py_VISIT(traverse_module_state->__pyx_int_100000000);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_int_neg_4);
  Py_VISIT(traverse_module_state->__pyx_int_neg_5);
  Py_VISIT(traverse_module_state->__pyx_int_neg_59);
  Py_VISIT(traverse_module_state->__pyx_slice_);
  Py_VISIT(traverse_module_state->__pyx_tuple__8);
  Py_VISIT(traverse_module_state->__pyx_slice__31);
  Py_VISIT(traverse_module_state->__pyx_slice__39);
  Py_VISIT(traverse_module_state->__pyx_slice__44);
  Py_VISIT(traverse_module_state->__pyx_slice__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__56);
  Py_VISIT(traverse_module_state->__pyx_tuple__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__76);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__78);
  Py_VISIT(traverse_module_state->__pyx_tuple__79);
  Py_VISIT(traverse_module_state->__pyx_tuple__90);
  Py_VISIT(traverse_module_state->__pyx_tuple__93);
  Py_VISIT(traverse_module_state->__pyx_tuple__94);
  Py_VISIT(traverse_module_state->__pyx_tuple__97);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__99);
  Py_VISIT(traverse_module_state->__pyx_slice__101);
  Py_VISIT(traverse_module_state->__pyx_slice__137);
  Py_VISIT(traverse_module_state->__pyx_tuple__100);
  Py_VISIT(traverse_module_state->__pyx_tuple__106);
  Py_VISIT(traverse_module_state->__pyx_tuple__109);
  Py_VISIT(traverse_module_state->__pyx_tuple__110);
  Py_VISIT(traverse_module_state->__pyx_tuple__111);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__113);
  Py_VISIT(traverse_module_state->__pyx_tuple__114);
  Py_VISIT(traverse_module_state->__pyx_tuple__115);
  Py_VISIT(traverse_module_state->__pyx_tuple__116);
  Py_VISIT(traverse_module_state->__pyx_tuple__118);
  Py_VISIT(traverse_module_state->__pyx_tuple__119);
  Py_VISIT(traverse_module_state->__pyx_tuple__120);
  Py_VISIT(traverse_module_state->__pyx_tuple__121);
  Py_VISIT(traverse_module_state->__pyx_tuple__122);
  Py_VISIT(traverse_module_state->__pyx_tuple__123);
  Py_VISIT(traverse_module_state->__pyx_tuple__124);
  Py_VISIT(traverse_module_state->__pyx_tuple__125);
  Py_VISIT(traverse_module_state->__pyx_tuple__127);
  Py_VISIT(traverse_module_state->__pyx_tuple__130);
  Py_VISIT(traverse_module_state->__pyx_tuple__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__134);
  Py_VISIT(traverse_module_state->__pyx_tuple__136);
  Py_VISIT(traverse_module_state->__pyx_tuple__138);
  Py_VISIT(traverse_module_state->__pyx_tuple__145);
  Py_VISIT(traverse_module_state->__pyx_tuple__146);
  Py_VISIT(traverse_module_state->__pyx_tuple__153);
  Py_VISIT(traverse_module_state->__pyx_tuple__154);
  Py_VISIT(traverse_module_state->__pyx_tuple__155);
  Py_VISIT(traverse_module_state->__pyx_tuple__156);
  Py_VISIT(traverse_module_state->__pyx_tuple__157);
  Py_VISIT(traverse_module_state->__pyx_tuple__158);
  Py_VISIT(traverse_module_state->__pyx_tuple__159);
  Py_VISIT(traverse_module_state->__pyx_tuple__161);
  Py_VISIT(traverse_module_state->__pyx_tuple__165);
  Py_VISIT(traverse_module_state->__pyx_tuple__168);
  Py_VISIT(traverse_module_state->__pyx_tuple__170);
  Py_VISIT(traverse_module_state->__pyx_tuple__173);
  Py_VISIT(traverse_module_state->__pyx_tuple__175);
  Py_VISIT(traverse_module_state->__pyx_tuple__177);
  Py_VISIT(traverse_module_state->__pyx_tuple__179);
  Py_VISIT(traverse_module_state->__pyx_tuple__181);
  Py_VISIT(traverse_module_state->__pyx_tuple__183);
  Py_VISIT(traverse_module_state->__pyx_tuple__184);
  Py_VISIT(traverse_module_state->__pyx_tuple__186);
  Py_VISIT(traverse_module_state->__pyx_tuple__188);
  Py_VISIT(traverse_module_state->__pyx_tuple__190);
  Py_VISIT(traverse_module_state->__pyx_tuple__192);
  Py_VISIT(traverse_module_state->__pyx_tuple__193);
  Py_VISIT(traverse_module_state->__pyx_tuple__199);
  Py_VISIT(traverse_module_state->__pyx_tuple__201);
  Py_VISIT(traverse_module_state->__pyx_tuple__202);
  Py_VISIT(traverse_module_state->__pyx_tuple__204);
  Py_VISIT(traverse_module_state->__pyx_tuple__206);
  Py_VISIT(traverse_module_state->__pyx_tuple__208);
  Py_VISIT(traverse_module_state->__pyx_tuple__209);
  Py_VISIT(traverse_module_state->__pyx_tuple__211);
  Py_VISIT(traverse_module_state->__pyx_tuple__212);
  Py_VISIT(traverse_module_state->__pyx_tuple__213);
  Py_VISIT(traverse_module_state->__pyx_tuple__214);
  Py_VISIT(traverse_module_state->__pyx_tuple__216);
  Py_VISIT(traverse_module_state->__pyx_tuple__218);
  Py_VISIT(traverse_module_state->__pyx_tuple__220);
  Py_VISIT(traverse_module_state->__pyx_tuple__222);
  Py_VISIT(traverse_module_state->__pyx_tuple__224);
  Py_VISIT(traverse_module_state->__pyx_tuple__226);
  Py_VISIT(traverse_module_state->__pyx_tuple__228);
  Py_VISIT(traverse_module_state->__pyx_tuple__230);
  Py_VISIT(traverse_module_state->__pyx_tuple__236);
  Py_VISIT(traverse_module_state->__pyx_tuple__248);
  Py_VISIT(traverse_module_state->__pyx_tuple__249);
  Py_VISIT(traverse_module_state->__pyx_tuple__250);
  Py_VISIT(traverse_module_state->__pyx_tuple__252);
  Py_VISIT(traverse_module_state->__pyx_tuple__255);
  Py_VISIT(traverse_module_state->__pyx_tuple__257);
  Py_VISIT(traverse_module_state->__pyx_tuple__260);
  Py_VISIT(traverse_module_state->__pyx_tuple__262);
  Py_VISIT(traverse_module_state->__pyx_tuple__264);
  Py_VISIT(traverse_module_state->__pyx_tuple__266);
  Py_VISIT(traverse_module_state->__pyx_tuple__268);
  Py_VISIT(traverse_module_state->__pyx_tuple__270);
  Py_VISIT(traverse_module_state->__pyx_tuple__273);
  Py_VISIT(traverse_module_state->__pyx_tuple__275);
  Py_VISIT(traverse_module_state->__pyx_tuple__276);
  Py_VISIT(traverse_module_state->__pyx_tuple__278);
  Py_VISIT(traverse_module_state->__pyx_tuple__280);
  Py_VISIT(traverse_module_state->__pyx_tuple__281);
  Py_VISIT(traverse_module_state->__pyx_tuple__283);
  Py_VISIT(traverse_module_state->__pyx_tuple__285);
  Py_VISIT(traverse_module_state->__pyx_tuple__287);
  Py_VISIT(traverse_module_state->__pyx_tuple__289);
  Py_VISIT(traverse_module_state->__pyx_tuple__291);
  Py_VISIT(traverse_module_state->__pyx_tuple__293);
  Py_VISIT(traverse_module_state->__pyx_tuple__295);
  Py_VISIT(traverse_module_state->__pyx_tuple__297);
  Py_VISIT(traverse_module_state->__pyx_tuple__299);
  Py_VISIT(traverse_module_state->__pyx_tuple__301);
  Py_VISIT(traverse_module_state->__pyx_tuple__303);
  Py_VISIT(traverse_module_state->__pyx_tuple__305);
  Py_VISIT(traverse_module_state->__pyx_tuple__306);
  Py_VISIT(traverse_module_state->__pyx_tuple__308);
  Py_VISIT(traverse_module_state->__pyx_tuple__310);
  Py_VISIT(traverse_module_state->__pyx_tuple__312);
  Py_VISIT(traverse_module_state->__pyx_tuple__313);
  Py_VISIT(traverse_module_state->__pyx_tuple__315);
  Py_VISIT(traverse_module_state->__pyx_tuple__316);
  Py_VISIT(traverse_module_state->__pyx_tuple__318);
  Py_VISIT(traverse_module_state->__pyx_tuple__320);
  Py_VISIT(traverse_module_state->__pyx_tuple__322);
  Py_VISIT(traverse_module_state->__pyx_tuple__323);
  Py_VISIT(traverse_module_state->__pyx_tuple__326);
  Py_VISIT(traverse_module_state->__pyx_tuple__328);
  Py_VISIT(traverse_module_state->__pyx_tuple__329);
  Py_VISIT(traverse_module_state->__pyx_tuple__331);
  Py_VISIT(traverse_module_state->__pyx_tuple__333);
  Py_VISIT(traverse_module_state->__pyx_tuple__335);
  Py_VISIT(traverse_module_state->__pyx_tuple__337);
  Py_VISIT(traverse_module_state->__pyx_tuple__339);
  Py_VISIT(traverse_module_state->__pyx_tuple__340);
  Py_VISIT(traverse_module_state->__pyx_tuple__342);
  Py_VISIT(traverse_module_state->__pyx_tuple__344);
  Py_VISIT(traverse_module_state->__pyx_tuple__345);
  Py_VISIT(traverse_module_state->__pyx_tuple__347);
  Py_VISIT(traverse_module_state->__pyx_tuple__348);
  Py_VISIT(traverse_module_state->__pyx_tuple__350);
  Py_VISIT(traverse_module_state->__pyx_tuple__351);
  Py_VISIT(traverse_module_state->__pyx_tuple__353);
  Py_VISIT(traverse_module_state->__pyx_tuple__354);
  Py_VISIT(traverse_module_state->__pyx_tuple__356);
  Py_VISIT(traverse_module_state->__pyx_tuple__357);
  Py_VISIT(traverse_module_state->__pyx_tuple__359);
  Py_VISIT(traverse_module_state->__pyx_tuple__360);
  Py_VISIT(traverse_module_state->__pyx_tuple__362);
  Py_VISIT(traverse_module_state->__pyx_tuple__364);
  Py_VISIT(traverse_module_state->__pyx_tuple__365);
  Py_VISIT(traverse_module_state->__pyx_tuple__367);
  Py_VISIT(traverse_module_state->__pyx_tuple__369);
  Py_VISIT(traverse_module_state->__pyx_tuple__370);
  Py_VISIT(traverse_module_state->__pyx_tuple__372);
  Py_VISIT(traverse_module_state->__pyx_tuple__373);
  Py_VISIT(traverse_module_state->__pyx_tuple__375);
  Py_VISIT(traverse_module_state->__pyx_tuple__377);
  Py_VISIT(traverse_module_state->__pyx_tuple__379);
  Py_VISIT(traverse_module_state->__pyx_tuple__382);
  Py_VISIT(traverse_module_state->__pyx_tuple__384);
  Py_VISIT(traverse_module_state->__pyx_tuple__385);
  Py_VISIT(traverse_module_state->__pyx_tuple__387);
  Py_VISIT(traverse_module_state->__pyx_tuple__389);
  Py_VISIT(traverse_module_state->__pyx_tuple__391);
  Py_VISIT(traverse_module_state->__pyx_tuple__393);
  Py_VISIT(traverse_module_state->__pyx_codeobj__107);
  Py_VISIT(traverse_module_state->__pyx_codeobj__126);
  Py_VISIT(traverse_module_state->__pyx_codeobj__131);
  Py_VISIT(traverse_module_state->__pyx_codeobj__133);
  Py_VISIT(traverse_module_state->__pyx_codeobj__135);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__163);
  Py_VISIT(traverse_module_state->__pyx_codeobj__164);
  Py_VISIT(traverse_module_state->__pyx_codeobj__166);
  Py_VISIT(traverse_module_state->__pyx_codeobj__167);
  Py_VISIT(traverse_module_state->__pyx_codeobj__169);
  Py_VISIT(traverse_module_state->__pyx_codeobj__171);
  Py_VISIT(traverse_module_state->__pyx_codeobj__172);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  Py_VISIT(traverse_module_state->__pyx_codeobj__178);
  Py_VISIT(traverse_module_state->__pyx_codeobj__180);
  Py_VISIT(traverse_module_state->__pyx_codeobj__182);
  Py_VISIT(traverse_module_state->__pyx_codeobj__185);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__189);
  Py_VISIT(traverse_module_state->__pyx_codeobj__191);
  Py_VISIT(traverse_module_state->__pyx_codeobj__194);
  Py_VISIT(traverse_module_state->__pyx_codeobj__195);
  Py_VISIT(traverse_module_state->__pyx_codeobj__196);
  Py_VISIT(traverse_module_state->__pyx_codeobj__197);
  Py_VISIT(traverse_module_state->__pyx_codeobj__198);
  Py_VISIT(traverse_module_state->__pyx_codeobj__200);
  Py_VISIT(traverse_module_state->__pyx_codeobj__203);
  Py_VISIT(traverse_module_state->__pyx_codeobj__205);
  Py_VISIT(traverse_module_state->__pyx_codeobj__207);
  Py_VISIT(traverse_module_state->__pyx_codeobj__210);
  Py_VISIT(traverse_module_state->__pyx_codeobj__215);
  Py_VISIT(traverse_module_state->__pyx_codeobj__217);
  Py_VISIT(traverse_module_state->__pyx_codeobj__219);
  Py_VISIT(traverse_module_state->__pyx_codeobj__221);
  Py_VISIT(traverse_module_state->__pyx_codeobj__223);
  Py_VISIT(traverse_module_state->__pyx_codeobj__225);
  Py_VISIT(traverse_module_state->__pyx_codeobj__227);
  Py_VISIT(traverse_module_state->__pyx_codeobj__229);
  Py_VISIT(traverse_module_state->__pyx_codeobj__231);
  Py_VISIT(traverse_module_state->__pyx_codeobj__232);
  Py_VISIT(traverse_module_state->__pyx_codeobj__233);
  Py_VISIT(traverse_module_state->__pyx_codeobj__234);
  Py_VISIT(traverse_module_state->__pyx_codeobj__235);
  Py_VISIT(traverse_module_state->__pyx_codeobj__237);
  Py_VISIT(traverse_module_state->__pyx_codeobj__238);
  Py_VISIT(traverse_module_state->__pyx_codeobj__239);
  Py_VISIT(traverse_module_state->__pyx_codeobj__240);
  Py_VISIT(traverse_module_state->__pyx_codeobj__241);
  Py_VISIT(traverse_module_state->__pyx_codeobj__242);
  Py_VISIT(traverse_module_state->__pyx_codeobj__243);
  Py_VISIT(traverse_module_state->__pyx_codeobj__244);
  Py_VISIT(traverse_module_state->__pyx_codeobj__245);
  Py_VISIT(traverse_module_state->__pyx_codeobj__246);
  Py_VISIT(traverse_module_state->__pyx_codeobj__247);
  Py_VISIT(traverse_module_state->__pyx_codeobj__251);
  Py_VISIT(traverse_module_state->__pyx_codeobj__253);
  Py_VISIT(traverse_module_state->__pyx_codeobj__254);
  Py_VISIT(traverse_module_state->__pyx_codeobj__256);
  Py_VISIT(traverse_module_state->__pyx_codeobj__258);
  Py_VISIT(traverse_module_state->__pyx_codeobj__259);
  Py_VISIT(traverse_module_state->__pyx_codeobj__261);
  Py_VISIT(traverse_module_state->__pyx_codeobj__263);
  Py_VISIT(traverse_module_state->__pyx_codeobj__265);
  Py_VISIT(traverse_module_state->__pyx_codeobj__267);
  Py_VISIT(traverse_module_state->__pyx_codeobj__269);
  Py_VISIT(traverse_module_state->__pyx_codeobj__271);
  Py_VISIT(traverse_module_state->__pyx_codeobj__272);
  Py_VISIT(traverse_module_state->__pyx_codeobj__274);
  Py_VISIT(traverse_module_state->__pyx_codeobj__277);
  Py_VISIT(traverse_module_state->__pyx_codeobj__279);
  Py_VISIT(traverse_module_state->__pyx_codeobj__282);
  Py_VISIT(traverse_module_state->__pyx_codeobj__284);
  Py_VISIT(traverse_module_state->__pyx_codeobj__286);
  Py_VISIT(traverse_module_state->__pyx_codeobj__288);
  Py_VISIT(traverse_module_state->__pyx_codeobj__290);
  Py_VISIT(traverse_module_state->__pyx_codeobj__292);
  Py_VISIT(traverse_module_state->__pyx_codeobj__294);
  Py_VISIT(traverse_module_state->__pyx_codeobj__296);
  Py_VISIT(traverse_module_state->__pyx_codeobj__298);
  Py_VISIT(traverse_module_state->__pyx_codeobj__300);
  Py_VISIT(traverse_module_state->__pyx_codeobj__302);
  Py_VISIT(traverse_module_state->__pyx_codeobj__304);
  Py_VISIT(traverse_module_state->__pyx_codeobj__307);
  Py_VISIT(traverse_module_state->__pyx_codeobj__309);
  Py_VISIT(traverse_module_state->__pyx_codeobj__311);
  Py_VISIT(traverse_module_state->__pyx_codeobj__314);
  Py_VISIT(traverse_module_state->__pyx_codeobj__317);
  Py_VISIT(traverse_module_state->__pyx_codeobj__319);
  Py_VISIT(traverse_module_state->__pyx_codeobj__321);
  Py_VISIT(traverse_module_state->__pyx_codeobj__324);
  Py_VISIT(traverse_module_state->__pyx_codeobj__325);
  Py_VISIT(traverse_module_state->__pyx_codeobj__327);
  Py_VISIT(traverse_module_state->__pyx_codeobj__330);
  Py_VISIT(traverse_module_state->__pyx_codeobj__332);
  Py_VISIT(traverse_module_state->__pyx_codeobj__334);
  Py_VISIT(traverse_module_state->__pyx_codeobj__336);
  Py_VISIT(traverse_module_state->__pyx_codeobj__338);
  Py_VISIT(traverse_module_state->__pyx_codeobj__341);
  Py_VISIT(traverse_module_state->__pyx_codeobj__343);
  Py_VISIT(traverse_module_state->__pyx_codeobj__346);
  Py_VISIT(traverse_module_state->__pyx_codeobj__349);
  Py_VISIT(traverse_module_state->__pyx_codeobj__352);
  Py_VISIT(traverse_module_state->__pyx_codeobj__355);
  Py_VISIT(traverse_module_state->__pyx_codeobj__358);
  Py_VISIT(traverse_module_state->__pyx_codeobj__361);
  Py_VISIT(traverse_module_state->__pyx_codeobj__363);
  Py_VISIT(traverse_module_state->__pyx_codeobj__366);
  Py_VISIT(traverse_module_state->__pyx_codeobj__368);
  Py_VISIT(traverse_module_state->__pyx_codeobj__371);
  Py_VISIT(traverse_module_state->__pyx_codeobj__374);
  Py_VISIT(traverse_module_state->__pyx_codeobj__376);
  Py_VISIT(traverse_module_state->__pyx_codeobj__378);
  Py_VISIT(traverse_module_state->__pyx_codeobj__380);
  Py_VISIT(traverse_module_state->__pyx_codeobj__381);
  Py_VISIT(traverse_module_state->__pyx_codeobj__383);
  Py_VISIT(traverse_module_state->__pyx_codeobj__386);
  Py_VISIT(traverse_module_state->__pyx_codeobj__388);
  Py_VISIT(traverse_module_state->__pyx_codeobj__390);
  Py_VISIT(traverse_module_state->__pyx_codeobj__392);
  Py_VISIT(traverse_module_state->__pyx_codeobj__394);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio
#define __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable __pyx_mstate_global->__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable
#endif
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio
#define __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable __pyx_mstate_global->__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable
#define __pyx_kp_s_0 __pyx_mstate_global->__pyx_kp_s_0
#define __pyx_kp_s_00 __pyx_mstate_global->__pyx_kp_s_00
#define __pyx_kp_u_0_1 __pyx_mstate_global->__pyx_kp_u_0_1
#define __pyx_kp_s_0_1_2 __pyx_mstate_global->__pyx_kp_s_0_1_2
#define __pyx_kp_s_0_399003 __pyx_mstate_global->__pyx_kp_s_0_399003
#define __pyx_kp_s_0_82_0_83_0_85 __pyx_mstate_global->__pyx_kp_s_0_82_0_83_0_85
#define __pyx_kp_s_1 __pyx_mstate_global->__pyx_kp_s_1
#define __pyx_kp_s_10 __pyx_mstate_global->__pyx_kp_s_10
#define __pyx_kp_s_14 __pyx_mstate_global->__pyx_kp_s_14
#define __pyx_kp_s_14b143 __pyx_mstate_global->__pyx_kp_s_14b143
#define __pyx_kp_s_1_0 __pyx_mstate_global->__pyx_kp_s_1_0
#define __pyx_kp_s_1_000003 __pyx_mstate_global->__pyx_kp_s_1_000003
#define __pyx_kp_s_1_000012 __pyx_mstate_global->__pyx_kp_s_1_000012
#define __pyx_kp_s_1_000013 __pyx_mstate_global->__pyx_kp_s_1_000013
#define __pyx_kp_s_1_2 __pyx_mstate_global->__pyx_kp_s_1_2
#define __pyx_kp_s_1_2_3_4_finished __pyx_mstate_global->__pyx_kp_s_1_2_3_4_finished
#define __pyx_kp_s_1_2_3_4_quarter_finished_4_repo __pyx_mstate_global->__pyx_kp_s_1_2_3_4_quarter_finished_4_repo
#define __pyx_kp_s_1_5 __pyx_mstate_global->__pyx_kp_s_1_5
#define __pyx_kp_s_1_K_2_3 __pyx_mstate_global->__pyx_kp_s_1_K_2_3
#define __pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI __pyx_mstate_global->__pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI
#define __pyx_kp_s_1_finished_2_finished_3_finishe __pyx_mstate_global->__pyx_kp_s_1_finished_2_finished_3_finishe
#define __pyx_kp_s_1_x_finished_x_finished_x_finis __pyx_mstate_global->__pyx_kp_s_1_x_finished_x_finished_x_finis
#define __pyx_kp_s_2 __pyx_mstate_global->__pyx_kp_s_2
#define __pyx_kp_s_20240101 __pyx_mstate_global->__pyx_kp_s_20240101
#define __pyx_kp_s_20240625 __pyx_mstate_global->__pyx_kp_s_20240625
#define __pyx_kp_s_20240813 __pyx_mstate_global->__pyx_kp_s_20240813
#define __pyx_kp_s_2f __pyx_mstate_global->__pyx_kp_s_2f
#define __pyx_kp_s_3 __pyx_mstate_global->__pyx_kp_s_3
#define __pyx_kp_s_30 __pyx_mstate_global->__pyx_kp_s_30
#define __pyx_kp_s_300416 __pyx_mstate_global->__pyx_kp_s_300416
#define __pyx_kp_s_4 __pyx_mstate_global->__pyx_kp_s_4
#define __pyx_kp_s_5_1 __pyx_mstate_global->__pyx_kp_s_5_1
#define __pyx_kp_s_5_9_85 __pyx_mstate_global->__pyx_kp_s_5_9_85
#define __pyx_n_u_6 __pyx_mstate_global->__pyx_n_u_6
#define __pyx_kp_s_60 __pyx_mstate_global->__pyx_kp_s_60
#define __pyx_kp_s_601360 __pyx_mstate_global->__pyx_kp_s_601360
#define __pyx_kp_s_60_2 __pyx_mstate_global->__pyx_kp_s_60_2
#define __pyx_kp_s_68 __pyx_mstate_global->__pyx_kp_s_68
#define __pyx_kp_s_71 __pyx_mstate_global->__pyx_kp_s_71
#define __pyx_kp_s_8 __pyx_mstate_global->__pyx_kp_s_8
#define __pyx_kp_s_82 __pyx_mstate_global->__pyx_kp_s_82
#define __pyx_kp_s_97 __pyx_mstate_global->__pyx_kp_s_97
#define __pyx_kp_s_9_85 __pyx_mstate_global->__pyx_kp_s_9_85
#define __pyx_kp_s_9_85_2 __pyx_mstate_global->__pyx_kp_s_9_85_2
#define __pyx_kp_s_9_85_5 __pyx_mstate_global->__pyx_kp_s_9_85_5
#define __pyx_n_s_ADX __pyx_mstate_global->__pyx_n_s_ADX
#define __pyx_n_s_ADXR __pyx_mstate_global->__pyx_n_s_ADXR
#define __pyx_kp_s_AI __pyx_mstate_global->__pyx_kp_s_AI
#define __pyx_kp_s_AR_PL_UKai_CN __pyx_mstate_global->__pyx_kp_s_AR_PL_UKai_CN
#define __pyx_n_s_AxisLineOpts __pyx_mstate_global->__pyx_n_s_AxisLineOpts
#define __pyx_n_s_AxisOpts __pyx_mstate_global->__pyx_n_s_AxisOpts
#define __pyx_n_s_AxisTickOpts __pyx_mstate_global->__pyx_n_s_AxisTickOpts
#define __pyx_n_s_BBANDS __pyx_mstate_global->__pyx_n_s_BBANDS
#define __pyx_n_s_BK0815 __pyx_mstate_global->__pyx_n_s_BK0815
#define __pyx_n_s_BK0816 __pyx_mstate_global->__pyx_n_s_BK0816
#define __pyx_n_s_BK0817 __pyx_mstate_global->__pyx_n_s_BK0817
#define __pyx_n_s_BK1050 __pyx_mstate_global->__pyx_n_s_BK1050
#define __pyx_n_s_BK1051 __pyx_mstate_global->__pyx_n_s_BK1051
#define __pyx_n_s_BOLL __pyx_mstate_global->__pyx_n_s_BOLL
#define __pyx_n_s_Bar __pyx_mstate_global->__pyx_n_s_Bar
#define __pyx_kp_u_Beginning __pyx_mstate_global->__pyx_kp_u_Beginning
#define __pyx_kp_s_Bollinger_Bands __pyx_mstate_global->__pyx_kp_s_Bollinger_Bands
#define __pyx_n_s_CDL2CROWS __pyx_mstate_global->__pyx_n_s_CDL2CROWS
#define __pyx_n_s_CDL3INSIDE __pyx_mstate_global->__pyx_n_s_CDL3INSIDE
#define __pyx_n_s_CDL3STARSINSOUTH __pyx_mstate_global->__pyx_n_s_CDL3STARSINSOUTH
#define __pyx_n_s_CDL3WHITESOLDIERS __pyx_mstate_global->__pyx_n_s_CDL3WHITESOLDIERS
#define __pyx_n_s_CDLENGULFING __pyx_mstate_global->__pyx_n_s_CDLENGULFING
#define __pyx_n_s_CDLHAMMER __pyx_mstate_global->__pyx_n_s_CDLHAMMER
#define __pyx_n_s_CDLHARAMI __pyx_mstate_global->__pyx_n_s_CDLHARAMI
#define __pyx_n_s_CDLMORNINGSTAR __pyx_mstate_global->__pyx_n_s_CDLMORNINGSTAR
#define __pyx_n_s_CDLPIERCING __pyx_mstate_global->__pyx_n_s_CDLPIERCING
#define __pyx_n_s_CDLRISEFALL3METHODS __pyx_mstate_global->__pyx_n_s_CDLRISEFALL3METHODS
#define __pyx_n_s_CDLXSIDEGAP3METHODS __pyx_mstate_global->__pyx_n_s_CDLXSIDEGAP3METHODS
#define __pyx_n_s_CRO __pyx_mstate_global->__pyx_n_s_CRO
#define __pyx_kp_u_Can_t_load __pyx_mstate_global->__pyx_kp_u_Can_t_load
#define __pyx_kp_u_Candle_Chart __pyx_mstate_global->__pyx_kp_u_Candle_Chart
#define __pyx_kp_u_Cant_getStockTradeDayInfoFq_for __pyx_mstate_global->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for
#define __pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2 __pyx_mstate_global->__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2
#define __pyx_n_s_ColDef __pyx_mstate_global->__pyx_n_s_ColDef
#define __pyx_n_s_Counter __pyx_mstate_global->__pyx_n_s_Counter
#define __pyx_n_s_D __pyx_mstate_global->__pyx_n_s_D
#define __pyx_n_s_DEA __pyx_mstate_global->__pyx_n_s_DEA
#define __pyx_n_s_DEMA __pyx_mstate_global->__pyx_n_s_DEMA
#define __pyx_kp_s_DI __pyx_mstate_global->__pyx_kp_s_DI
#define __pyx_n_s_DIF __pyx_mstate_global->__pyx_n_s_DIF
#define __pyx_kp_s_DI_2 __pyx_mstate_global->__pyx_kp_s_DI_2
#define __pyx_n_s_DMI __pyx_mstate_global->__pyx_n_s_DMI
#define __pyx_kp_s_DRG_DIP __pyx_mstate_global->__pyx_kp_s_DRG_DIP
#define __pyx_n_s_DataFrame __pyx_mstate_global->__pyx_n_s_DataFrame
#define __pyx_n_s_DataZoomOpts __pyx_mstate_global->__pyx_n_s_DataZoomOpts
#define __pyx_n_s_Dict __pyx_mstate_global->__pyx_n_s_Dict
#define __pyx_n_s_Dispose __pyx_mstate_global->__pyx_n_s_Dispose
#define __pyx_n_s_EMA __pyx_mstate_global->__pyx_n_s_EMA
#define __pyx_n_s_Edge __pyx_mstate_global->__pyx_n_s_Edge
#define __pyx_kp_s_Exponential_Moving_Average_EMA_l __pyx_mstate_global->__pyx_kp_s_Exponential_Moving_Average_EMA_l
#define __pyx_kp_u_Failed_to_getStockTradeDayInfoSq __pyx_mstate_global->__pyx_kp_u_Failed_to_getStockTradeDayInfoSq
#define __pyx_n_s_FirstColumn __pyx_mstate_global->__pyx_n_s_FirstColumn
#define __pyx_n_s_FirstRow __pyx_mstate_global->__pyx_n_s_FirstRow
#define __pyx_n_s_Grid __pyx_mstate_global->__pyx_n_s_Grid
#define __pyx_n_s_GridOpts __pyx_mstate_global->__pyx_n_s_GridOpts
#define __pyx_n_s_H_line __pyx_mstate_global->__pyx_n_s_H_line
#define __pyx_n_s_InitOpts __pyx_mstate_global->__pyx_n_s_InitOpts
#define __pyx_n_s_ItemStyleOpts __pyx_mstate_global->__pyx_n_s_ItemStyleOpts
#define __pyx_n_s_J __pyx_mstate_global->__pyx_n_s_J
#define __pyx_n_s_JsCode __pyx_mstate_global->__pyx_n_s_JsCode
#define __pyx_n_s_K __pyx_mstate_global->__pyx_n_s_K
#define __pyx_n_s_KAMA __pyx_mstate_global->__pyx_n_s_KAMA
#define __pyx_n_s_KDJ __pyx_mstate_global->__pyx_n_s_KDJ
#define __pyx_n_s_Kline __pyx_mstate_global->__pyx_n_s_Kline
#define __pyx_n_u_Kline_2 __pyx_mstate_global->__pyx_n_u_Kline_2
#define __pyx_kp_u_Kline_png __pyx_mstate_global->__pyx_kp_u_Kline_png
#define __pyx_n_s_LIGHT __pyx_mstate_global->__pyx_n_s_LIGHT
#define __pyx_n_s_L_line __pyx_mstate_global->__pyx_n_s_L_line
#define __pyx_n_s_LabelOpts __pyx_mstate_global->__pyx_n_s_LabelOpts
#define __pyx_n_s_LastColumn __pyx_mstate_global->__pyx_n_s_LastColumn
#define __pyx_n_s_LastRow __pyx_mstate_global->__pyx_n_s_LastRow
#define __pyx_n_s_LegendOpts __pyx_mstate_global->__pyx_n_s_LegendOpts
#define __pyx_n_s_Line __pyx_mstate_global->__pyx_n_s_Line
#define __pyx_n_s_LineStyleOpts __pyx_mstate_global->__pyx_n_s_LineStyleOpts
#define __pyx_n_s_List __pyx_mstate_global->__pyx_n_s_List
#define __pyx_n_s_LoadFromFile __pyx_mstate_global->__pyx_n_s_LoadFromFile
#define __pyx_n_s_MA __pyx_mstate_global->__pyx_n_s_MA
#define __pyx_n_s_MA10 __pyx_mstate_global->__pyx_n_s_MA10
#define __pyx_n_s_MA20 __pyx_mstate_global->__pyx_n_s_MA20
#define __pyx_n_s_MA30 __pyx_mstate_global->__pyx_n_s_MA30
#define __pyx_n_s_MA5 __pyx_mstate_global->__pyx_n_s_MA5
#define __pyx_n_s_MA60 __pyx_mstate_global->__pyx_n_s_MA60
#define __pyx_n_s_MACD __pyx_mstate_global->__pyx_n_s_MACD
#define __pyx_n_s_MAMA __pyx_mstate_global->__pyx_n_s_MAMA
#define __pyx_n_s_MINUS_DI __pyx_mstate_global->__pyx_n_s_MINUS_DI
#define __pyx_n_s_M_line __pyx_mstate_global->__pyx_n_s_M_line
#define __pyx_n_s_MaAll __pyx_mstate_global->__pyx_n_s_MaAll
#define __pyx_n_s_MarkPointItem __pyx_mstate_global->__pyx_n_s_MarkPointItem
#define __pyx_n_s_MarkPointOpts __pyx_mstate_global->__pyx_n_s_MarkPointOpts
#define __pyx_kp_s_Moving_average_MA_lines __pyx_mstate_global->__pyx_kp_s_Moving_average_MA_lines
#define __pyx_kp_u_Mysql __pyx_mstate_global->__pyx_kp_u_Mysql
#define __pyx_n_s_NA __pyx_mstate_global->__pyx_n_s_NA
#define __pyx_kp_u_Need_to_update_database_table __pyx_mstate_global->__pyx_kp_u_Need_to_update_database_table
#define __pyx_kp_u_Need_to_update_strategy __pyx_mstate_global->__pyx_kp_u_Need_to_update_strategy
#define __pyx_n_s_OBV __pyx_mstate_global->__pyx_n_s_OBV
#define __pyx_n_s_Options __pyx_mstate_global->__pyx_n_s_Options
#define __pyx_n_s_PLUS_DI __pyx_mstate_global->__pyx_n_s_PLUS_DI
#define __pyx_n_s_ProcessPoolExecutor __pyx_mstate_global->__pyx_n_s_ProcessPoolExecutor
#define __pyx_n_s_RSI __pyx_mstate_global->__pyx_n_s_RSI
#define __pyx_n_s_Reds __pyx_mstate_global->__pyx_n_s_Reds
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_n_s_SMA __pyx_mstate_global->__pyx_n_s_SMA
#define __pyx_n_s_ST __pyx_mstate_global->__pyx_n_s_ST
#define __pyx_n_s_STOCH __pyx_mstate_global->__pyx_n_s_STOCH
#define __pyx_n_s_Save __pyx_mstate_global->__pyx_n_s_Save
#define __pyx_n_s_Service __pyx_mstate_global->__pyx_n_s_Service
#define __pyx_n_s_SplitLineOpts __pyx_mstate_global->__pyx_n_s_SplitLineOpts
#define __pyx_kp_s_Strategy_figure_has_generated __pyx_mstate_global->__pyx_kp_s_Strategy_figure_has_generated
#define __pyx_n_s_T3 __pyx_mstate_global->__pyx_n_s_T3
#define __pyx_n_s_TEMA __pyx_mstate_global->__pyx_n_s_TEMA
#define __pyx_n_s_TIMI_COUNT __pyx_mstate_global->__pyx_n_s_TIMI_COUNT
#define __pyx_n_s_TRIMA __pyx_mstate_global->__pyx_n_s_TRIMA
#define __pyx_n_s_Table __pyx_mstate_global->__pyx_n_s_Table
#define __pyx_kp_u_The __pyx_mstate_global->__pyx_kp_u_The
#define __pyx_n_s_ThemeType __pyx_mstate_global->__pyx_n_s_ThemeType
#define __pyx_n_s_ThreadPoolExecutor __pyx_mstate_global->__pyx_n_s_ThreadPoolExecutor
#define __pyx_n_s_Timestamp __pyx_mstate_global->__pyx_n_s_Timestamp
#define __pyx_n_s_TitleOpts __pyx_mstate_global->__pyx_n_s_TitleOpts
#define __pyx_n_s_ToImage __pyx_mstate_global->__pyx_n_s_ToImage
#define __pyx_n_s_TooltipOpts __pyx_mstate_global->__pyx_n_s_TooltipOpts
#define __pyx_n_s_Union __pyx_mstate_global->__pyx_n_s_Union
#define __pyx_kp_s_Union_Dict_None __pyx_mstate_global->__pyx_kp_s_Union_Dict_None
#define __pyx_kp_s_Union_List_None __pyx_mstate_global->__pyx_kp_s_Union_List_None
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_Volumn __pyx_mstate_global->__pyx_n_s_Volumn
#define __pyx_n_s_WILLR __pyx_mstate_global->__pyx_n_s_WILLR
#define __pyx_n_s_WMA __pyx_mstate_global->__pyx_n_s_WMA
#define __pyx_n_s_WR __pyx_mstate_global->__pyx_n_s_WR
#define __pyx_n_s_Workbook __pyx_mstate_global->__pyx_n_s_Workbook
#define __pyx_n_s_Worksheets __pyx_mstate_global->__pyx_n_s_Worksheets
#define __pyx_kp_s_Y_m_d __pyx_mstate_global->__pyx_kp_s_Y_m_d
#define __pyx_n_u__10 __pyx_mstate_global->__pyx_n_u__10
#define __pyx_kp_s__102 __pyx_mstate_global->__pyx_kp_s__102
#define __pyx_kp_s__103 __pyx_mstate_global->__pyx_kp_s__103
#define __pyx_kp_s__104 __pyx_mstate_global->__pyx_kp_s__104
#define __pyx_kp_s__105 __pyx_mstate_global->__pyx_kp_s__105
#define __pyx_kp_s__108 __pyx_mstate_global->__pyx_kp_s__108
#define __pyx_kp_u__108 __pyx_mstate_global->__pyx_kp_u__108
#define __pyx_kp_s__11 __pyx_mstate_global->__pyx_kp_s__11
#define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11
#define __pyx_n_s__117 __pyx_mstate_global->__pyx_n_s__117
#define __pyx_n_u__12 __pyx_mstate_global->__pyx_n_u__12
#define __pyx_kp_s__128 __pyx_mstate_global->__pyx_kp_s__128
#define __pyx_kp_s__129 __pyx_mstate_global->__pyx_kp_s__129
#define __pyx_kp_s__13 __pyx_mstate_global->__pyx_kp_s__13
#define __pyx_kp_s__139 __pyx_mstate_global->__pyx_kp_s__139
#define __pyx_kp_s__14 __pyx_mstate_global->__pyx_kp_s__14
#define __pyx_kp_s__140 __pyx_mstate_global->__pyx_kp_s__140
#define __pyx_kp_s__141 __pyx_mstate_global->__pyx_kp_s__141
#define __pyx_kp_s__142 __pyx_mstate_global->__pyx_kp_s__142
#define __pyx_kp_s__143 __pyx_mstate_global->__pyx_kp_s__143
#define __pyx_kp_s__144 __pyx_mstate_global->__pyx_kp_s__144
#define __pyx_kp_s__147 __pyx_mstate_global->__pyx_kp_s__147
#define __pyx_kp_s__148 __pyx_mstate_global->__pyx_kp_s__148
#define __pyx_kp_s__149 __pyx_mstate_global->__pyx_kp_s__149
#define __pyx_kp_s__15 __pyx_mstate_global->__pyx_kp_s__15
#define __pyx_n_u__150 __pyx_mstate_global->__pyx_n_u__150
#define __pyx_kp_u__151 __pyx_mstate_global->__pyx_kp_u__151
#define __pyx_kp_s__152 __pyx_mstate_global->__pyx_kp_s__152
#define __pyx_n_u__16 __pyx_mstate_global->__pyx_n_u__16
#define __pyx_kp_s__17 __pyx_mstate_global->__pyx_kp_s__17
#define __pyx_n_u__18 __pyx_mstate_global->__pyx_n_u__18
#define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19
#define __pyx_n_u__2 __pyx_mstate_global->__pyx_n_u__2
#define __pyx_kp_u__20 __pyx_mstate_global->__pyx_kp_u__20
#define __pyx_kp_u__21 __pyx_mstate_global->__pyx_kp_u__21
#define __pyx_kp_u__22 __pyx_mstate_global->__pyx_kp_u__22
#define __pyx_kp_s__23 __pyx_mstate_global->__pyx_kp_s__23
#define __pyx_kp_s__24 __pyx_mstate_global->__pyx_kp_s__24
#define __pyx_kp_s__25 __pyx_mstate_global->__pyx_kp_s__25
#define __pyx_kp_s__26 __pyx_mstate_global->__pyx_kp_s__26
#define __pyx_kp_u__27 __pyx_mstate_global->__pyx_kp_u__27
#define __pyx_kp_s__28 __pyx_mstate_global->__pyx_kp_s__28
#define __pyx_kp_s__29 __pyx_mstate_global->__pyx_kp_s__29
#define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3
#define __pyx_kp_s__33 __pyx_mstate_global->__pyx_kp_s__33
#define __pyx_kp_s__34 __pyx_mstate_global->__pyx_kp_s__34
#define __pyx_kp_u__35 __pyx_mstate_global->__pyx_kp_u__35
#define __pyx_n_u__36 __pyx_mstate_global->__pyx_n_u__36
#define __pyx_n_u__37 __pyx_mstate_global->__pyx_n_u__37
#define __pyx_kp_u__38 __pyx_mstate_global->__pyx_kp_u__38
#define __pyx_n_s__395 __pyx_mstate_global->__pyx_n_s__395
#define __pyx_kp_s__4 __pyx_mstate_global->__pyx_kp_s__4
#define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4
#define __pyx_kp_s__40 __pyx_mstate_global->__pyx_kp_s__40
#define __pyx_n_u__41 __pyx_mstate_global->__pyx_n_u__41
#define __pyx_n_u__42 __pyx_mstate_global->__pyx_n_u__42
#define __pyx_kp_s__43 __pyx_mstate_global->__pyx_kp_s__43
#define __pyx_n_s__45 __pyx_mstate_global->__pyx_n_s__45
#define __pyx_n_u__45 __pyx_mstate_global->__pyx_n_u__45
#define __pyx_n_s__46 __pyx_mstate_global->__pyx_n_s__46
#define __pyx_n_u__46 __pyx_mstate_global->__pyx_n_u__46
#define __pyx_kp_s__47 __pyx_mstate_global->__pyx_kp_s__47
#define __pyx_kp_s__49 __pyx_mstate_global->__pyx_kp_s__49
#define __pyx_kp_s__5 __pyx_mstate_global->__pyx_kp_s__5
#define __pyx_kp_s__50 __pyx_mstate_global->__pyx_kp_s__50
#define __pyx_kp_s__51 __pyx_mstate_global->__pyx_kp_s__51
#define __pyx_kp_s__52 __pyx_mstate_global->__pyx_kp_s__52
#define __pyx_kp_s__53 __pyx_mstate_global->__pyx_kp_s__53
#define __pyx_kp_s__54 __pyx_mstate_global->__pyx_kp_s__54
#define __pyx_kp_s__55 __pyx_mstate_global->__pyx_kp_s__55
#define __pyx_n_s__58 __pyx_mstate_global->__pyx_n_s__58
#define __pyx_kp_s__6 __pyx_mstate_global->__pyx_kp_s__6
#define __pyx_kp_s__60 __pyx_mstate_global->__pyx_kp_s__60
#define __pyx_kp_s__61 __pyx_mstate_global->__pyx_kp_s__61
#define __pyx_kp_s__62 __pyx_mstate_global->__pyx_kp_s__62
#define __pyx_kp_s__63 __pyx_mstate_global->__pyx_kp_s__63
#define __pyx_kp_u__64 __pyx_mstate_global->__pyx_kp_u__64
#define __pyx_n_u__65 __pyx_mstate_global->__pyx_n_u__65
#define __pyx_kp_u__66 __pyx_mstate_global->__pyx_kp_u__66
#define __pyx_kp_s__67 __pyx_mstate_global->__pyx_kp_s__67
#define __pyx_kp_s__68 __pyx_mstate_global->__pyx_kp_s__68
#define __pyx_kp_s__69 __pyx_mstate_global->__pyx_kp_s__69
#define __pyx_kp_s__7 __pyx_mstate_global->__pyx_kp_s__7
#define __pyx_kp_s__70 __pyx_mstate_global->__pyx_kp_s__70
#define __pyx_kp_s__71 __pyx_mstate_global->__pyx_kp_s__71
#define __pyx_kp_s__72 __pyx_mstate_global->__pyx_kp_s__72
#define __pyx_kp_s__74 __pyx_mstate_global->__pyx_kp_s__74
#define __pyx_kp_s__75 __pyx_mstate_global->__pyx_kp_s__75
#define __pyx_kp_s__80 __pyx_mstate_global->__pyx_kp_s__80
#define __pyx_kp_s__81 __pyx_mstate_global->__pyx_kp_s__81
#define __pyx_kp_s__82 __pyx_mstate_global->__pyx_kp_s__82
#define __pyx_kp_s__83 __pyx_mstate_global->__pyx_kp_s__83
#define __pyx_kp_s__84 __pyx_mstate_global->__pyx_kp_s__84
#define __pyx_kp_s__85 __pyx_mstate_global->__pyx_kp_s__85
#define __pyx_kp_s__86 __pyx_mstate_global->__pyx_kp_s__86
#define __pyx_kp_s__87 __pyx_mstate_global->__pyx_kp_s__87
#define __pyx_kp_s__88 __pyx_mstate_global->__pyx_kp_s__88
#define __pyx_kp_s__89 __pyx_mstate_global->__pyx_kp_s__89
#define __pyx_kp_u__9 __pyx_mstate_global->__pyx_kp_u__9
#define __pyx_n_u__91 __pyx_mstate_global->__pyx_n_u__91
#define __pyx_kp_u__92 __pyx_mstate_global->__pyx_kp_u__92
#define __pyx_kp_s__95 __pyx_mstate_global->__pyx_kp_s__95
#define __pyx_kp_s__96 __pyx_mstate_global->__pyx_kp_s__96
#define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add
#define __pyx_n_s_add_js_funcs __pyx_mstate_global->__pyx_n_s_add_js_funcs
#define __pyx_n_s_add_xaxis __pyx_mstate_global->__pyx_n_s_add_xaxis
#define __pyx_n_s_add_yaxis __pyx_mstate_global->__pyx_n_s_add_yaxis
#define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
#define __pyx_n_s_all_data __pyx_mstate_global->__pyx_n_s_all_data
#define __pyx_n_s_all_list __pyx_mstate_global->__pyx_n_s_all_list
#define __pyx_n_s_all_near_df __pyx_mstate_global->__pyx_n_s_all_near_df
#define __pyx_n_s_all_stock_simple_info __pyx_mstate_global->__pyx_n_s_all_stock_simple_info
#define __pyx_n_s_all_time_day_df __pyx_mstate_global->__pyx_n_s_all_time_day_df
#define __pyx_n_s_all_time_month_df __pyx_mstate_global->__pyx_n_s_all_time_month_df
#define __pyx_n_s_all_time_week_df __pyx_mstate_global->__pyx_n_s_all_time_week_df
#define __pyx_n_s_amount __pyx_mstate_global->__pyx_n_s_amount
#define __pyx_n_s_amount_ma __pyx_mstate_global->__pyx_n_s_amount_ma
#define __pyx_n_s_amount_th __pyx_mstate_global->__pyx_n_s_amount_th
#define __pyx_n_s_amplitude __pyx_mstate_global->__pyx_n_s_amplitude
#define __pyx_n_s_amplitude_tr_max __pyx_mstate_global->__pyx_n_s_amplitude_tr_max
#define __pyx_n_s_amplitude_tr_min __pyx_mstate_global->__pyx_n_s_amplitude_tr_min
#define __pyx_n_s_and __pyx_mstate_global->__pyx_n_s_and
#define __pyx_kp_u_and_2 __pyx_mstate_global->__pyx_kp_u_and_2
#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
#define __pyx_n_s_apply __pyx_mstate_global->__pyx_n_s_apply
#define __pyx_n_s_area_list __pyx_mstate_global->__pyx_n_s_area_list
#define __pyx_n_s_area_stock_list __pyx_mstate_global->__pyx_n_s_area_stock_list
#define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_as_completed __pyx_mstate_global->__pyx_n_s_as_completed
#define __pyx_n_s_ascending __pyx_mstate_global->__pyx_n_s_ascending
#define __pyx_n_s_astype __pyx_mstate_global->__pyx_n_s_astype
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_autumn_r __pyx_mstate_global->__pyx_n_s_autumn_r
#define __pyx_n_s_average_amplitude __pyx_mstate_global->__pyx_n_s_average_amplitude
#define __pyx_n_s_avg_amount_pa __pyx_mstate_global->__pyx_n_s_avg_amount_pa
#define __pyx_n_s_ax __pyx_mstate_global->__pyx_n_s_ax
#define __pyx_n_s_axes __pyx_mstate_global->__pyx_n_s_axes
#define __pyx_kp_s_axes_unicode_minus __pyx_mstate_global->__pyx_kp_s_axes_unicode_minus
#define __pyx_n_s_axis __pyx_mstate_global->__pyx_n_s_axis
#define __pyx_n_s_axis_pointer_type __pyx_mstate_global->__pyx_n_s_axis_pointer_type
#define __pyx_n_s_axislabel_opts __pyx_mstate_global->__pyx_n_s_axislabel_opts
#define __pyx_n_s_axisline_opts __pyx_mstate_global->__pyx_n_s_axisline_opts
#define __pyx_n_s_axistick_opts __pyx_mstate_global->__pyx_n_s_axistick_opts
#define __pyx_n_s_bar_1 __pyx_mstate_global->__pyx_n_s_bar_1
#define __pyx_n_s_bar_2 __pyx_mstate_global->__pyx_n_s_bar_2
#define __pyx_kp_s_baseStrategy __pyx_mstate_global->__pyx_kp_s_baseStrategy
#define __pyx_n_s_baseStrategy_2 __pyx_mstate_global->__pyx_n_s_baseStrategy_2
#define __pyx_n_s_baseStrategy___getstate __pyx_mstate_global->__pyx_n_s_baseStrategy___getstate
#define __pyx_kp_s_baseStrategy___init __pyx_mstate_global->__pyx_kp_s_baseStrategy___init
#define __pyx_n_s_baseStrategy___setstate __pyx_mstate_global->__pyx_n_s_baseStrategy___setstate
#define __pyx_n_s_baseStrategy_checkDatabaseTableU __pyx_mstate_global->__pyx_n_s_baseStrategy_checkDatabaseTableU
#define __pyx_n_s_baseStrategy_dumpJsonToFile __pyx_mstate_global->__pyx_n_s_baseStrategy_dumpJsonToFile
#define __pyx_n_s_baseStrategy_getAllDelistStock __pyx_mstate_global->__pyx_n_s_baseStrategy_getAllDelistStock
#define __pyx_n_s_baseStrategy_getAllNewStock __pyx_mstate_global->__pyx_n_s_baseStrategy_getAllNewStock
#define __pyx_n_s_baseStrategy_getAllStStock __pyx_mstate_global->__pyx_n_s_baseStrategy_getAllStStock
#define __pyx_n_s_baseStrategy_getStockNameByCode __pyx_mstate_global->__pyx_n_s_baseStrategy_getStockNameByCode
#define __pyx_n_s_baseStrategy_isDelistStock __pyx_mstate_global->__pyx_n_s_baseStrategy_isDelistStock
#define __pyx_n_s_baseStrategy_isDownLimit __pyx_mstate_global->__pyx_n_s_baseStrategy_isDownLimit
#define __pyx_n_s_baseStrategy_isNewStock __pyx_mstate_global->__pyx_n_s_baseStrategy_isNewStock
#define __pyx_n_s_baseStrategy_isStStock __pyx_mstate_global->__pyx_n_s_baseStrategy_isStStock
#define __pyx_n_s_baseStrategy_isUpLimit __pyx_mstate_global->__pyx_n_s_baseStrategy_isUpLimit
#define __pyx_n_s_baseStrategy_listIntersection __pyx_mstate_global->__pyx_n_s_baseStrategy_listIntersection
#define __pyx_n_s_baseStrategy_listUnion __pyx_mstate_global->__pyx_n_s_baseStrategy_listUnion
#define __pyx_n_s_baseStrategy_reset __pyx_mstate_global->__pyx_n_s_baseStrategy_reset
#define __pyx_n_s_baseStrategy_strategyCount __pyx_mstate_global->__pyx_n_s_baseStrategy_strategyCount
#define __pyx_n_s_base_filename __pyx_mstate_global->__pyx_n_s_base_filename
#define __pyx_n_s_base_list __pyx_mstate_global->__pyx_n_s_base_list
#define __pyx_n_s_basename __pyx_mstate_global->__pyx_n_s_basename
#define __pyx_n_s_bbox_inches __pyx_mstate_global->__pyx_n_s_bbox_inches
#define __pyx_kp_u_begin_to_create __pyx_mstate_global->__pyx_kp_u_begin_to_create
#define __pyx_kp_u_between __pyx_mstate_global->__pyx_kp_u_between
#define __pyx_n_s_bg_color __pyx_mstate_global->__pyx_n_s_bg_color
#define __pyx_n_s_bind __pyx_mstate_global->__pyx_n_s_bind
#define __pyx_n_s_bool __pyx_mstate_global->__pyx_n_s_bool
#define __pyx_n_s_border_color __pyx_mstate_global->__pyx_n_s_border_color
#define __pyx_n_s_border_color0 __pyx_mstate_global->__pyx_n_s_border_color0
#define __pyx_n_s_boundary_gap __pyx_mstate_global->__pyx_n_s_boundary_gap
#define __pyx_n_s_bwr_r __pyx_mstate_global->__pyx_n_s_bwr_r
#define __pyx_n_s_by __pyx_mstate_global->__pyx_n_s_by
#define __pyx_n_s_cal_max_th __pyx_mstate_global->__pyx_n_s_cal_max_th
#define __pyx_n_s_cal_min_th __pyx_mstate_global->__pyx_n_s_cal_min_th
#define __pyx_n_s_candle __pyx_mstate_global->__pyx_n_s_candle
#define __pyx_kp_u_cant_get_stock_name_for __pyx_mstate_global->__pyx_kp_u_cant_get_stock_name_for
#define __pyx_n_s_capitalStockStrategy __pyx_mstate_global->__pyx_n_s_capitalStockStrategy
#define __pyx_kp_s_capitalStockStrategy___init __pyx_mstate_global->__pyx_kp_s_capitalStockStrategy___init
#define __pyx_n_s_capitalStockStrategy_getAllHighA __pyx_mstate_global->__pyx_n_s_capitalStockStrategy_getAllHighA
#define __pyx_n_s_capitalStockStrategy_isLowAmount __pyx_mstate_global->__pyx_n_s_capitalStockStrategy_isLowAmount
#define __pyx_n_s_category __pyx_mstate_global->__pyx_n_s_category
#define __pyx_n_s_ceil __pyx_mstate_global->__pyx_n_s_ceil
#define __pyx_n_s_center __pyx_mstate_global->__pyx_n_s_center
#define __pyx_n_s_change_ratio __pyx_mstate_global->__pyx_n_s_change_ratio
#define __pyx_n_s_checkDatabaseTableUpdate __pyx_mstate_global->__pyx_n_s_checkDatabaseTableUpdate
#define __pyx_n_s_check_serializability __pyx_mstate_global->__pyx_n_s_check_serializability
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_closeDriver __pyx_mstate_global->__pyx_n_s_closeDriver
#define __pyx_n_s_cm __pyx_mstate_global->__pyx_n_s_cm
#define __pyx_n_s_cmap __pyx_mstate_global->__pyx_n_s_cmap
#define __pyx_n_s_co_name __pyx_mstate_global->__pyx_n_s_co_name
#define __pyx_n_s_code __pyx_mstate_global->__pyx_n_s_code
#define __pyx_n_s_code_name_table __pyx_mstate_global->__pyx_n_s_code_name_table
#define __pyx_n_s_codes_list __pyx_mstate_global->__pyx_n_s_codes_list
#define __pyx_n_s_codes_str __pyx_mstate_global->__pyx_n_s_codes_str
#define __pyx_kp_u_col_inch __pyx_mstate_global->__pyx_kp_u_col_inch
#define __pyx_n_s_col_inch_2 __pyx_mstate_global->__pyx_n_s_col_inch_2
#define __pyx_n_s_col_list __pyx_mstate_global->__pyx_n_s_col_list
#define __pyx_n_s_col_name __pyx_mstate_global->__pyx_n_s_col_name
#define __pyx_n_s_col_title __pyx_mstate_global->__pyx_n_s_col_title
#define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
#define __pyx_n_s_color __pyx_mstate_global->__pyx_n_s_color
#define __pyx_n_s_color0 __pyx_mstate_global->__pyx_n_s_color0
#define __pyx_n_s_color_function __pyx_mstate_global->__pyx_n_s_color_function
#define __pyx_n_s_color_list __pyx_mstate_global->__pyx_n_s_color_list
#define __pyx_n_s_column_definitions __pyx_mstate_global->__pyx_n_s_column_definitions
#define __pyx_n_s_column_name_list __pyx_mstate_global->__pyx_n_s_column_name_list
#define __pyx_n_s_columns __pyx_mstate_global->__pyx_n_s_columns
#define __pyx_n_s_common __pyx_mstate_global->__pyx_n_s_common
#define __pyx_kp_u_compute_date __pyx_mstate_global->__pyx_kp_u_compute_date
#define __pyx_n_s_concat __pyx_mstate_global->__pyx_n_s_concat
#define __pyx_n_s_concept __pyx_mstate_global->__pyx_n_s_concept
#define __pyx_n_s_concept_list __pyx_mstate_global->__pyx_n_s_concept_list
#define __pyx_n_s_concept_stock_list __pyx_mstate_global->__pyx_n_s_concept_stock_list
#define __pyx_n_s_concurrent_futures __pyx_mstate_global->__pyx_n_s_concurrent_futures
#define __pyx_n_s_convertDictToPandas __pyx_mstate_global->__pyx_n_s_convertDictToPandas
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
#define __pyx_n_s_create_engine_session __pyx_mstate_global->__pyx_n_s_create_engine_session
#define __pyx_n_s_cumprod __pyx_mstate_global->__pyx_n_s_cumprod
#define __pyx_n_s_cumprod_change_ratio __pyx_mstate_global->__pyx_n_s_cumprod_change_ratio
#define __pyx_n_s_cumulative_product __pyx_mstate_global->__pyx_n_s_cumulative_product
#define __pyx_n_s_current_date __pyx_mstate_global->__pyx_n_s_current_date
#define __pyx_n_s_current_price __pyx_mstate_global->__pyx_n_s_current_price
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_dataManagement __pyx_mstate_global->__pyx_n_s_dataManagement
#define __pyx_n_s_dataMax __pyx_mstate_global->__pyx_n_s_dataMax
#define __pyx_n_s_dataMin __pyx_mstate_global->__pyx_n_s_dataMin
#define __pyx_n_s_dataPreprocess __pyx_mstate_global->__pyx_n_s_dataPreprocess
#define __pyx_n_s_data_list __pyx_mstate_global->__pyx_n_s_data_list
#define __pyx_kp_s_data_must_be_a_dictionary __pyx_mstate_global->__pyx_kp_s_data_must_be_a_dictionary
#define __pyx_n_s_data_simple_info_df __pyx_mstate_global->__pyx_n_s_data_simple_info_df
#define __pyx_n_s_data_table __pyx_mstate_global->__pyx_n_s_data_table
#define __pyx_n_s_dataproc __pyx_mstate_global->__pyx_n_s_dataproc
#define __pyx_n_s_datas __pyx_mstate_global->__pyx_n_s_datas
#define __pyx_n_s_datazoom_opts __pyx_mstate_global->__pyx_n_s_datazoom_opts
#define __pyx_n_s_date __pyx_mstate_global->__pyx_n_s_date
#define __pyx_n_s_date_end __pyx_mstate_global->__pyx_n_s_date_end
#define __pyx_n_s_date_list __pyx_mstate_global->__pyx_n_s_date_list
#define __pyx_n_s_date_start __pyx_mstate_global->__pyx_n_s_date_start
#define __pyx_n_s_date_str __pyx_mstate_global->__pyx_n_s_date_str
#define __pyx_n_s_date_to_session __pyx_mstate_global->__pyx_n_s_date_to_session
#define __pyx_n_s_datetime __pyx_mstate_global->__pyx_n_s_datetime
#define __pyx_kp_s_datetime64_ns __pyx_mstate_global->__pyx_kp_s_datetime64_ns
#define __pyx_n_s_datetime_str __pyx_mstate_global->__pyx_n_s_datetime_str
#define __pyx_n_s_day __pyx_mstate_global->__pyx_n_s_day
#define __pyx_n_s_day_2 __pyx_mstate_global->__pyx_n_s_day_2
#define __pyx_n_s_day_cold_dict __pyx_mstate_global->__pyx_n_s_day_cold_dict
#define __pyx_n_s_day_cold_frequency_df __pyx_mstate_global->__pyx_n_s_day_cold_frequency_df
#define __pyx_n_s_day_hot_cold_dict __pyx_mstate_global->__pyx_n_s_day_hot_cold_dict
#define __pyx_n_s_day_hot_cold_frequency_df __pyx_mstate_global->__pyx_n_s_day_hot_cold_frequency_df
#define __pyx_n_s_day_hot_cold_frequency_dict __pyx_mstate_global->__pyx_n_s_day_hot_cold_frequency_dict
#define __pyx_n_s_day_hot_dict __pyx_mstate_global->__pyx_n_s_day_hot_dict
#define __pyx_n_s_day_hot_frequency_df __pyx_mstate_global->__pyx_n_s_day_hot_frequency_df
#define __pyx_kp_u_day_info_firstly __pyx_mstate_global->__pyx_kp_u_day_info_firstly
#define __pyx_n_s_day_len __pyx_mstate_global->__pyx_n_s_day_len
#define __pyx_n_s_day_levels __pyx_mstate_global->__pyx_n_s_day_levels
#define __pyx_n_s_deas __pyx_mstate_global->__pyx_n_s_deas
#define __pyx_n_s_decrease_ratio __pyx_mstate_global->__pyx_n_s_decrease_ratio
#define __pyx_n_s_deepcopy __pyx_mstate_global->__pyx_n_s_deepcopy
#define __pyx_n_s_delist_stock_dict __pyx_mstate_global->__pyx_n_s_delist_stock_dict
#define __pyx_n_s_dependent_table __pyx_mstate_global->__pyx_n_s_dependent_table
#define __pyx_n_s_depth __pyx_mstate_global->__pyx_n_s_depth
#define __pyx_n_s_desc __pyx_mstate_global->__pyx_n_s_desc
#define __pyx_n_s_desc_name __pyx_mstate_global->__pyx_n_s_desc_name
#define __pyx_n_s_df __pyx_mstate_global->__pyx_n_s_df
#define __pyx_n_s_df_filtered __pyx_mstate_global->__pyx_n_s_df_filtered
#define __pyx_n_s_df_grouped __pyx_mstate_global->__pyx_n_s_df_grouped
#define __pyx_n_s_df_left __pyx_mstate_global->__pyx_n_s_df_left
#define __pyx_n_s_df_ma __pyx_mstate_global->__pyx_n_s_df_ma
#define __pyx_n_s_df_right __pyx_mstate_global->__pyx_n_s_df_right
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_n_s_difs __pyx_mstate_global->__pyx_n_s_difs
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_dispose __pyx_mstate_global->__pyx_n_s_dispose
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_n_s_down __pyx_mstate_global->__pyx_n_s_down
#define __pyx_n_s_down_num __pyx_mstate_global->__pyx_n_s_down_num
#define __pyx_n_s_down_row_index __pyx_mstate_global->__pyx_n_s_down_row_index
#define __pyx_n_s_downlimt_num __pyx_mstate_global->__pyx_n_s_downlimt_num
#define __pyx_n_s_dpi __pyx_mstate_global->__pyx_n_s_dpi
#define __pyx_n_s_drawKlineChart __pyx_mstate_global->__pyx_n_s_drawKlineChart
#define __pyx_n_s_driver __pyx_mstate_global->__pyx_n_s_driver
#define __pyx_n_s_drop __pyx_mstate_global->__pyx_n_s_drop
#define __pyx_n_s_drop_duplicates __pyx_mstate_global->__pyx_n_s_drop_duplicates
#define __pyx_n_s_dt __pyx_mstate_global->__pyx_n_s_dt
#define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
#define __pyx_n_s_dumpJsonToFile __pyx_mstate_global->__pyx_n_s_dumpJsonToFile
#define __pyx_n_s_edge __pyx_mstate_global->__pyx_n_s_edge
#define __pyx_n_s_edge_driver_path __pyx_mstate_global->__pyx_n_s_edge_driver_path
#define __pyx_kp_s_ef232a __pyx_mstate_global->__pyx_kp_s_ef232a
#define __pyx_n_s_ema __pyx_mstate_global->__pyx_n_s_ema
#define __pyx_n_s_ema_10 __pyx_mstate_global->__pyx_n_s_ema_10
#define __pyx_n_s_ema_20 __pyx_mstate_global->__pyx_n_s_ema_20
#define __pyx_n_s_ema_30 __pyx_mstate_global->__pyx_n_s_ema_30
#define __pyx_n_s_ema_5 __pyx_mstate_global->__pyx_n_s_ema_5
#define __pyx_n_s_ema_60 __pyx_mstate_global->__pyx_n_s_ema_60
#define __pyx_n_s_ema_df __pyx_mstate_global->__pyx_n_s_ema_df
#define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
#define __pyx_n_s_end1 __pyx_mstate_global->__pyx_n_s_end1
#define __pyx_n_s_end5 __pyx_mstate_global->__pyx_n_s_end5
#define __pyx_n_s_end_date __pyx_mstate_global->__pyx_n_s_end_date
#define __pyx_n_s_engine __pyx_mstate_global->__pyx_n_s_engine
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
#define __pyx_n_s_exclude_codes __pyx_mstate_global->__pyx_n_s_exclude_codes
#define __pyx_n_s_exclude_concepts __pyx_mstate_global->__pyx_n_s_exclude_concepts
#define __pyx_n_s_exclude_indexes __pyx_mstate_global->__pyx_n_s_exclude_indexes
#define __pyx_n_s_executable_path __pyx_mstate_global->__pyx_n_s_executable_path
#define __pyx_n_s_executor __pyx_mstate_global->__pyx_n_s_executor
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_f_code __pyx_mstate_global->__pyx_n_s_f_code
#define __pyx_n_s_facecolor __pyx_mstate_global->__pyx_n_s_facecolor
#define __pyx_kp_u_failed_to_getStockTradeDayInfoF __pyx_mstate_global->__pyx_kp_u_failed_to_getStockTradeDayInfoF
#define __pyx_kp_u_failed_to_getStockTradeDayInfoF_2 __pyx_mstate_global->__pyx_kp_u_failed_to_getStockTradeDayInfoF_2
#define __pyx_kp_u_failed_to_getStockTradeDayInfoS __pyx_mstate_global->__pyx_kp_u_failed_to_getStockTradeDayInfoS
#define __pyx_n_s_family __pyx_mstate_global->__pyx_n_s_family
#define __pyx_n_s_fastk_period __pyx_mstate_global->__pyx_n_s_fastk_period
#define __pyx_n_s_fastperiod __pyx_mstate_global->__pyx_n_s_fastperiod
#define __pyx_kp_s_ffffff __pyx_mstate_global->__pyx_kp_s_ffffff
#define __pyx_n_s_fig __pyx_mstate_global->__pyx_n_s_fig
#define __pyx_n_s_fig_bar __pyx_mstate_global->__pyx_n_s_fig_bar
#define __pyx_n_s_figcolor __pyx_mstate_global->__pyx_n_s_figcolor
#define __pyx_n_s_figsize __pyx_mstate_global->__pyx_n_s_figsize
#define __pyx_n_s_figure __pyx_mstate_global->__pyx_n_s_figure
#define __pyx_n_s_figure_save_name __pyx_mstate_global->__pyx_n_s_figure_save_name
#define __pyx_n_s_figure_title __pyx_mstate_global->__pyx_n_s_figure_title
#define __pyx_n_s_figured __pyx_mstate_global->__pyx_n_s_figured
#define __pyx_n_s_file_extension __pyx_mstate_global->__pyx_n_s_file_extension
#define __pyx_n_s_file_name __pyx_mstate_global->__pyx_n_s_file_name
#define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
#define __pyx_n_s_fillna __pyx_mstate_global->__pyx_n_s_fillna
#define __pyx_n_s_filter __pyx_mstate_global->__pyx_n_s_filter
#define __pyx_n_s_filter_dict __pyx_mstate_global->__pyx_n_s_filter_dict
#define __pyx_n_s_filter_dict_item __pyx_mstate_global->__pyx_n_s_filter_dict_item
#define __pyx_kp_s_filter_dict_report_date_should_b __pyx_mstate_global->__pyx_kp_s_filter_dict_report_date_should_b
#define __pyx_kp_s_filter_dict_report_date_should_n __pyx_mstate_global->__pyx_kp_s_filter_dict_report_date_should_n
#define __pyx_n_s_filter_list __pyx_mstate_global->__pyx_n_s_filter_list
#define __pyx_n_s_financialStockStrategy __pyx_mstate_global->__pyx_n_s_financialStockStrategy
#define __pyx_kp_s_financialStockStrategy___init __pyx_mstate_global->__pyx_kp_s_financialStockStrategy___init
#define __pyx_n_s_financialStockStrategy_getStockB __pyx_mstate_global->__pyx_n_s_financialStockStrategy_getStockB
#define __pyx_n_s_financialStockStrategy_getStockM __pyx_mstate_global->__pyx_n_s_financialStockStrategy_getStockM
#define __pyx_n_s_financial_mode __pyx_mstate_global->__pyx_n_s_financial_mode
#define __pyx_n_s_financial_quarter_selection __pyx_mstate_global->__pyx_n_s_financial_quarter_selection
#define __pyx_n_s_financial_report_selection __pyx_mstate_global->__pyx_n_s_financial_report_selection
#define __pyx_n_s_first __pyx_mstate_global->__pyx_n_s_first
#define __pyx_n_s_first_uplimit_num __pyx_mstate_global->__pyx_n_s_first_uplimit_num
#define __pyx_n_s_first_use_date __pyx_mstate_global->__pyx_n_s_first_use_date
#define __pyx_kp_u_firstly __pyx_mstate_global->__pyx_kp_u_firstly
#define __pyx_n_s_floor __pyx_mstate_global->__pyx_n_s_floor
#define __pyx_n_s_font __pyx_mstate_global->__pyx_n_s_font
#define __pyx_n_s_fontsize __pyx_mstate_global->__pyx_n_s_fontsize
#define __pyx_n_s_foot_size __pyx_mstate_global->__pyx_n_s_foot_size
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_formatter __pyx_mstate_global->__pyx_n_s_formatter
#define __pyx_n_s_fun_driver __pyx_mstate_global->__pyx_n_s_fun_driver
#define __pyx_n_s_fun_name __pyx_mstate_global->__pyx_n_s_fun_name
#define __pyx_kp_s_function_params_if_params_dataI __pyx_mstate_global->__pyx_kp_s_function_params_if_params_dataI
#define __pyx_kp_s_function_params_var_colorList_i __pyx_mstate_global->__pyx_kp_s_function_params_var_colorList_i
#define __pyx_kp_s_function_params_var_colorList_i_2 __pyx_mstate_global->__pyx_kp_s_function_params_var_colorList_i_2
#define __pyx_n_s_fundamentalStockStrategy __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy
#define __pyx_kp_s_fundamentalStockStrategy___init __pyx_mstate_global->__pyx_kp_s_fundamentalStockStrategy___init
#define __pyx_n_s_fundamentalStockStrategy_getSing __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_getSing
#define __pyx_n_s_fundamentalStockStrategy_selectB __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB
#define __pyx_n_s_fundamentalStockStrategy_selectB_10 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_10
#define __pyx_n_s_fundamentalStockStrategy_selectB_11 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_11
#define __pyx_n_s_fundamentalStockStrategy_selectB_12 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_12
#define __pyx_n_s_fundamentalStockStrategy_selectB_2 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_2
#define __pyx_n_s_fundamentalStockStrategy_selectB_3 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_3
#define __pyx_n_s_fundamentalStockStrategy_selectB_4 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_4
#define __pyx_n_s_fundamentalStockStrategy_selectB_5 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_5
#define __pyx_n_s_fundamentalStockStrategy_selectB_6 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_6
#define __pyx_n_s_fundamentalStockStrategy_selectB_7 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_7
#define __pyx_n_s_fundamentalStockStrategy_selectB_8 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_8
#define __pyx_n_s_fundamentalStockStrategy_selectB_9 __pyx_mstate_global->__pyx_n_s_fundamentalStockStrategy_selectB_9
#define __pyx_n_s_future __pyx_mstate_global->__pyx_n_s_future
#define __pyx_n_s_future_trade_day __pyx_mstate_global->__pyx_n_s_future_trade_day
#define __pyx_n_s_futures __pyx_mstate_global->__pyx_n_s_futures
#define __pyx_n_s_g __pyx_mstate_global->__pyx_n_s_g
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_getAllDelistStock __pyx_mstate_global->__pyx_n_s_getAllDelistStock
#define __pyx_n_s_getAllHighAmountStock __pyx_mstate_global->__pyx_n_s_getAllHighAmountStock
#define __pyx_n_s_getAllNewStock __pyx_mstate_global->__pyx_n_s_getAllNewStock
#define __pyx_n_s_getAllStStock __pyx_mstate_global->__pyx_n_s_getAllStStock
#define __pyx_n_s_getAreaStockCodes __pyx_mstate_global->__pyx_n_s_getAreaStockCodes
#define __pyx_n_s_getConceptHotTable __pyx_mstate_global->__pyx_n_s_getConceptHotTable
#define __pyx_n_s_getConceptStockCodes __pyx_mstate_global->__pyx_n_s_getConceptStockCodes
#define __pyx_n_s_getFutureHotTable __pyx_mstate_global->__pyx_n_s_getFutureHotTable
#define __pyx_n_s_getIndexHotTable __pyx_mstate_global->__pyx_n_s_getIndexHotTable
#define __pyx_n_s_getIndustryConceptHotFrequency __pyx_mstate_global->__pyx_n_s_getIndustryConceptHotFrequency
#define __pyx_n_s_getIndustryHotTable __pyx_mstate_global->__pyx_n_s_getIndustryHotTable
#define __pyx_n_s_getIndustryStockCodes __pyx_mstate_global->__pyx_n_s_getIndustryStockCodes
#define __pyx_n_s_getNameByTableCode __pyx_mstate_global->__pyx_n_s_getNameByTableCode
#define __pyx_n_s_getOneWaveRatio __pyx_mstate_global->__pyx_n_s_getOneWaveRatio
#define __pyx_n_s_getPotentialConceptStock __pyx_mstate_global->__pyx_n_s_getPotentialConceptStock
#define __pyx_n_s_getPotentialIndustryStock __pyx_mstate_global->__pyx_n_s_getPotentialIndustryStock
#define __pyx_n_s_getPotentialLimitUpStockNearDay __pyx_mstate_global->__pyx_n_s_getPotentialLimitUpStockNearDay
#define __pyx_n_s_getSingleStockPriceQuantile __pyx_mstate_global->__pyx_n_s_getSingleStockPriceQuantile
#define __pyx_n_s_getSingleStockWavePriceRatio __pyx_mstate_global->__pyx_n_s_getSingleStockWavePriceRatio
#define __pyx_kp_u_getSingleStockWavePriceRatio_tim __pyx_mstate_global->__pyx_kp_u_getSingleStockWavePriceRatio_tim
#define __pyx_n_s_getStockByFinancialData __pyx_mstate_global->__pyx_n_s_getStockByFinancialData
#define __pyx_n_s_getStockByTechIndicator __pyx_mstate_global->__pyx_n_s_getStockByTechIndicator
#define __pyx_n_s_getStockHoldNumberChangeTable __pyx_mstate_global->__pyx_n_s_getStockHoldNumberChangeTable
#define __pyx_n_s_getStockHotTable __pyx_mstate_global->__pyx_n_s_getStockHotTable
#define __pyx_n_s_getStockLadder __pyx_mstate_global->__pyx_n_s_getStockLadder
#define __pyx_n_s_getStockLadderTable __pyx_mstate_global->__pyx_n_s_getStockLadderTable
#define __pyx_n_s_getStockLimitUp __pyx_mstate_global->__pyx_n_s_getStockLimitUp
#define __pyx_n_s_getStockMultiFinancialData __pyx_mstate_global->__pyx_n_s_getStockMultiFinancialData
#define __pyx_kp_u_getStockMultiFinancialData_quart __pyx_mstate_global->__pyx_kp_u_getStockMultiFinancialData_quart
#define __pyx_n_s_getStockNameByCode __pyx_mstate_global->__pyx_n_s_getStockNameByCode
#define __pyx_n_s_getStockProperty __pyx_mstate_global->__pyx_n_s_getStockProperty
#define __pyx_n_s_getStockProperty_2 __pyx_mstate_global->__pyx_n_s_getStockProperty_2
#define __pyx_n_s_getStockSimpleInfo __pyx_mstate_global->__pyx_n_s_getStockSimpleInfo
#define __pyx_n_s_getStockTradeDayInfoFq __pyx_mstate_global->__pyx_n_s_getStockTradeDayInfoFq
#define __pyx_n_s_getStockTradeDayInfoSqlalchemy __pyx_mstate_global->__pyx_n_s_getStockTradeDayInfoSqlalchemy
#define __pyx_n_s_getStockWavePriceRatio __pyx_mstate_global->__pyx_n_s_getStockWavePriceRatio
#define __pyx_n_s_getStrategyDataAndImg __pyx_mstate_global->__pyx_n_s_getStrategyDataAndImg
#define __pyx_n_s_getStrategyDataAndImg_new __pyx_mstate_global->__pyx_n_s_getStrategyDataAndImg_new
#define __pyx_n_s_getSuspendedStocks __pyx_mstate_global->__pyx_n_s_getSuspendedStocks
#define __pyx_n_s_getTradeDayChangeRankBetweenDate __pyx_mstate_global->__pyx_n_s_getTradeDayChangeRankBetweenDate
#define __pyx_n_s_getTradeDistributionTable __pyx_mstate_global->__pyx_n_s_getTradeDistributionTable
#define __pyx_n_s_getWebDriver __pyx_mstate_global->__pyx_n_s_getWebDriver
#define __pyx_n_s_getYearStartEndDate __pyx_mstate_global->__pyx_n_s_getYearStartEndDate
#define __pyx_n_s_get_Item __pyx_mstate_global->__pyx_n_s_get_Item
#define __pyx_n_s_get_facecolor __pyx_mstate_global->__pyx_n_s_get_facecolor
#define __pyx_n_s_getframe __pyx_mstate_global->__pyx_n_s_getframe
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_grid_chart __pyx_mstate_global->__pyx_n_s_grid_chart
#define __pyx_n_s_grid_index __pyx_mstate_global->__pyx_n_s_grid_index
#define __pyx_n_s_grid_opts __pyx_mstate_global->__pyx_n_s_grid_opts
#define __pyx_n_s_gridcolor __pyx_mstate_global->__pyx_n_s_gridcolor
#define __pyx_n_s_gross_profit_ratio __pyx_mstate_global->__pyx_n_s_gross_profit_ratio
#define __pyx_n_s_group __pyx_mstate_global->__pyx_n_s_group
#define __pyx_n_s_group_column __pyx_mstate_global->__pyx_n_s_group_column
#define __pyx_n_s_group_keys __pyx_mstate_global->__pyx_n_s_group_keys
#define __pyx_n_s_groupby __pyx_mstate_global->__pyx_n_s_groupby
#define __pyx_n_s_grouped_df __pyx_mstate_global->__pyx_n_s_grouped_df
#define __pyx_n_s_ha __pyx_mstate_global->__pyx_n_s_ha
#define __pyx_n_s_has_strategy_file __pyx_mstate_global->__pyx_n_s_has_strategy_file
#define __pyx_kp_u_has_suspended_at __pyx_mstate_global->__pyx_kp_u_has_suspended_at
#define __pyx_n_s_has_update_file __pyx_mstate_global->__pyx_n_s_has_update_file
#define __pyx_n_s_head __pyx_mstate_global->__pyx_n_s_head
#define __pyx_n_s_head_tail_df __pyx_mstate_global->__pyx_n_s_head_tail_df
#define __pyx_n_s_height __pyx_mstate_global->__pyx_n_s_height
#define __pyx_n_s_high __pyx_mstate_global->__pyx_n_s_high
#define __pyx_n_s_high_amount_stock_list __pyx_mstate_global->__pyx_n_s_high_amount_stock_list
#define __pyx_n_s_hit __pyx_mstate_global->__pyx_n_s_hit
#define __pyx_n_s_hold_number_decrease __pyx_mstate_global->__pyx_n_s_hold_number_decrease
#define __pyx_n_s_holder_num __pyx_mstate_global->__pyx_n_s_holder_num
#define __pyx_n_s_hot_cold_concept_table __pyx_mstate_global->__pyx_n_s_hot_cold_concept_table
#define __pyx_n_s_hot_cold_future_table __pyx_mstate_global->__pyx_n_s_hot_cold_future_table
#define __pyx_n_s_hot_cold_index_table __pyx_mstate_global->__pyx_n_s_hot_cold_index_table
#define __pyx_n_s_hot_cold_industry_table __pyx_mstate_global->__pyx_n_s_hot_cold_industry_table
#define __pyx_n_s_hot_cold_stock_table __pyx_mstate_global->__pyx_n_s_hot_cold_stock_table
#define __pyx_n_s_hot_concept_frequency __pyx_mstate_global->__pyx_n_s_hot_concept_frequency
#define __pyx_n_s_hot_concept_table __pyx_mstate_global->__pyx_n_s_hot_concept_table
#define __pyx_n_s_hot_future_table __pyx_mstate_global->__pyx_n_s_hot_future_table
#define __pyx_n_s_hot_index_table __pyx_mstate_global->__pyx_n_s_hot_index_table
#define __pyx_n_s_hot_industry_frequency __pyx_mstate_global->__pyx_n_s_hot_industry_frequency
#define __pyx_n_s_hot_industry_table __pyx_mstate_global->__pyx_n_s_hot_industry_table
#define __pyx_n_s_hot_stock_table __pyx_mstate_global->__pyx_n_s_hot_stock_table
#define __pyx_n_s_hot_table __pyx_mstate_global->__pyx_n_s_hot_table
#define __pyx_n_s_hot_table_day __pyx_mstate_global->__pyx_n_s_hot_table_day
#define __pyx_n_s_hot_table_day_name __pyx_mstate_global->__pyx_n_s_hot_table_day_name
#define __pyx_n_s_hot_table_month __pyx_mstate_global->__pyx_n_s_hot_table_month
#define __pyx_n_s_hot_table_month_name __pyx_mstate_global->__pyx_n_s_hot_table_month_name
#define __pyx_n_s_hot_table_near_day __pyx_mstate_global->__pyx_n_s_hot_table_near_day
#define __pyx_n_s_hot_table_week __pyx_mstate_global->__pyx_n_s_hot_table_week
#define __pyx_n_s_hot_table_week_name __pyx_mstate_global->__pyx_n_s_hot_table_week_name
#define __pyx_n_s_hot_table_year __pyx_mstate_global->__pyx_n_s_hot_table_year
#define __pyx_n_s_hot_table_year_name __pyx_mstate_global->__pyx_n_s_hot_table_year_name
#define __pyx_n_s_how __pyx_mstate_global->__pyx_n_s_how
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
#define __pyx_n_s_idxmax __pyx_mstate_global->__pyx_n_s_idxmax
#define __pyx_n_s_idxmin __pyx_mstate_global->__pyx_n_s_idxmin
#define __pyx_n_s_ignore_index __pyx_mstate_global->__pyx_n_s_ignore_index
#define __pyx_n_s_iloc __pyx_mstate_global->__pyx_n_s_iloc
#define __pyx_n_s_image __pyx_mstate_global->__pyx_n_s_image
#define __pyx_n_s_img_save_path_root __pyx_mstate_global->__pyx_n_s_img_save_path_root
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_kp_u_in __pyx_mstate_global->__pyx_kp_u_in
#define __pyx_n_s_include_groups __pyx_mstate_global->__pyx_n_s_include_groups
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_index_left __pyx_mstate_global->__pyx_n_s_index_left
#define __pyx_n_s_index_list __pyx_mstate_global->__pyx_n_s_index_list
#define __pyx_n_s_index_right __pyx_mstate_global->__pyx_n_s_index_right
#define __pyx_n_s_index_trade_day __pyx_mstate_global->__pyx_n_s_index_trade_day
#define __pyx_n_s_industry __pyx_mstate_global->__pyx_n_s_industry
#define __pyx_n_s_industry_list __pyx_mstate_global->__pyx_n_s_industry_list
#define __pyx_n_s_industry_stock_list __pyx_mstate_global->__pyx_n_s_industry_stock_list
#define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
#define __pyx_n_s_inherit __pyx_mstate_global->__pyx_n_s_inherit
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_init_opts __pyx_mstate_global->__pyx_n_s_init_opts
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_inner __pyx_mstate_global->__pyx_n_s_inner
#define __pyx_n_s_inplace __pyx_mstate_global->__pyx_n_s_inplace
#define __pyx_n_s_input_codes __pyx_mstate_global->__pyx_n_s_input_codes
#define __pyx_n_s_insert __pyx_mstate_global->__pyx_n_s_insert
#define __pyx_n_s_inside __pyx_mstate_global->__pyx_n_s_inside
#define __pyx_n_s_int __pyx_mstate_global->__pyx_n_s_int
#define __pyx_kp_s_int_dict __pyx_mstate_global->__pyx_kp_s_int_dict
#define __pyx_n_s_intersect_stock_list __pyx_mstate_global->__pyx_n_s_intersect_stock_list
#define __pyx_kp_u_intersect_stock_list_is_empty __pyx_mstate_global->__pyx_kp_u_intersect_stock_list_is_empty
#define __pyx_n_s_intersection_list __pyx_mstate_global->__pyx_n_s_intersection_list
#define __pyx_n_s_interval __pyx_mstate_global->__pyx_n_s_interval
#define __pyx_n_s_isDelistStock __pyx_mstate_global->__pyx_n_s_isDelistStock
#define __pyx_n_s_isDownLimit __pyx_mstate_global->__pyx_n_s_isDownLimit
#define __pyx_n_s_isLowAmountStock __pyx_mstate_global->__pyx_n_s_isLowAmountStock
#define __pyx_n_s_isMonthLastTradeDay __pyx_mstate_global->__pyx_n_s_isMonthLastTradeDay
#define __pyx_n_s_isNewStock __pyx_mstate_global->__pyx_n_s_isNewStock
#define __pyx_n_s_isStStock __pyx_mstate_global->__pyx_n_s_isStStock
#define __pyx_n_s_isUpLimit __pyx_mstate_global->__pyx_n_s_isUpLimit
#define __pyx_n_s_isWeekLastTradeDay __pyx_mstate_global->__pyx_n_s_isWeekLastTradeDay
#define __pyx_n_s_isYearLastTradeDay __pyx_mstate_global->__pyx_n_s_isYearLastTradeDay
#define __pyx_n_s_is_code __pyx_mstate_global->__pyx_n_s_is_code
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_is_delist __pyx_mstate_global->__pyx_n_s_is_delist
#define __pyx_n_s_is_down_limit __pyx_mstate_global->__pyx_n_s_is_down_limit
#define __pyx_n_s_is_fill_bg_color __pyx_mstate_global->__pyx_n_s_is_fill_bg_color
#define __pyx_n_s_is_get_max_level __pyx_mstate_global->__pyx_n_s_is_get_max_level
#define __pyx_n_s_is_month_last __pyx_mstate_global->__pyx_n_s_is_month_last
#define __pyx_n_s_is_on_zero __pyx_mstate_global->__pyx_n_s_is_on_zero
#define __pyx_n_s_is_scale __pyx_mstate_global->__pyx_n_s_is_scale
#define __pyx_n_s_is_session __pyx_mstate_global->__pyx_n_s_is_session
#define __pyx_n_s_is_show __pyx_mstate_global->__pyx_n_s_is_show
#define __pyx_n_s_is_smooth __pyx_mstate_global->__pyx_n_s_is_smooth
#define __pyx_n_s_is_st __pyx_mstate_global->__pyx_n_s_is_st
#define __pyx_n_s_is_up_limit __pyx_mstate_global->__pyx_n_s_is_up_limit
#define __pyx_n_s_is_week_last __pyx_mstate_global->__pyx_n_s_is_week_last
#define __pyx_n_s_is_year_last __pyx_mstate_global->__pyx_n_s_is_year_last
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_isin __pyx_mstate_global->__pyx_n_s_isin
#define __pyx_n_s_item_down __pyx_mstate_global->__pyx_n_s_item_down
#define __pyx_n_s_item_up __pyx_mstate_global->__pyx_n_s_item_up
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_itemstyle_opts __pyx_mstate_global->__pyx_n_s_itemstyle_opts
#define __pyx_n_s_iterrows __pyx_mstate_global->__pyx_n_s_iterrows
#define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_json_file_name __pyx_mstate_global->__pyx_n_s_json_file_name
#define __pyx_n_s_judgeSingleStockByTechIndicator __pyx_mstate_global->__pyx_n_s_judgeSingleStockByTechIndicator
#define __pyx_n_s_keep __pyx_mstate_global->__pyx_n_s_keep
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_s_key_day __pyx_mstate_global->__pyx_n_s_key_day
#define __pyx_n_s_key_list __pyx_mstate_global->__pyx_n_s_key_list
#define __pyx_n_s_key_name __pyx_mstate_global->__pyx_n_s_key_name
#define __pyx_n_s_key_pandas __pyx_mstate_global->__pyx_n_s_key_pandas
#define __pyx_n_s_key_products __pyx_mstate_global->__pyx_n_s_key_products
#define __pyx_n_s_key_time __pyx_mstate_global->__pyx_n_s_key_time
#define __pyx_n_s_key_word __pyx_mstate_global->__pyx_n_s_key_word
#define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
#define __pyx_n_s_kf_net_profit_tb __pyx_mstate_global->__pyx_n_s_kf_net_profit_tb
#define __pyx_n_s_kline __pyx_mstate_global->__pyx_n_s_kline
#define __pyx_kp_u_kline_html __pyx_mstate_global->__pyx_kp_u_kline_html
#define __pyx_n_s_kline_line __pyx_mstate_global->__pyx_n_s_kline_line
#define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
#define __pyx_n_s_label_opts __pyx_mstate_global->__pyx_n_s_label_opts
#define __pyx_n_s_ladder_max __pyx_mstate_global->__pyx_n_s_ladder_max
#define __pyx_n_s_last_five_dict __pyx_mstate_global->__pyx_n_s_last_five_dict
#define __pyx_n_s_last_five_items __pyx_mstate_global->__pyx_n_s_last_five_items
#define __pyx_n_s_latest_trade_day __pyx_mstate_global->__pyx_n_s_latest_trade_day
#define __pyx_n_s_left_index __pyx_mstate_global->__pyx_n_s_left_index
#define __pyx_n_s_legend_opts __pyx_mstate_global->__pyx_n_s_legend_opts
#define __pyx_n_s_level __pyx_mstate_global->__pyx_n_s_level
#define __pyx_n_s_level_code_list __pyx_mstate_global->__pyx_n_s_level_code_list
#define __pyx_n_s_limit_up_code_list __pyx_mstate_global->__pyx_n_s_limit_up_code_list
#define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line
#define __pyx_n_s_line_2 __pyx_mstate_global->__pyx_n_s_line_2
#define __pyx_n_s_linestyle_opts __pyx_mstate_global->__pyx_n_s_linestyle_opts
#define __pyx_n_s_list __pyx_mstate_global->__pyx_n_s_list
#define __pyx_n_s_listIntersection __pyx_mstate_global->__pyx_n_s_listIntersection
#define __pyx_n_s_listUnion __pyx_mstate_global->__pyx_n_s_listUnion
#define __pyx_n_s_list_2_dict __pyx_mstate_global->__pyx_n_s_list_2_dict
#define __pyx_n_s_list_item __pyx_mstate_global->__pyx_n_s_list_item
#define __pyx_n_s_loadJsonData __pyx_mstate_global->__pyx_n_s_loadJsonData
#define __pyx_n_s_loadTable __pyx_mstate_global->__pyx_n_s_loadTable
#define __pyx_n_s_loadTableContentByDate __pyx_mstate_global->__pyx_n_s_loadTableContentByDate
#define __pyx_n_s_load_json_file __pyx_mstate_global->__pyx_n_s_load_json_file
#define __pyx_kp_s_load_json_file_2 __pyx_mstate_global->__pyx_kp_s_load_json_file_2
#define __pyx_n_s_loc __pyx_mstate_global->__pyx_n_s_loc
#define __pyx_n_s_lock_time __pyx_mstate_global->__pyx_n_s_lock_time
#define __pyx_n_s_logger __pyx_mstate_global->__pyx_n_s_logger
#define __pyx_n_s_low __pyx_mstate_global->__pyx_n_s_low
#define __pyx_n_s_ma __pyx_mstate_global->__pyx_n_s_ma
#define __pyx_n_s_ma_10 __pyx_mstate_global->__pyx_n_s_ma_10
#define __pyx_n_s_ma_20 __pyx_mstate_global->__pyx_n_s_ma_20
#define __pyx_n_s_ma_30 __pyx_mstate_global->__pyx_n_s_ma_30
#define __pyx_n_s_ma_5 __pyx_mstate_global->__pyx_n_s_ma_5
#define __pyx_n_s_ma_60 __pyx_mstate_global->__pyx_n_s_ma_60
#define __pyx_n_s_ma_column __pyx_mstate_global->__pyx_n_s_ma_column
#define __pyx_n_s_ma_name __pyx_mstate_global->__pyx_n_s_ma_name
#define __pyx_n_s_ma_time __pyx_mstate_global->__pyx_n_s_ma_time
#define __pyx_n_s_ma_time_list __pyx_mstate_global->__pyx_n_s_ma_time_list
#define __pyx_n_s_macd __pyx_mstate_global->__pyx_n_s_macd
#define __pyx_n_s_macd_df __pyx_mstate_global->__pyx_n_s_macd_df
#define __pyx_n_s_macdhist __pyx_mstate_global->__pyx_n_s_macdhist
#define __pyx_n_s_macds __pyx_mstate_global->__pyx_n_s_macds
#define __pyx_n_s_macdsignal __pyx_mstate_global->__pyx_n_s_macdsignal
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_main_business __pyx_mstate_global->__pyx_n_s_main_business
#define __pyx_n_s_make_marketcolors __pyx_mstate_global->__pyx_n_s_make_marketcolors
#define __pyx_n_s_make_mpf_style __pyx_mstate_global->__pyx_n_s_make_mpf_style
#define __pyx_n_s_make_snapshot __pyx_mstate_global->__pyx_n_s_make_snapshot
#define __pyx_n_s_map __pyx_mstate_global->__pyx_n_s_map
#define __pyx_n_s_marker_stock_list __pyx_mstate_global->__pyx_n_s_marker_stock_list
#define __pyx_n_s_market __pyx_mstate_global->__pyx_n_s_market
#define __pyx_n_s_market_cap __pyx_mstate_global->__pyx_n_s_market_cap
#define __pyx_n_s_market_type __pyx_mstate_global->__pyx_n_s_market_type
#define __pyx_n_s_marketcolors __pyx_mstate_global->__pyx_n_s_marketcolors
#define __pyx_n_s_markpoint_opts __pyx_mstate_global->__pyx_n_s_markpoint_opts
#define __pyx_n_s_math __pyx_mstate_global->__pyx_n_s_math
#define __pyx_n_s_matplotlib __pyx_mstate_global->__pyx_n_s_matplotlib
#define __pyx_n_s_matplotlib_pyplot __pyx_mstate_global->__pyx_n_s_matplotlib_pyplot
#define __pyx_n_s_matype __pyx_mstate_global->__pyx_n_s_matype
#define __pyx_n_s_mav __pyx_mstate_global->__pyx_n_s_mav
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_max_2 __pyx_mstate_global->__pyx_n_s_max_2
#define __pyx_n_s_max_depth __pyx_mstate_global->__pyx_n_s_max_depth
#define __pyx_n_s_max_item_down __pyx_mstate_global->__pyx_n_s_max_item_down
#define __pyx_n_s_max_item_up __pyx_mstate_global->__pyx_n_s_max_item_up
#define __pyx_n_s_max_level __pyx_mstate_global->__pyx_n_s_max_level
#define __pyx_n_s_max_price __pyx_mstate_global->__pyx_n_s_max_price
#define __pyx_n_s_max_price_date __pyx_mstate_global->__pyx_n_s_max_price_date
#define __pyx_n_s_max_price_index __pyx_mstate_global->__pyx_n_s_max_price_index
#define __pyx_n_s_max_rows __pyx_mstate_global->__pyx_n_s_max_rows
#define __pyx_n_s_max_workers __pyx_mstate_global->__pyx_n_s_max_workers
#define __pyx_n_s_mean __pyx_mstate_global->__pyx_n_s_mean
#define __pyx_n_s_merge __pyx_mstate_global->__pyx_n_s_merge
#define __pyx_n_s_merged_df __pyx_mstate_global->__pyx_n_s_merged_df
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_min __pyx_mstate_global->__pyx_n_s_min
#define __pyx_n_s_min_2 __pyx_mstate_global->__pyx_n_s_min_2
#define __pyx_n_s_min_price __pyx_mstate_global->__pyx_n_s_min_price
#define __pyx_n_s_min_price_date __pyx_mstate_global->__pyx_n_s_min_price_date
#define __pyx_n_s_min_price_index __pyx_mstate_global->__pyx_n_s_min_price_index
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_kp_s_mode_must_switch_in_industry_con __pyx_mstate_global->__pyx_kp_s_mode_must_switch_in_industry_con
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_month __pyx_mstate_global->__pyx_n_s_month
#define __pyx_n_s_month_2 __pyx_mstate_global->__pyx_n_s_month_2
#define __pyx_n_s_month_levels __pyx_mstate_global->__pyx_n_s_month_levels
#define __pyx_n_s_mpf __pyx_mstate_global->__pyx_n_s_mpf
#define __pyx_n_s_mplfinance __pyx_mstate_global->__pyx_n_s_mplfinance
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_multi_thread __pyx_mstate_global->__pyx_n_s_multi_thread
#define __pyx_n_s_multi_type __pyx_mstate_global->__pyx_n_s_multi_type
#define __pyx_kp_u_multi_type_parameter_set_wrong __pyx_mstate_global->__pyx_kp_u_multi_type_parameter_set_wrong
#define __pyx_n_s_my_color __pyx_mstate_global->__pyx_n_s_my_color
#define __pyx_n_s_my_dataproc __pyx_mstate_global->__pyx_n_s_my_dataproc
#define __pyx_n_s_my_dict __pyx_mstate_global->__pyx_n_s_my_dict
#define __pyx_n_s_my_method __pyx_mstate_global->__pyx_n_s_my_method
#define __pyx_n_s_my_plot __pyx_mstate_global->__pyx_n_s_my_plot
#define __pyx_n_s_my_style __pyx_mstate_global->__pyx_n_s_my_style
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
#define __pyx_n_s_name_list __pyx_mstate_global->__pyx_n_s_name_list
#define __pyx_n_s_name_up_limit_times __pyx_mstate_global->__pyx_n_s_name_up_limit_times
#define __pyx_n_s_nbdevdn __pyx_mstate_global->__pyx_n_s_nbdevdn
#define __pyx_n_s_nbdevup __pyx_mstate_global->__pyx_n_s_nbdevup
#define __pyx_n_s_near __pyx_mstate_global->__pyx_n_s_near
#define __pyx_n_s_near_10 __pyx_mstate_global->__pyx_n_s_near_10
#define __pyx_n_s_near_2 __pyx_mstate_global->__pyx_n_s_near_2
#define __pyx_n_s_near_20 __pyx_mstate_global->__pyx_n_s_near_20
#define __pyx_n_s_near_30 __pyx_mstate_global->__pyx_n_s_near_30
#define __pyx_n_s_near_5 __pyx_mstate_global->__pyx_n_s_near_5
#define __pyx_n_s_near_60 __pyx_mstate_global->__pyx_n_s_near_60
#define __pyx_n_s_near_datetime __pyx_mstate_global->__pyx_n_s_near_datetime
#define __pyx_n_s_near_day __pyx_mstate_global->__pyx_n_s_near_day
#define __pyx_n_s_near_day_dict __pyx_mstate_global->__pyx_n_s_near_day_dict
#define __pyx_n_s_near_day_list __pyx_mstate_global->__pyx_n_s_near_day_list
#define __pyx_n_s_near_levels __pyx_mstate_global->__pyx_n_s_near_levels
#define __pyx_n_s_near_name __pyx_mstate_global->__pyx_n_s_near_name
#define __pyx_n_s_near_num __pyx_mstate_global->__pyx_n_s_near_num
#define __pyx_n_s_need_database_tables __pyx_mstate_global->__pyx_n_s_need_database_tables
#define __pyx_n_s_negative_infinity __pyx_mstate_global->__pyx_n_s_negative_infinity
#define __pyx_n_s_new_base_list __pyx_mstate_global->__pyx_n_s_new_base_list
#define __pyx_n_s_new_date __pyx_mstate_global->__pyx_n_s_new_date
#define __pyx_n_s_new_date_len __pyx_mstate_global->__pyx_n_s_new_date_len
#define __pyx_n_s_new_datetime_threshold __pyx_mstate_global->__pyx_n_s_new_datetime_threshold
#define __pyx_n_s_new_df __pyx_mstate_global->__pyx_n_s_new_df
#define __pyx_n_s_new_dict __pyx_mstate_global->__pyx_n_s_new_dict
#define __pyx_kp_s_new_end_date __pyx_mstate_global->__pyx_kp_s_new_end_date
#define __pyx_n_s_new_record __pyx_mstate_global->__pyx_n_s_new_record
#define __pyx_n_s_new_row_cold __pyx_mstate_global->__pyx_n_s_new_row_cold
#define __pyx_n_s_new_row_hot __pyx_mstate_global->__pyx_n_s_new_row_hot
#define __pyx_n_s_new_short_day_dict __pyx_mstate_global->__pyx_n_s_new_short_day_dict
#define __pyx_n_s_new_stock_dict __pyx_mstate_global->__pyx_n_s_new_stock_dict
#define __pyx_n_s_new_stock_thr_date __pyx_mstate_global->__pyx_n_s_new_stock_thr_date
#define __pyx_n_s_new_thr __pyx_mstate_global->__pyx_n_s_new_thr
#define __pyx_n_s_next_session __pyx_mstate_global->__pyx_n_s_next_session
#define __pyx_n_s_non_serializable_attrs __pyx_mstate_global->__pyx_n_s_non_serializable_attrs
#define __pyx_n_s_none __pyx_mstate_global->__pyx_n_s_none
#define __pyx_n_s_normed_cmap __pyx_mstate_global->__pyx_n_s_normed_cmap
#define __pyx_n_s_not __pyx_mstate_global->__pyx_n_s_not
#define __pyx_n_s_now_datetime __pyx_mstate_global->__pyx_n_s_now_datetime
#define __pyx_n_s_now_price __pyx_mstate_global->__pyx_n_s_now_price
#define __pyx_n_s_num_k __pyx_mstate_global->__pyx_n_s_num_k
#define __pyx_n_s_num_quantile __pyx_mstate_global->__pyx_n_s_num_quantile
#define __pyx_n_s_num_rank __pyx_mstate_global->__pyx_n_s_num_rank
#define __pyx_n_s_num_rows __pyx_mstate_global->__pyx_n_s_num_rows
#define __pyx_n_s_num_tr __pyx_mstate_global->__pyx_n_s_num_tr
#define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object
#define __pyx_n_s_objs __pyx_mstate_global->__pyx_n_s_objs
#define __pyx_n_s_opacity __pyx_mstate_global->__pyx_n_s_opacity
#define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
#define __pyx_n_s_options __pyx_mstate_global->__pyx_n_s_options
#define __pyx_n_s_opts __pyx_mstate_global->__pyx_n_s_opts
#define __pyx_n_s_or __pyx_mstate_global->__pyx_n_s_or
#define __pyx_n_s_ori_dict __pyx_mstate_global->__pyx_n_s_ori_dict
#define __pyx_n_s_origin_df __pyx_mstate_global->__pyx_n_s_origin_df
#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
#define __pyx_n_s_output_name __pyx_mstate_global->__pyx_n_s_output_name
#define __pyx_n_s_outstand_share __pyx_mstate_global->__pyx_n_s_outstand_share
#define __pyx_n_s_overlap __pyx_mstate_global->__pyx_n_s_overlap
#define __pyx_n_s_overlap_bar_line __pyx_mstate_global->__pyx_n_s_overlap_bar_line
#define __pyx_n_s_overlap_kline_line __pyx_mstate_global->__pyx_n_s_overlap_kline_line
#define __pyx_n_s_pacoSelectStrategy __pyx_mstate_global->__pyx_n_s_pacoSelectStrategy
#define __pyx_kp_s_pacoSelectStrategy___init __pyx_mstate_global->__pyx_kp_s_pacoSelectStrategy___init
#define __pyx_n_s_pacoSelectStrategy_getPotentialC __pyx_mstate_global->__pyx_n_s_pacoSelectStrategy_getPotentialC
#define __pyx_n_s_pacoSelectStrategy_getPotentialI __pyx_mstate_global->__pyx_n_s_pacoSelectStrategy_getPotentialI
#define __pyx_n_s_pacoSelectStrategy_getPotentialL __pyx_mstate_global->__pyx_n_s_pacoSelectStrategy_getPotentialL
#define __pyx_n_s_pandas __pyx_mstate_global->__pyx_n_s_pandas
#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
#define __pyx_n_s_pd __pyx_mstate_global->__pyx_n_s_pd
#define __pyx_kp_s_pd_DataFrame __pyx_mstate_global->__pyx_kp_s_pd_DataFrame
#define __pyx_kp_s_pd_DataFrame_2 __pyx_mstate_global->__pyx_kp_s_pd_DataFrame_2
#define __pyx_n_s_per_row_num __pyx_mstate_global->__pyx_n_s_per_row_num
#define __pyx_n_s_plot __pyx_mstate_global->__pyx_n_s_plot
#define __pyx_n_s_plotHoldNumberDecrease __pyx_mstate_global->__pyx_n_s_plotHoldNumberDecrease
#define __pyx_n_s_plotHotColdConceptTable __pyx_mstate_global->__pyx_n_s_plotHotColdConceptTable
#define __pyx_n_s_plotHotColdFutureTable __pyx_mstate_global->__pyx_n_s_plotHotColdFutureTable
#define __pyx_n_s_plotHotColdIndexTable __pyx_mstate_global->__pyx_n_s_plotHotColdIndexTable
#define __pyx_n_s_plotHotColdIndustryConceptFreque __pyx_mstate_global->__pyx_n_s_plotHotColdIndustryConceptFreque
#define __pyx_n_s_plotHotColdIndustryTable __pyx_mstate_global->__pyx_n_s_plotHotColdIndustryTable
#define __pyx_n_s_plotHotColdStockTable __pyx_mstate_global->__pyx_n_s_plotHotColdStockTable
#define __pyx_n_s_plotHotColdTables __pyx_mstate_global->__pyx_n_s_plotHotColdTables
#define __pyx_n_s_plotKline __pyx_mstate_global->__pyx_n_s_plotKline
#define __pyx_n_s_plotKlineMpl __pyx_mstate_global->__pyx_n_s_plotKlineMpl
#define __pyx_n_s_plotStockUplimtLadder __pyx_mstate_global->__pyx_n_s_plotStockUplimtLadder
#define __pyx_n_s_plotStrategyFigure __pyx_mstate_global->__pyx_n_s_plotStrategyFigure
#define __pyx_n_s_plotTablePandas __pyx_mstate_global->__pyx_n_s_plotTablePandas
#define __pyx_n_s_plotTop10Amplitude __pyx_mstate_global->__pyx_n_s_plotTop10Amplitude
#define __pyx_n_s_plotTop10UpLimit __pyx_mstate_global->__pyx_n_s_plotTop10UpLimit
#define __pyx_n_s_plotTradeDistributionLen __pyx_mstate_global->__pyx_n_s_plotTradeDistributionLen
#define __pyx_n_s_plotWaveDownRank __pyx_mstate_global->__pyx_n_s_plotWaveDownRank
#define __pyx_n_s_plotWaveUpRank __pyx_mstate_global->__pyx_n_s_plotWaveUpRank
#define __pyx_n_s_plot_df __pyx_mstate_global->__pyx_n_s_plot_df
#define __pyx_n_s_plottable __pyx_mstate_global->__pyx_n_s_plottable
#define __pyx_n_s_plottable_cmap __pyx_mstate_global->__pyx_n_s_plottable_cmap
#define __pyx_n_s_plt __pyx_mstate_global->__pyx_n_s_plt
#define __pyx_kp_u_png __pyx_mstate_global->__pyx_kp_u_png
#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
#define __pyx_n_s_pos_left __pyx_mstate_global->__pyx_n_s_pos_left
#define __pyx_n_s_pos_right __pyx_mstate_global->__pyx_n_s_pos_right
#define __pyx_n_s_pos_top __pyx_mstate_global->__pyx_n_s_pos_top
#define __pyx_n_s_positive_infinity __pyx_mstate_global->__pyx_n_s_positive_infinity
#define __pyx_n_s_pre_close __pyx_mstate_global->__pyx_n_s_pre_close
#define __pyx_kp_u_pre_close_equal_zero_when_date __pyx_mstate_global->__pyx_kp_u_pre_close_equal_zero_when_date
#define __pyx_n_s_pre_fig_row __pyx_mstate_global->__pyx_n_s_pre_fig_row
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_prev_date __pyx_mstate_global->__pyx_n_s_prev_date
#define __pyx_n_s_previous __pyx_mstate_global->__pyx_n_s_previous
#define __pyx_n_s_previous_session __pyx_mstate_global->__pyx_n_s_previous_session
#define __pyx_n_s_price __pyx_mstate_global->__pyx_n_s_price
#define __pyx_n_s_price_amplitude __pyx_mstate_global->__pyx_n_s_price_amplitude
#define __pyx_n_s_price_down_ratio __pyx_mstate_global->__pyx_n_s_price_down_ratio
#define __pyx_n_s_price_quantile __pyx_mstate_global->__pyx_n_s_price_quantile
#define __pyx_n_s_price_up_ratio __pyx_mstate_global->__pyx_n_s_price_up_ratio
#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
#define __pyx_n_s_process __pyx_mstate_global->__pyx_n_s_process
#define __pyx_n_s_product_name __pyx_mstate_global->__pyx_n_s_product_name
#define __pyx_n_s_publishStrategy __pyx_mstate_global->__pyx_n_s_publishStrategy
#define __pyx_kp_s_publishStrategy_2 __pyx_mstate_global->__pyx_kp_s_publishStrategy_2
#define __pyx_n_s_publishStrategy___getStockLadder __pyx_mstate_global->__pyx_n_s_publishStrategy___getStockLadder
#define __pyx_kp_s_publishStrategy___init __pyx_mstate_global->__pyx_kp_s_publishStrategy___init
#define __pyx_n_s_publishStrategy__getStockLadder __pyx_mstate_global->__pyx_n_s_publishStrategy__getStockLadder
#define __pyx_n_s_publishStrategy_getConceptHotTab __pyx_mstate_global->__pyx_n_s_publishStrategy_getConceptHotTab
#define __pyx_n_s_publishStrategy_getFutureHotTabl __pyx_mstate_global->__pyx_n_s_publishStrategy_getFutureHotTabl
#define __pyx_n_s_publishStrategy_getIndexHotTable __pyx_mstate_global->__pyx_n_s_publishStrategy_getIndexHotTable
#define __pyx_n_s_publishStrategy_getIndustryConce __pyx_mstate_global->__pyx_n_s_publishStrategy_getIndustryConce
#define __pyx_n_s_publishStrategy_getIndustryHotTa __pyx_mstate_global->__pyx_n_s_publishStrategy_getIndustryHotTa
#define __pyx_n_s_publishStrategy_getSingleStockWa __pyx_mstate_global->__pyx_n_s_publishStrategy_getSingleStockWa
#define __pyx_n_s_publishStrategy_getSingleStockWa_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getSingleStockWa_2
#define __pyx_n_s_publishStrategy_getSingleStockWa_3 __pyx_mstate_global->__pyx_n_s_publishStrategy_getSingleStockWa_3
#define __pyx_n_s_publishStrategy_getStockHoldNumb __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockHoldNumb
#define __pyx_n_s_publishStrategy_getStockHoldNumb_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockHoldNumb_2
#define __pyx_n_s_publishStrategy_getStockHotTable __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockHotTable
#define __pyx_n_s_publishStrategy_getStockLadderTa __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockLadderTa
#define __pyx_n_s_publishStrategy_getStockProperty __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockProperty
#define __pyx_n_s_publishStrategy_getStockProperty_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockProperty_2
#define __pyx_n_s_publishStrategy_getStockProperty_3 __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockProperty_3
#define __pyx_n_s_publishStrategy_getStockWavePric __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockWavePric
#define __pyx_n_s_publishStrategy_getStockWavePric_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getStockWavePric_2
#define __pyx_n_s_publishStrategy_getStrategyDataA __pyx_mstate_global->__pyx_n_s_publishStrategy_getStrategyDataA
#define __pyx_n_s_publishStrategy_getTradeDayChang __pyx_mstate_global->__pyx_n_s_publishStrategy_getTradeDayChang
#define __pyx_n_s_publishStrategy_getTradeDayChang_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getTradeDayChang_2
#define __pyx_n_s_publishStrategy_getTradeDistribu __pyx_mstate_global->__pyx_n_s_publishStrategy_getTradeDistribu
#define __pyx_n_s_publishStrategy_getTradeDistribu_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_getTradeDistribu_2
#define __pyx_n_s_publishStrategy_getTradeDistribu_3 __pyx_mstate_global->__pyx_n_s_publishStrategy_getTradeDistribu_3
#define __pyx_n_s_publishStrategy_reset __pyx_mstate_global->__pyx_n_s_publishStrategy_reset
#define __pyx_n_s_publishStrategy_stockSingleStock __pyx_mstate_global->__pyx_n_s_publishStrategy_stockSingleStock
#define __pyx_n_s_publishStrategy_stockSingleStock_2 __pyx_mstate_global->__pyx_n_s_publishStrategy_stockSingleStock_2
#define __pyx_n_s_publishStrategy_update_hot_table __pyx_mstate_global->__pyx_n_s_publishStrategy_update_hot_table
#define __pyx_n_s_publish_strategy __pyx_mstate_global->__pyx_n_s_publish_strategy
#define __pyx_n_s_pyecharts __pyx_mstate_global->__pyx_n_s_pyecharts
#define __pyx_n_s_pyecharts_charts __pyx_mstate_global->__pyx_n_s_pyecharts_charts
#define __pyx_n_s_pyecharts_commons_utils __pyx_mstate_global->__pyx_n_s_pyecharts_commons_utils
#define __pyx_n_s_pyecharts_globals __pyx_mstate_global->__pyx_n_s_pyecharts_globals
#define __pyx_n_s_pyecharts_render __pyx_mstate_global->__pyx_n_s_pyecharts_render
#define __pyx_n_s_pyplot __pyx_mstate_global->__pyx_n_s_pyplot
#define __pyx_n_s_qfq __pyx_mstate_global->__pyx_n_s_qfq
#define __pyx_n_s_qfq_up_rate __pyx_mstate_global->__pyx_n_s_qfq_up_rate
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_quantile_amplitude_tr __pyx_mstate_global->__pyx_n_s_quantile_amplitude_tr
#define __pyx_n_s_quantile_tr __pyx_mstate_global->__pyx_n_s_quantile_tr
#define __pyx_n_s_quantile_tr_max __pyx_mstate_global->__pyx_n_s_quantile_tr_max
#define __pyx_n_s_quantile_tr_min __pyx_mstate_global->__pyx_n_s_quantile_tr_min
#define __pyx_n_s_quarter __pyx_mstate_global->__pyx_n_s_quarter
#define __pyx_n_s_query __pyx_mstate_global->__pyx_n_s_query
#define __pyx_n_s_query_date __pyx_mstate_global->__pyx_n_s_query_date
#define __pyx_n_s_query_date_str __pyx_mstate_global->__pyx_n_s_query_date_str
#define __pyx_n_s_query_stock_df_dict __pyx_mstate_global->__pyx_n_s_query_stock_df_dict
#define __pyx_n_s_quit __pyx_mstate_global->__pyx_n_s_quit
#define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_range_end __pyx_mstate_global->__pyx_n_s_range_end
#define __pyx_n_s_rank_level __pyx_mstate_global->__pyx_n_s_rank_level
#define __pyx_n_s_rate_hist_dict __pyx_mstate_global->__pyx_n_s_rate_hist_dict
#define __pyx_n_s_rate_hist_dict_len __pyx_mstate_global->__pyx_n_s_rate_hist_dict_len
#define __pyx_n_s_rate_hist_list __pyx_mstate_global->__pyx_n_s_rate_hist_list
#define __pyx_n_s_ratio_limit __pyx_mstate_global->__pyx_n_s_ratio_limit
#define __pyx_n_s_rc __pyx_mstate_global->__pyx_n_s_rc
#define __pyx_n_s_rcParams __pyx_mstate_global->__pyx_n_s_rcParams
#define __pyx_n_s_read_sql __pyx_mstate_global->__pyx_n_s_read_sql
#define __pyx_n_s_rely_strategy_key_name __pyx_mstate_global->__pyx_n_s_rely_strategy_key_name
#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
#define __pyx_n_s_render __pyx_mstate_global->__pyx_n_s_render
#define __pyx_n_s_repeat_compute __pyx_mstate_global->__pyx_n_s_repeat_compute
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_report_date __pyx_mstate_global->__pyx_n_s_report_date
#define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res
#define __pyx_n_s_res_list __pyx_mstate_global->__pyx_n_s_res_list
#define __pyx_n_s_res_names __pyx_mstate_global->__pyx_n_s_res_names
#define __pyx_n_s_reset __pyx_mstate_global->__pyx_n_s_reset
#define __pyx_n_s_reset_index __pyx_mstate_global->__pyx_n_s_reset_index
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_result_df __pyx_mstate_global->__pyx_n_s_result_df
#define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret
#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return
#define __pyx_n_s_return_df __pyx_mstate_global->__pyx_n_s_return_df
#define __pyx_n_s_return_dict __pyx_mstate_global->__pyx_n_s_return_dict
#define __pyx_n_s_returnfig __pyx_mstate_global->__pyx_n_s_returnfig
#define __pyx_n_s_reverse __pyx_mstate_global->__pyx_n_s_reverse
#define __pyx_n_s_reversed __pyx_mstate_global->__pyx_n_s_reversed
#define __pyx_n_s_right_ax __pyx_mstate_global->__pyx_n_s_right_ax
#define __pyx_n_s_right_index __pyx_mstate_global->__pyx_n_s_right_index
#define __pyx_n_s_round __pyx_mstate_global->__pyx_n_s_round
#define __pyx_n_s_row __pyx_mstate_global->__pyx_n_s_row
#define __pyx_kp_u_row_inch __pyx_mstate_global->__pyx_kp_u_row_inch
#define __pyx_n_s_row_inch_2 __pyx_mstate_global->__pyx_n_s_row_inch_2
#define __pyx_n_s_row_num __pyx_mstate_global->__pyx_n_s_row_num
#define __pyx_n_s_rows __pyx_mstate_global->__pyx_n_s_rows
#define __pyx_n_s_rsi __pyx_mstate_global->__pyx_n_s_rsi
#define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s
#define __pyx_n_s_saveToImg __pyx_mstate_global->__pyx_n_s_saveToImg
#define __pyx_n_s_save_file __pyx_mstate_global->__pyx_n_s_save_file
#define __pyx_n_s_save_json __pyx_mstate_global->__pyx_n_s_save_json
#define __pyx_n_s_save_strategy __pyx_mstate_global->__pyx_n_s_save_strategy
#define __pyx_n_s_savefig __pyx_mstate_global->__pyx_n_s_savefig
#define __pyx_n_s_secondary_y __pyx_mstate_global->__pyx_n_s_secondary_y
#define __pyx_n_s_selectByArea __pyx_mstate_global->__pyx_n_s_selectByArea
#define __pyx_n_s_selectByConcept __pyx_mstate_global->__pyx_n_s_selectByConcept
#define __pyx_n_s_selectByIndustry __pyx_mstate_global->__pyx_n_s_selectByIndustry
#define __pyx_n_s_selectByKeyProduct __pyx_mstate_global->__pyx_n_s_selectByKeyProduct
#define __pyx_n_s_selectByMarket __pyx_mstate_global->__pyx_n_s_selectByMarket
#define __pyx_n_s_selectByMarketCap __pyx_mstate_global->__pyx_n_s_selectByMarketCap
#define __pyx_n_s_selectByNameWord __pyx_mstate_global->__pyx_n_s_selectByNameWord
#define __pyx_n_s_selectByStockPrice __pyx_mstate_global->__pyx_n_s_selectByStockPrice
#define __pyx_n_s_selectByStockPriceQuantile __pyx_mstate_global->__pyx_n_s_selectByStockPriceQuantile
#define __pyx_n_s_selectByTechIndicator __pyx_mstate_global->__pyx_n_s_selectByTechIndicator
#define __pyx_n_s_select_code __pyx_mstate_global->__pyx_n_s_select_code
#define __pyx_n_s_select_df __pyx_mstate_global->__pyx_n_s_select_df
#define __pyx_n_s_select_market_cap_df __pyx_mstate_global->__pyx_n_s_select_market_cap_df
#define __pyx_n_s_select_market_cap_stock_list __pyx_mstate_global->__pyx_n_s_select_market_cap_stock_list
#define __pyx_n_s_select_market_list __pyx_mstate_global->__pyx_n_s_select_market_list
#define __pyx_n_s_select_str __pyx_mstate_global->__pyx_n_s_select_str
#define __pyx_n_s_selection_df __pyx_mstate_global->__pyx_n_s_selection_df
#define __pyx_n_s_selenium __pyx_mstate_global->__pyx_n_s_selenium
#define __pyx_n_s_selenium_webdriver_edge_options __pyx_mstate_global->__pyx_n_s_selenium_webdriver_edge_options
#define __pyx_n_s_selenium_webdriver_edge_service __pyx_mstate_global->__pyx_n_s_selenium_webdriver_edge_service
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_series_name __pyx_mstate_global->__pyx_n_s_series_name
#define __pyx_n_s_service __pyx_mstate_global->__pyx_n_s_service
#define __pyx_n_s_session __pyx_mstate_global->__pyx_n_s_session
#define __pyx_n_s_session_offset __pyx_mstate_global->__pyx_n_s_session_offset
#define __pyx_n_s_setFigureShow __pyx_mstate_global->__pyx_n_s_setFigureShow
#define __pyx_n_s_setPlotTimeLock __pyx_mstate_global->__pyx_n_s_setPlotTimeLock
#define __pyx_n_s_setStockDataDf __pyx_mstate_global->__pyx_n_s_setStockDataDf
#define __pyx_n_s_setStrategyJsonFile __pyx_mstate_global->__pyx_n_s_setStrategyJsonFile
#define __pyx_n_s_set_dpi __pyx_mstate_global->__pyx_n_s_set_dpi
#define __pyx_n_s_set_facecolor __pyx_mstate_global->__pyx_n_s_set_facecolor
#define __pyx_n_s_set_figheight __pyx_mstate_global->__pyx_n_s_set_figheight
#define __pyx_n_s_set_figwidth __pyx_mstate_global->__pyx_n_s_set_figwidth
#define __pyx_n_s_set_fontsize __pyx_mstate_global->__pyx_n_s_set_fontsize
#define __pyx_n_s_set_global_opts __pyx_mstate_global->__pyx_n_s_set_global_opts
#define __pyx_n_s_set_index __pyx_mstate_global->__pyx_n_s_set_index
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_set_title __pyx_mstate_global->__pyx_n_s_set_title
#define __pyx_n_s_set_ylabel __pyx_mstate_global->__pyx_n_s_set_ylabel
#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
#define __pyx_n_s_sh_calendar __pyx_mstate_global->__pyx_n_s_sh_calendar
#define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
#define __pyx_n_s_sheet __pyx_mstate_global->__pyx_n_s_sheet
#define __pyx_n_s_show __pyx_mstate_global->__pyx_n_s_show
#define __pyx_n_s_show_fig __pyx_mstate_global->__pyx_n_s_show_fig
#define __pyx_n_s_show_figure __pyx_mstate_global->__pyx_n_s_show_figure
#define __pyx_n_s_signalperiod __pyx_mstate_global->__pyx_n_s_signalperiod
#define __pyx_n_s_silver __pyx_mstate_global->__pyx_n_s_silver
#define __pyx_n_s_simple_test __pyx_mstate_global->__pyx_n_s_simple_test
#define __pyx_n_s_single __pyx_mstate_global->__pyx_n_s_single
#define __pyx_n_s_slowd_matype __pyx_mstate_global->__pyx_n_s_slowd_matype
#define __pyx_n_s_slowd_period __pyx_mstate_global->__pyx_n_s_slowd_period
#define __pyx_n_s_slowk_matype __pyx_mstate_global->__pyx_n_s_slowk_matype
#define __pyx_n_s_slowk_period __pyx_mstate_global->__pyx_n_s_slowk_period
#define __pyx_n_s_slowperiod __pyx_mstate_global->__pyx_n_s_slowperiod
#define __pyx_n_s_snapshot __pyx_mstate_global->__pyx_n_s_snapshot
#define __pyx_n_s_snapshot_selenium __pyx_mstate_global->__pyx_n_s_snapshot_selenium
#define __pyx_n_s_sort __pyx_mstate_global->__pyx_n_s_sort
#define __pyx_n_s_sort_values __pyx_mstate_global->__pyx_n_s_sort_values
#define __pyx_n_s_sorted_df __pyx_mstate_global->__pyx_n_s_sorted_df
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_spire __pyx_mstate_global->__pyx_n_s_spire
#define __pyx_n_s_spire_xls __pyx_mstate_global->__pyx_n_s_spire_xls
#define __pyx_n_s_spire_xls_common __pyx_mstate_global->__pyx_n_s_spire_xls_common
#define __pyx_n_s_spires __pyx_mstate_global->__pyx_n_s_spires
#define __pyx_n_s_spires_common __pyx_mstate_global->__pyx_n_s_spires_common
#define __pyx_n_s_splitStockData __pyx_mstate_global->__pyx_n_s_splitStockData
#define __pyx_n_s_split_number __pyx_mstate_global->__pyx_n_s_split_number
#define __pyx_n_s_splitext __pyx_mstate_global->__pyx_n_s_splitext
#define __pyx_n_s_splitline_opts __pyx_mstate_global->__pyx_n_s_splitline_opts
#define __pyx_n_s_sql_query __pyx_mstate_global->__pyx_n_s_sql_query
#define __pyx_n_s_sqlalchemy __pyx_mstate_global->__pyx_n_s_sqlalchemy
#define __pyx_n_s_st_stock_dict __pyx_mstate_global->__pyx_n_s_st_stock_dict
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_s_startWithDigit __pyx_mstate_global->__pyx_n_s_startWithDigit
#define __pyx_n_s_start_date __pyx_mstate_global->__pyx_n_s_start_date
#define __pyx_n_s_start_datetime __pyx_mstate_global->__pyx_n_s_start_datetime
#define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_statement __pyx_mstate_global->__pyx_n_s_statement
#define __pyx_n_s_stockSingleStockProperty __pyx_mstate_global->__pyx_n_s_stockSingleStockProperty
#define __pyx_n_s_stockTechInd __pyx_mstate_global->__pyx_n_s_stockTechInd
#define __pyx_n_s_stockTechInd_BOLL __pyx_mstate_global->__pyx_n_s_stockTechInd_BOLL
#define __pyx_n_s_stockTechInd_CDL2CROWS __pyx_mstate_global->__pyx_n_s_stockTechInd_CDL2CROWS
#define __pyx_n_s_stockTechInd_CDL3INSIDE __pyx_mstate_global->__pyx_n_s_stockTechInd_CDL3INSIDE
#define __pyx_n_s_stockTechInd_CDL3STARSINSOUTH __pyx_mstate_global->__pyx_n_s_stockTechInd_CDL3STARSINSOUTH
#define __pyx_n_s_stockTechInd_CDL3WHITESOLDIERS __pyx_mstate_global->__pyx_n_s_stockTechInd_CDL3WHITESOLDIERS
#define __pyx_n_s_stockTechInd_CDLENGULFING __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLENGULFING
#define __pyx_n_s_stockTechInd_CDLHAMMER __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLHAMMER
#define __pyx_n_s_stockTechInd_CDLHARAMI __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLHARAMI
#define __pyx_n_s_stockTechInd_CDLMORNINGSTAR __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLMORNINGSTAR
#define __pyx_n_s_stockTechInd_CDLPIERCING __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLPIERCING
#define __pyx_n_s_stockTechInd_CDLRISEFALL3METHODS __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLRISEFALL3METHODS
#define __pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS __pyx_mstate_global->__pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS
#define __pyx_n_s_stockTechInd_DMI __pyx_mstate_global->__pyx_n_s_stockTechInd_DMI
#define __pyx_n_s_stockTechInd_EMA __pyx_mstate_global->__pyx_n_s_stockTechInd_EMA
#define __pyx_n_s_stockTechInd_KDJ __pyx_mstate_global->__pyx_n_s_stockTechInd_KDJ
#define __pyx_n_s_stockTechInd_MA __pyx_mstate_global->__pyx_n_s_stockTechInd_MA
#define __pyx_n_s_stockTechInd_MACD __pyx_mstate_global->__pyx_n_s_stockTechInd_MACD
#define __pyx_n_s_stockTechInd_MaAll __pyx_mstate_global->__pyx_n_s_stockTechInd_MaAll
#define __pyx_n_s_stockTechInd_OBV __pyx_mstate_global->__pyx_n_s_stockTechInd_OBV
#define __pyx_n_s_stockTechInd_RSI __pyx_mstate_global->__pyx_n_s_stockTechInd_RSI
#define __pyx_n_s_stockTechInd_WILLR __pyx_mstate_global->__pyx_n_s_stockTechInd_WILLR
#define __pyx_n_s_stockTechInd___init __pyx_mstate_global->__pyx_n_s_stockTechInd___init
#define __pyx_n_s_stockTechInd_setFigureShow __pyx_mstate_global->__pyx_n_s_stockTechInd_setFigureShow
#define __pyx_n_s_stockTechInd_setStockDataDf __pyx_mstate_global->__pyx_n_s_stockTechInd_setStockDataDf
#define __pyx_n_s_stock_basic_info __pyx_mstate_global->__pyx_n_s_stock_basic_info
#define __pyx_n_s_stock_basic_info_df __pyx_mstate_global->__pyx_n_s_stock_basic_info_df
#define __pyx_n_s_stock_close_price_df __pyx_mstate_global->__pyx_n_s_stock_close_price_df
#define __pyx_n_s_stock_code __pyx_mstate_global->__pyx_n_s_stock_code
#define __pyx_n_s_stock_code_name __pyx_mstate_global->__pyx_n_s_stock_code_name
#define __pyx_n_s_stock_code_name_all __pyx_mstate_global->__pyx_n_s_stock_code_name_all
#define __pyx_n_s_stock_concept_basic_info __pyx_mstate_global->__pyx_n_s_stock_concept_basic_info
#define __pyx_n_s_stock_concept_trade_day __pyx_mstate_global->__pyx_n_s_stock_concept_trade_day
#define __pyx_n_s_stock_data __pyx_mstate_global->__pyx_n_s_stock_data
#define __pyx_n_s_stock_data_df __pyx_mstate_global->__pyx_n_s_stock_data_df
#define __pyx_n_s_stock_financial_quarter __pyx_mstate_global->__pyx_n_s_stock_financial_quarter
#define __pyx_n_s_stock_financial_report __pyx_mstate_global->__pyx_n_s_stock_financial_report
#define __pyx_n_s_stock_hold_num_table __pyx_mstate_global->__pyx_n_s_stock_hold_num_table
#define __pyx_n_s_stock_hold_number __pyx_mstate_global->__pyx_n_s_stock_hold_number
#define __pyx_n_s_stock_industry_basic_info __pyx_mstate_global->__pyx_n_s_stock_industry_basic_info
#define __pyx_n_s_stock_industry_trade_day __pyx_mstate_global->__pyx_n_s_stock_industry_trade_day
#define __pyx_n_s_stock_ladder __pyx_mstate_global->__pyx_n_s_stock_ladder
#define __pyx_n_s_stock_ladder_dict __pyx_mstate_global->__pyx_n_s_stock_ladder_dict
#define __pyx_n_s_stock_ladder_dict_yesterday __pyx_mstate_global->__pyx_n_s_stock_ladder_dict_yesterday
#define __pyx_n_s_stock_list __pyx_mstate_global->__pyx_n_s_stock_list
#define __pyx_n_s_stock_name __pyx_mstate_global->__pyx_n_s_stock_name
#define __pyx_n_s_stock_query_df __pyx_mstate_global->__pyx_n_s_stock_query_df
#define __pyx_n_s_stock_simple_info __pyx_mstate_global->__pyx_n_s_stock_simple_info
#define __pyx_n_s_stock_tag __pyx_mstate_global->__pyx_n_s_stock_tag
#define __pyx_n_s_stock_tmp __pyx_mstate_global->__pyx_n_s_stock_tmp
#define __pyx_n_s_stock_tmp_code_list __pyx_mstate_global->__pyx_n_s_stock_tmp_code_list
#define __pyx_n_s_stock_tmp_dict __pyx_mstate_global->__pyx_n_s_stock_tmp_dict
#define __pyx_n_s_stock_trade_day __pyx_mstate_global->__pyx_n_s_stock_trade_day
#define __pyx_n_s_stock_trade_day_2024 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2024
#define __pyx_n_s_stock_trade_day_df __pyx_mstate_global->__pyx_n_s_stock_trade_day_df
#define __pyx_n_s_stock_up_limit_list_today __pyx_mstate_global->__pyx_n_s_stock_up_limit_list_today
#define __pyx_n_s_stock_uplimt_ladder __pyx_mstate_global->__pyx_n_s_stock_uplimt_ladder
#define __pyx_n_s_stock_wave_down __pyx_mstate_global->__pyx_n_s_stock_wave_down
#define __pyx_n_s_stock_wave_down_df __pyx_mstate_global->__pyx_n_s_stock_wave_down_df
#define __pyx_n_s_stock_wave_down_dict __pyx_mstate_global->__pyx_n_s_stock_wave_down_dict
#define __pyx_n_s_stock_wave_up __pyx_mstate_global->__pyx_n_s_stock_wave_up
#define __pyx_n_s_stock_wave_up_df __pyx_mstate_global->__pyx_n_s_stock_wave_up_df
#define __pyx_n_s_stock_wave_up_dict __pyx_mstate_global->__pyx_n_s_stock_wave_up_dict
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_n_s_strategyCount __pyx_mstate_global->__pyx_n_s_strategyCount
#define __pyx_n_s_strategy_code_list __pyx_mstate_global->__pyx_n_s_strategy_code_list
#define __pyx_n_s_strategy_data_df __pyx_mstate_global->__pyx_n_s_strategy_data_df
#define __pyx_n_s_strategy_data_dict __pyx_mstate_global->__pyx_n_s_strategy_data_dict
#define __pyx_n_s_strategy_data_dict_2 __pyx_mstate_global->__pyx_n_s_strategy_data_dict_2
#define __pyx_n_s_strategy_date __pyx_mstate_global->__pyx_n_s_strategy_date
#define __pyx_n_s_strategy_img_path __pyx_mstate_global->__pyx_n_s_strategy_img_path
#define __pyx_n_s_strategy_json __pyx_mstate_global->__pyx_n_s_strategy_json
#define __pyx_n_s_strategy_json_file __pyx_mstate_global->__pyx_n_s_strategy_json_file
#define __pyx_n_s_strategy_key_name __pyx_mstate_global->__pyx_n_s_strategy_key_name
#define __pyx_n_s_strategy_key_name1 __pyx_mstate_global->__pyx_n_s_strategy_key_name1
#define __pyx_n_s_strategy_key_name2 __pyx_mstate_global->__pyx_n_s_strategy_key_name2
#define __pyx_n_s_strategy_name __pyx_mstate_global->__pyx_n_s_strategy_name
#define __pyx_kp_s_strategylog_json __pyx_mstate_global->__pyx_kp_s_strategylog_json
#define __pyx_n_s_strftime __pyx_mstate_global->__pyx_n_s_strftime
#define __pyx_n_s_strptime __pyx_mstate_global->__pyx_n_s_strptime
#define __pyx_n_s_style __pyx_mstate_global->__pyx_n_s_style
#define __pyx_n_s_sub_strategy_name __pyx_mstate_global->__pyx_n_s_sub_strategy_name
#define __pyx_n_s_sub_table_title __pyx_mstate_global->__pyx_n_s_sub_table_title
#define __pyx_n_s_submit __pyx_mstate_global->__pyx_n_s_submit
#define __pyx_n_s_subplots __pyx_mstate_global->__pyx_n_s_subplots
#define __pyx_n_s_subset __pyx_mstate_global->__pyx_n_s_subset
#define __pyx_n_s_subtitle __pyx_mstate_global->__pyx_n_s_subtitle
#define __pyx_n_s_succeed __pyx_mstate_global->__pyx_n_s_succeed
#define __pyx_n_s_suffixes __pyx_mstate_global->__pyx_n_s_suffixes
#define __pyx_n_s_sum __pyx_mstate_global->__pyx_n_s_sum
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_suspended_stock_list __pyx_mstate_global->__pyx_n_s_suspended_stock_list
#define __pyx_n_s_symbol __pyx_mstate_global->__pyx_n_s_symbol
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_tab __pyx_mstate_global->__pyx_n_s_tab
#define __pyx_kp_u_table_has_been_updated __pyx_mstate_global->__pyx_kp_u_table_has_been_updated
#define __pyx_kp_u_table_has_been_updated_2 __pyx_mstate_global->__pyx_kp_u_table_has_been_updated_2
#define __pyx_kp_u_table_has_not_been_updated __pyx_mstate_global->__pyx_kp_u_table_has_not_been_updated
#define __pyx_n_s_table_name __pyx_mstate_global->__pyx_n_s_table_name
#define __pyx_n_s_table_rows __pyx_mstate_global->__pyx_n_s_table_rows
#define __pyx_n_s_table_save_excel_path __pyx_mstate_global->__pyx_n_s_table_save_excel_path
#define __pyx_n_s_table_save_path __pyx_mstate_global->__pyx_n_s_table_save_path
#define __pyx_n_s_table_save_png_path __pyx_mstate_global->__pyx_n_s_table_save_png_path
#define __pyx_n_s_table_title __pyx_mstate_global->__pyx_n_s_table_title
#define __pyx_n_s_tail __pyx_mstate_global->__pyx_n_s_tail
#define __pyx_n_s_talib __pyx_mstate_global->__pyx_n_s_talib
#define __pyx_n_s_tbstock __pyx_mstate_global->__pyx_n_s_tbstock
#define __pyx_n_s_tbstock_dataAcquisition_models __pyx_mstate_global->__pyx_n_s_tbstock_dataAcquisition_models
#define __pyx_n_s_tbstock_dataManagement_dataPrepr __pyx_mstate_global->__pyx_n_s_tbstock_dataManagement_dataPrepr
#define __pyx_n_s_tbstock_tradeStrategy_stockStrat __pyx_mstate_global->__pyx_n_s_tbstock_tradeStrategy_stockStrat
#define __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2 __pyx_mstate_global->__pyx_kp_s_tbstock_tradeStrategy_stockStrat_2
#define __pyx_n_s_tbstock_utils __pyx_mstate_global->__pyx_n_s_tbstock_utils
#define __pyx_n_s_tech_ind __pyx_mstate_global->__pyx_n_s_tech_ind
#define __pyx_n_s_tech_ind_method __pyx_mstate_global->__pyx_n_s_tech_ind_method
#define __pyx_n_s_tech_index __pyx_mstate_global->__pyx_n_s_tech_index
#define __pyx_n_s_tech_name __pyx_mstate_global->__pyx_n_s_tech_name
#define __pyx_n_s_technicalStockStrategy __pyx_mstate_global->__pyx_n_s_technicalStockStrategy
#define __pyx_kp_s_technicalStockStrategy___init __pyx_mstate_global->__pyx_kp_s_technicalStockStrategy___init
#define __pyx_n_s_technicalStockStrategy_getStockB __pyx_mstate_global->__pyx_n_s_technicalStockStrategy_getStockB
#define __pyx_n_s_technicalStockStrategy_judgeSing __pyx_mstate_global->__pyx_n_s_technicalStockStrategy_judgeSing
#define __pyx_n_s_technicalStockStrategy_selectByT __pyx_mstate_global->__pyx_n_s_technicalStockStrategy_selectByT
#define __pyx_n_s_temp_dict __pyx_mstate_global->__pyx_n_s_temp_dict
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_test_select_stock __pyx_mstate_global->__pyx_n_s_test_select_stock
#define __pyx_n_s_text_cmap __pyx_mstate_global->__pyx_n_s_text_cmap
#define __pyx_n_s_textprops __pyx_mstate_global->__pyx_n_s_textprops
#define __pyx_n_s_theme __pyx_mstate_global->__pyx_n_s_theme
#define __pyx_n_s_thread __pyx_mstate_global->__pyx_n_s_thread
#define __pyx_n_s_tight __pyx_mstate_global->__pyx_n_s_tight
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_kp_u_time_cost __pyx_mstate_global->__pyx_kp_u_time_cost
#define __pyx_kp_u_time_cost_2 __pyx_mstate_global->__pyx_kp_u_time_cost_2
#define __pyx_n_s_time_key __pyx_mstate_global->__pyx_n_s_time_key
#define __pyx_n_s_time_value __pyx_mstate_global->__pyx_n_s_time_value
#define __pyx_n_s_timeperiod __pyx_mstate_global->__pyx_n_s_timeperiod
#define __pyx_n_s_times __pyx_mstate_global->__pyx_n_s_times
#define __pyx_n_s_title __pyx_mstate_global->__pyx_n_s_title
#define __pyx_n_s_title_opts __pyx_mstate_global->__pyx_n_s_title_opts
#define __pyx_kp_u_to __pyx_mstate_global->__pyx_kp_u_to
#define __pyx_n_s_to_datetime __pyx_mstate_global->__pyx_n_s_to_datetime
#define __pyx_n_s_to_dict __pyx_mstate_global->__pyx_n_s_to_dict
#define __pyx_n_s_to_list __pyx_mstate_global->__pyx_n_s_to_list
#define __pyx_n_s_today_condition_amount __pyx_mstate_global->__pyx_n_s_today_condition_amount
#define __pyx_n_s_tolist __pyx_mstate_global->__pyx_n_s_tolist
#define __pyx_n_s_tooltip_opts __pyx_mstate_global->__pyx_n_s_tooltip_opts
#define __pyx_n_s_top_10_amplitude __pyx_mstate_global->__pyx_n_s_top_10_amplitude
#define __pyx_n_s_top_10_amplitude_dict __pyx_mstate_global->__pyx_n_s_top_10_amplitude_dict
#define __pyx_n_s_top_10_up_limit __pyx_mstate_global->__pyx_n_s_top_10_up_limit
#define __pyx_n_s_top_10_up_limit_dict __pyx_mstate_global->__pyx_n_s_top_10_up_limit_dict
#define __pyx_n_s_top_amplitude __pyx_mstate_global->__pyx_n_s_top_amplitude
#define __pyx_n_s_top_up_limit __pyx_mstate_global->__pyx_n_s_top_up_limit
#define __pyx_n_s_total __pyx_mstate_global->__pyx_n_s_total
#define __pyx_n_s_total_operate_revenue_tb __pyx_mstate_global->__pyx_n_s_total_operate_revenue_tb
#define __pyx_n_s_tqdm __pyx_mstate_global->__pyx_n_s_tqdm
#define __pyx_n_s_trade_date __pyx_mstate_global->__pyx_n_s_trade_date
#define __pyx_n_s_trade_day_df __pyx_mstate_global->__pyx_n_s_trade_day_df
#define __pyx_n_s_trade_day_len __pyx_mstate_global->__pyx_n_s_trade_day_len
#define __pyx_n_s_trade_day_table_name __pyx_mstate_global->__pyx_n_s_trade_day_table_name
#define __pyx_n_s_trade_distribution_code __pyx_mstate_global->__pyx_n_s_trade_distribution_code
#define __pyx_n_s_trade_distribution_len __pyx_mstate_global->__pyx_n_s_trade_distribution_len
#define __pyx_kp_s_trade_distribution_len_html __pyx_mstate_global->__pyx_kp_s_trade_distribution_len_html
#define __pyx_n_s_transform __pyx_mstate_global->__pyx_n_s_transform
#define __pyx_n_s_trigger __pyx_mstate_global->__pyx_n_s_trigger
#define __pyx_n_s_trigger_date __pyx_mstate_global->__pyx_n_s_trigger_date
#define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type
#define __pyx_n_s_type_2 __pyx_mstate_global->__pyx_n_s_type_2
#define __pyx_n_s_type_name __pyx_mstate_global->__pyx_n_s_type_name
#define __pyx_n_s_types __pyx_mstate_global->__pyx_n_s_types
#define __pyx_n_s_typing __pyx_mstate_global->__pyx_n_s_typing
#define __pyx_n_s_union_list __pyx_mstate_global->__pyx_n_s_union_list
#define __pyx_n_s_union_stock_list __pyx_mstate_global->__pyx_n_s_union_stock_list
#define __pyx_n_s_up __pyx_mstate_global->__pyx_n_s_up
#define __pyx_n_s_upLimit_times __pyx_mstate_global->__pyx_n_s_upLimit_times
#define __pyx_n_s_up_limit __pyx_mstate_global->__pyx_n_s_up_limit
#define __pyx_n_s_up_limit_stocks_list __pyx_mstate_global->__pyx_n_s_up_limit_stocks_list
#define __pyx_n_s_up_num __pyx_mstate_global->__pyx_n_s_up_num
#define __pyx_n_s_up_row_index __pyx_mstate_global->__pyx_n_s_up_row_index
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_updateRateHist __pyx_mstate_global->__pyx_n_s_updateRateHist
#define __pyx_n_s_updateRateHist_2 __pyx_mstate_global->__pyx_n_s_updateRateHist_2
#define __pyx_n_s_update_day_hot_info __pyx_mstate_global->__pyx_n_s_update_day_hot_info
#define __pyx_n_s_update_db_logs_dir __pyx_mstate_global->__pyx_n_s_update_db_logs_dir
#define __pyx_n_s_update_hot_table __pyx_mstate_global->__pyx_n_s_update_hot_table
#define __pyx_n_s_update_json __pyx_mstate_global->__pyx_n_s_update_json
#define __pyx_n_s_update_range __pyx_mstate_global->__pyx_n_s_update_range
#define __pyx_n_s_update_range_dict __pyx_mstate_global->__pyx_n_s_update_range_dict
#define __pyx_n_s_update_strategy_logs_dir __pyx_mstate_global->__pyx_n_s_update_strategy_logs_dir
#define __pyx_n_s_updated __pyx_mstate_global->__pyx_n_s_updated
#define __pyx_n_s_updated_database_file __pyx_mstate_global->__pyx_n_s_updated_database_file
#define __pyx_kp_s_updatelog_json __pyx_mstate_global->__pyx_kp_s_updatelog_json
#define __pyx_n_s_uplimt_num __pyx_mstate_global->__pyx_n_s_uplimt_num
#define __pyx_n_s_upper __pyx_mstate_global->__pyx_n_s_upper
#define __pyx_n_s_use_date __pyx_mstate_global->__pyx_n_s_use_date
#define __pyx_kp_s_use_date_2 __pyx_mstate_global->__pyx_kp_s_use_date_2
#define __pyx_n_s_use_date_now __pyx_mstate_global->__pyx_n_s_use_date_now
#define __pyx_n_s_use_date_previous __pyx_mstate_global->__pyx_n_s_use_date_previous
#define __pyx_n_s_use_datetime __pyx_mstate_global->__pyx_n_s_use_datetime
#define __pyx_n_s_use_ma __pyx_mstate_global->__pyx_n_s_use_ma
#define __pyx_n_s_use_num_cold __pyx_mstate_global->__pyx_n_s_use_num_cold
#define __pyx_n_s_use_num_hot __pyx_mstate_global->__pyx_n_s_use_num_hot
#define __pyx_n_s_use_st_stock __pyx_mstate_global->__pyx_n_s_use_st_stock
#define __pyx_n_s_utils __pyx_mstate_global->__pyx_n_s_utils
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_value_dict __pyx_mstate_global->__pyx_n_s_value_dict
#define __pyx_n_s_value_list __pyx_mstate_global->__pyx_n_s_value_list
#define __pyx_n_s_value_ratio __pyx_mstate_global->__pyx_n_s_value_ratio
#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
#define __pyx_kp_s_var_barData __pyx_mstate_global->__pyx_kp_s_var_barData
#define __pyx_n_s_visualStock __pyx_mstate_global->__pyx_n_s_visualStock
#define __pyx_n_s_visualStock___init __pyx_mstate_global->__pyx_n_s_visualStock___init
#define __pyx_n_s_visualStock__convertDictToPandas __pyx_mstate_global->__pyx_n_s_visualStock__convertDictToPandas
#define __pyx_n_s_visualStock__plotHotColdTables __pyx_mstate_global->__pyx_n_s_visualStock__plotHotColdTables
#define __pyx_n_s_visualStock__plotTablePandas __pyx_mstate_global->__pyx_n_s_visualStock__plotTablePandas
#define __pyx_n_s_visualStock__saveToImg __pyx_mstate_global->__pyx_n_s_visualStock__saveToImg
#define __pyx_n_s_visualStock_closeDriver __pyx_mstate_global->__pyx_n_s_visualStock_closeDriver
#define __pyx_n_s_visualStock_drawKlineChart __pyx_mstate_global->__pyx_n_s_visualStock_drawKlineChart
#define __pyx_n_s_visualStock_dumpJsonToFile __pyx_mstate_global->__pyx_n_s_visualStock_dumpJsonToFile
#define __pyx_n_s_visualStock_getWebDriver __pyx_mstate_global->__pyx_n_s_visualStock_getWebDriver
#define __pyx_n_s_visualStock_plotHoldNumberDecrea __pyx_mstate_global->__pyx_n_s_visualStock_plotHoldNumberDecrea
#define __pyx_n_s_visualStock_plotHotColdConceptTa __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdConceptTa
#define __pyx_n_s_visualStock_plotHotColdFutureTab __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdFutureTab
#define __pyx_n_s_visualStock_plotHotColdIndexTabl __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdIndexTabl
#define __pyx_n_s_visualStock_plotHotColdIndustryC __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdIndustryC
#define __pyx_n_s_visualStock_plotHotColdIndustryT __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdIndustryT
#define __pyx_n_s_visualStock_plotHotColdStockTabl __pyx_mstate_global->__pyx_n_s_visualStock_plotHotColdStockTabl
#define __pyx_n_s_visualStock_plotKline __pyx_mstate_global->__pyx_n_s_visualStock_plotKline
#define __pyx_n_s_visualStock_plotKlineMpl __pyx_mstate_global->__pyx_n_s_visualStock_plotKlineMpl
#define __pyx_n_s_visualStock_plotStockUplimtLadde __pyx_mstate_global->__pyx_n_s_visualStock_plotStockUplimtLadde
#define __pyx_n_s_visualStock_plotStrategyFigure __pyx_mstate_global->__pyx_n_s_visualStock_plotStrategyFigure
#define __pyx_n_s_visualStock_plotTop10Amplitude __pyx_mstate_global->__pyx_n_s_visualStock_plotTop10Amplitude
#define __pyx_n_s_visualStock_plotTop10UpLimit __pyx_mstate_global->__pyx_n_s_visualStock_plotTop10UpLimit
#define __pyx_n_s_visualStock_plotTradeDistributio __pyx_mstate_global->__pyx_n_s_visualStock_plotTradeDistributio
#define __pyx_n_s_visualStock_plotWaveDownRank __pyx_mstate_global->__pyx_n_s_visualStock_plotWaveDownRank
#define __pyx_n_s_visualStock_plotWaveUpRank __pyx_mstate_global->__pyx_n_s_visualStock_plotWaveUpRank
#define __pyx_n_s_visualStock_setPlotTimeLock __pyx_mstate_global->__pyx_n_s_visualStock_setPlotTimeLock
#define __pyx_n_s_visualStock_setStrategyJsonFile __pyx_mstate_global->__pyx_n_s_visualStock_setStrategyJsonFile
#define __pyx_n_s_visualStock_splitStockData __pyx_mstate_global->__pyx_n_s_visualStock_splitStockData
#define __pyx_n_s_vols __pyx_mstate_global->__pyx_n_s_vols
#define __pyx_n_s_volume __pyx_mstate_global->__pyx_n_s_volume
#define __pyx_n_s_warning __pyx_mstate_global->__pyx_n_s_warning
#define __pyx_n_s_wave_down_ratio_record __pyx_mstate_global->__pyx_n_s_wave_down_ratio_record
#define __pyx_n_s_wave_ratio __pyx_mstate_global->__pyx_n_s_wave_ratio
#define __pyx_n_s_wave_up_rank_list __pyx_mstate_global->__pyx_n_s_wave_up_rank_list
#define __pyx_n_s_wave_up_ratio_record __pyx_mstate_global->__pyx_n_s_wave_up_ratio_record
#define __pyx_n_s_webdriver __pyx_mstate_global->__pyx_n_s_webdriver
#define __pyx_n_s_week __pyx_mstate_global->__pyx_n_s_week
#define __pyx_n_s_week_2 __pyx_mstate_global->__pyx_n_s_week_2
#define __pyx_n_s_week_levels __pyx_mstate_global->__pyx_n_s_week_levels
#define __pyx_n_s_wick __pyx_mstate_global->__pyx_n_s_wick
#define __pyx_n_s_width __pyx_mstate_global->__pyx_n_s_width
#define __pyx_n_s_workbook __pyx_mstate_global->__pyx_n_s_workbook
#define __pyx_n_s_workers __pyx_mstate_global->__pyx_n_s_workers
#define __pyx_kp_u_x __pyx_mstate_global->__pyx_kp_u_x
#define __pyx_n_s_x_2 __pyx_mstate_global->__pyx_n_s_x_2
#define __pyx_n_s_xaxis_data __pyx_mstate_global->__pyx_n_s_xaxis_data
#define __pyx_n_s_xaxis_index __pyx_mstate_global->__pyx_n_s_xaxis_index
#define __pyx_n_s_xaxis_opts __pyx_mstate_global->__pyx_n_s_xaxis_opts
#define __pyx_n_s_xlabel __pyx_mstate_global->__pyx_n_s_xlabel
#define __pyx_n_s_xls __pyx_mstate_global->__pyx_n_s_xls
#define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
#define __pyx_n_s_y_axis __pyx_mstate_global->__pyx_n_s_y_axis
#define __pyx_n_s_yaxis_index __pyx_mstate_global->__pyx_n_s_yaxis_index
#define __pyx_n_s_yaxis_opts __pyx_mstate_global->__pyx_n_s_yaxis_opts
#define __pyx_n_s_year __pyx_mstate_global->__pyx_n_s_year
#define __pyx_n_s_year_end __pyx_mstate_global->__pyx_n_s_year_end
#define __pyx_n_s_year_levels __pyx_mstate_global->__pyx_n_s_year_levels
#define __pyx_n_s_year_start __pyx_mstate_global->__pyx_n_s_year_start
#define __pyx_n_s_year_str __pyx_mstate_global->__pyx_n_s_year_str
#define __pyx_n_s_ylabel __pyx_mstate_global->__pyx_n_s_ylabel
#define __pyx_n_s_zero_num __pyx_mstate_global->__pyx_n_s_zero_num
#define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0
#define __pyx_float_0_1 __pyx_mstate_global->__pyx_float_0_1
#define __pyx_float_0_2 __pyx_mstate_global->__pyx_float_0_2
#define __pyx_float_0_3 __pyx_mstate_global->__pyx_float_0_3
#define __pyx_float_0_4 __pyx_mstate_global->__pyx_float_0_4
#define __pyx_float_0_5 __pyx_mstate_global->__pyx_float_0_5
#define __pyx_float_0_8 __pyx_mstate_global->__pyx_float_0_8
#define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
#define __pyx_float_1_5 __pyx_mstate_global->__pyx_float_1_5
#define __pyx_float_5_0 __pyx_mstate_global->__pyx_float_5_0
#define __pyx_float_0_01 __pyx_mstate_global->__pyx_float_0_01
#define __pyx_float_10_0 __pyx_mstate_global->__pyx_float_10_0
#define __pyx_float_25_0 __pyx_mstate_global->__pyx_float_25_0
#define __pyx_float_30_0 __pyx_mstate_global->__pyx_float_30_0
#define __pyx_float_50_0 __pyx_mstate_global->__pyx_float_50_0
#define __pyx_float_9_85 __pyx_mstate_global->__pyx_float_9_85
#define __pyx_float_100_0 __pyx_mstate_global->__pyx_float_100_0
#define __pyx_float_neg_9_85 __pyx_mstate_global->__pyx_float_neg_9_85
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
#define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
#define __pyx_int_6 __pyx_mstate_global->__pyx_int_6
#define __pyx_int_7 __pyx_mstate_global->__pyx_int_7
#define __pyx_int_8 __pyx_mstate_global->__pyx_int_8
#define __pyx_int_9 __pyx_mstate_global->__pyx_int_9
#define __pyx_int_10 __pyx_mstate_global->__pyx_int_10
#define __pyx_int_12 __pyx_mstate_global->__pyx_int_12
#define __pyx_int_14 __pyx_mstate_global->__pyx_int_14
#define __pyx_int_15 __pyx_mstate_global->__pyx_int_15
#define __pyx_int_16 __pyx_mstate_global->__pyx_int_16
#define __pyx_int_20 __pyx_mstate_global->__pyx_int_20
#define __pyx_int_25 __pyx_mstate_global->__pyx_int_25
#define __pyx_int_26 __pyx_mstate_global->__pyx_int_26
#define __pyx_int_30 __pyx_mstate_global->__pyx_int_30
#define __pyx_int_31 __pyx_mstate_global->__pyx_int_31
#define __pyx_int_50 __pyx_mstate_global->__pyx_int_50
#define __pyx_int_60 __pyx_mstate_global->__pyx_int_60
#define __pyx_int_72 __pyx_mstate_global->__pyx_int_72
#define __pyx_int_80 __pyx_mstate_global->__pyx_int_80
#define __pyx_int_90 __pyx_mstate_global->__pyx_int_90
#define __pyx_int_100 __pyx_mstate_global->__pyx_int_100
#define __pyx_int_120 __pyx_mstate_global->__pyx_int_120
#define __pyx_int_250 __pyx_mstate_global->__pyx_int_250
#define __pyx_int_252 __pyx_mstate_global->__pyx_int_252
#define __pyx_int_300 __pyx_mstate_global->__pyx_int_300
#define __pyx_int_500 __pyx_mstate_global->__pyx_int_500
#define __pyx_int_1900 __pyx_mstate_global->__pyx_int_1900
#define __pyx_int_2023 __pyx_mstate_global->__pyx_int_2023
#define __pyx_int_2024 __pyx_mstate_global->__pyx_int_2024
#define __pyx_int_1000000 __pyx_mstate_global->__pyx_int_1000000
#define __pyx_int_50000000 __pyx_mstate_global->__pyx_int_50000000
#define __pyx_int_100000000 __pyx_mstate_global->__pyx_int_100000000
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_int_neg_4 __pyx_mstate_global->__pyx_int_neg_4
#define __pyx_int_neg_5 __pyx_mstate_global->__pyx_int_neg_5
#define __pyx_int_neg_59 __pyx_mstate_global->__pyx_int_neg_59
#define __pyx_slice_ __pyx_mstate_global->__pyx_slice_
#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
#define __pyx_slice__31 __pyx_mstate_global->__pyx_slice__31
#define __pyx_slice__39 __pyx_mstate_global->__pyx_slice__39
#define __pyx_slice__44 __pyx_mstate_global->__pyx_slice__44
#define __pyx_slice__73 __pyx_mstate_global->__pyx_slice__73
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78
#define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79
#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90
#define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93
#define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94
#define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99
#define __pyx_slice__101 __pyx_mstate_global->__pyx_slice__101
#define __pyx_slice__137 __pyx_mstate_global->__pyx_slice__137
#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
#define __pyx_tuple__109 __pyx_mstate_global->__pyx_tuple__109
#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110
#define __pyx_tuple__111 __pyx_mstate_global->__pyx_tuple__111
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113
#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114
#define __pyx_tuple__115 __pyx_mstate_global->__pyx_tuple__115
#define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116
#define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118
#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119
#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120
#define __pyx_tuple__121 __pyx_mstate_global->__pyx_tuple__121
#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122
#define __pyx_tuple__123 __pyx_mstate_global->__pyx_tuple__123
#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
#define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125
#define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127
#define __pyx_tuple__130 __pyx_mstate_global->__pyx_tuple__130
#define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134
#define __pyx_tuple__136 __pyx_mstate_global->__pyx_tuple__136
#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138
#define __pyx_tuple__145 __pyx_mstate_global->__pyx_tuple__145
#define __pyx_tuple__146 __pyx_mstate_global->__pyx_tuple__146
#define __pyx_tuple__153 __pyx_mstate_global->__pyx_tuple__153
#define __pyx_tuple__154 __pyx_mstate_global->__pyx_tuple__154
#define __pyx_tuple__155 __pyx_mstate_global->__pyx_tuple__155
#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156
#define __pyx_tuple__157 __pyx_mstate_global->__pyx_tuple__157
#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158
#define __pyx_tuple__159 __pyx_mstate_global->__pyx_tuple__159
#define __pyx_tuple__161 __pyx_mstate_global->__pyx_tuple__161
#define __pyx_tuple__165 __pyx_mstate_global->__pyx_tuple__165
#define __pyx_tuple__168 __pyx_mstate_global->__pyx_tuple__168
#define __pyx_tuple__170 __pyx_mstate_global->__pyx_tuple__170
#define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
#define __pyx_tuple__175 __pyx_mstate_global->__pyx_tuple__175
#define __pyx_tuple__177 __pyx_mstate_global->__pyx_tuple__177
#define __pyx_tuple__179 __pyx_mstate_global->__pyx_tuple__179
#define __pyx_tuple__181 __pyx_mstate_global->__pyx_tuple__181
#define __pyx_tuple__183 __pyx_mstate_global->__pyx_tuple__183
#define __pyx_tuple__184 __pyx_mstate_global->__pyx_tuple__184
#define __pyx_tuple__186 __pyx_mstate_global->__pyx_tuple__186
#define __pyx_tuple__188 __pyx_mstate_global->__pyx_tuple__188
#define __pyx_tuple__190 __pyx_mstate_global->__pyx_tuple__190
#define __pyx_tuple__192 __pyx_mstate_global->__pyx_tuple__192
#define __pyx_tuple__193 __pyx_mstate_global->__pyx_tuple__193
#define __pyx_tuple__199 __pyx_mstate_global->__pyx_tuple__199
#define __pyx_tuple__201 __pyx_mstate_global->__pyx_tuple__201
#define __pyx_tuple__202 __pyx_mstate_global->__pyx_tuple__202
#define __pyx_tuple__204 __pyx_mstate_global->__pyx_tuple__204
#define __pyx_tuple__206 __pyx_mstate_global->__pyx_tuple__206
#define __pyx_tuple__208 __pyx_mstate_global->__pyx_tuple__208
#define __pyx_tuple__209 __pyx_mstate_global->__pyx_tuple__209
#define __pyx_tuple__211 __pyx_mstate_global->__pyx_tuple__211
#define __pyx_tuple__212 __pyx_mstate_global->__pyx_tuple__212
#define __pyx_tuple__213 __pyx_mstate_global->__pyx_tuple__213
#define __pyx_tuple__214 __pyx_mstate_global->__pyx_tuple__214
#define __pyx_tuple__216 __pyx_mstate_global->__pyx_tuple__216
#define __pyx_tuple__218 __pyx_mstate_global->__pyx_tuple__218
#define __pyx_tuple__220 __pyx_mstate_global->__pyx_tuple__220
#define __pyx_tuple__222 __pyx_mstate_global->__pyx_tuple__222
#define __pyx_tuple__224 __pyx_mstate_global->__pyx_tuple__224
#define __pyx_tuple__226 __pyx_mstate_global->__pyx_tuple__226
#define __pyx_tuple__228 __pyx_mstate_global->__pyx_tuple__228
#define __pyx_tuple__230 __pyx_mstate_global->__pyx_tuple__230
#define __pyx_tuple__236 __pyx_mstate_global->__pyx_tuple__236
#define __pyx_tuple__248 __pyx_mstate_global->__pyx_tuple__248
#define __pyx_tuple__249 __pyx_mstate_global->__pyx_tuple__249
#define __pyx_tuple__250 __pyx_mstate_global->__pyx_tuple__250
#define __pyx_tuple__252 __pyx_mstate_global->__pyx_tuple__252
#define __pyx_tuple__255 __pyx_mstate_global->__pyx_tuple__255
#define __pyx_tuple__257 __pyx_mstate_global->__pyx_tuple__257
#define __pyx_tuple__260 __pyx_mstate_global->__pyx_tuple__260
#define __pyx_tuple__262 __pyx_mstate_global->__pyx_tuple__262
#define __pyx_tuple__264 __pyx_mstate_global->__pyx_tuple__264
#define __pyx_tuple__266 __pyx_mstate_global->__pyx_tuple__266
#define __pyx_tuple__268 __pyx_mstate_global->__pyx_tuple__268
#define __pyx_tuple__270 __pyx_mstate_global->__pyx_tuple__270
#define __pyx_tuple__273 __pyx_mstate_global->__pyx_tuple__273
#define __pyx_tuple__275 __pyx_mstate_global->__pyx_tuple__275
#define __pyx_tuple__276 __pyx_mstate_global->__pyx_tuple__276
#define __pyx_tuple__278 __pyx_mstate_global->__pyx_tuple__278
#define __pyx_tuple__280 __pyx_mstate_global->__pyx_tuple__280
#define __pyx_tuple__281 __pyx_mstate_global->__pyx_tuple__281
#define __pyx_tuple__283 __pyx_mstate_global->__pyx_tuple__283
#define __pyx_tuple__285 __pyx_mstate_global->__pyx_tuple__285
#define __pyx_tuple__287 __pyx_mstate_global->__pyx_tuple__287
#define __pyx_tuple__289 __pyx_mstate_global->__pyx_tuple__289
#define __pyx_tuple__291 __pyx_mstate_global->__pyx_tuple__291
#define __pyx_tuple__293 __pyx_mstate_global->__pyx_tuple__293
#define __pyx_tuple__295 __pyx_mstate_global->__pyx_tuple__295
#define __pyx_tuple__297 __pyx_mstate_global->__pyx_tuple__297
#define __pyx_tuple__299 __pyx_mstate_global->__pyx_tuple__299
#define __pyx_tuple__301 __pyx_mstate_global->__pyx_tuple__301
#define __pyx_tuple__303 __pyx_mstate_global->__pyx_tuple__303
#define __pyx_tuple__305 __pyx_mstate_global->__pyx_tuple__305
#define __pyx_tuple__306 __pyx_mstate_global->__pyx_tuple__306
#define __pyx_tuple__308 __pyx_mstate_global->__pyx_tuple__308
#define __pyx_tuple__310 __pyx_mstate_global->__pyx_tuple__310
#define __pyx_tuple__312 __pyx_mstate_global->__pyx_tuple__312
#define __pyx_tuple__313 __pyx_mstate_global->__pyx_tuple__313
#define __pyx_tuple__315 __pyx_mstate_global->__pyx_tuple__315
#define __pyx_tuple__316 __pyx_mstate_global->__pyx_tuple__316
#define __pyx_tuple__318 __pyx_mstate_global->__pyx_tuple__318
#define __pyx_tuple__320 __pyx_mstate_global->__pyx_tuple__320
#define __pyx_tuple__322 __pyx_mstate_global->__pyx_tuple__322
#define __pyx_tuple__323 __pyx_mstate_global->__pyx_tuple__323
#define __pyx_tuple__326 __pyx_mstate_global->__pyx_tuple__326
#define __pyx_tuple__328 __pyx_mstate_global->__pyx_tuple__328
#define __pyx_tuple__329 __pyx_mstate_global->__pyx_tuple__329
#define __pyx_tuple__331 __pyx_mstate_global->__pyx_tuple__331
#define __pyx_tuple__333 __pyx_mstate_global->__pyx_tuple__333
#define __pyx_tuple__335 __pyx_mstate_global->__pyx_tuple__335
#define __pyx_tuple__337 __pyx_mstate_global->__pyx_tuple__337
#define __pyx_tuple__339 __pyx_mstate_global->__pyx_tuple__339
#define __pyx_tuple__340 __pyx_mstate_global->__pyx_tuple__340
#define __pyx_tuple__342 __pyx_mstate_global->__pyx_tuple__342
#define __pyx_tuple__344 __pyx_mstate_global->__pyx_tuple__344
#define __pyx_tuple__345 __pyx_mstate_global->__pyx_tuple__345
#define __pyx_tuple__347 __pyx_mstate_global->__pyx_tuple__347
#define __pyx_tuple__348 __pyx_mstate_global->__pyx_tuple__348
#define __pyx_tuple__350 __pyx_mstate_global->__pyx_tuple__350
#define __pyx_tuple__351 __pyx_mstate_global->__pyx_tuple__351
#define __pyx_tuple__353 __pyx_mstate_global->__pyx_tuple__353
#define __pyx_tuple__354 __pyx_mstate_global->__pyx_tuple__354
#define __pyx_tuple__356 __pyx_mstate_global->__pyx_tuple__356
#define __pyx_tuple__357 __pyx_mstate_global->__pyx_tuple__357
#define __pyx_tuple__359 __pyx_mstate_global->__pyx_tuple__359
#define __pyx_tuple__360 __pyx_mstate_global->__pyx_tuple__360
#define __pyx_tuple__362 __pyx_mstate_global->__pyx_tuple__362
#define __pyx_tuple__364 __pyx_mstate_global->__pyx_tuple__364
#define __pyx_tuple__365 __pyx_mstate_global->__pyx_tuple__365
#define __pyx_tuple__367 __pyx_mstate_global->__pyx_tuple__367
#define __pyx_tuple__369 __pyx_mstate_global->__pyx_tuple__369
#define __pyx_tuple__370 __pyx_mstate_global->__pyx_tuple__370
#define __pyx_tuple__372 __pyx_mstate_global->__pyx_tuple__372
#define __pyx_tuple__373 __pyx_mstate_global->__pyx_tuple__373
#define __pyx_tuple__375 __pyx_mstate_global->__pyx_tuple__375
#define __pyx_tuple__377 __pyx_mstate_global->__pyx_tuple__377
#define __pyx_tuple__379 __pyx_mstate_global->__pyx_tuple__379
#define __pyx_tuple__382 __pyx_mstate_global->__pyx_tuple__382
#define __pyx_tuple__384 __pyx_mstate_global->__pyx_tuple__384
#define __pyx_tuple__385 __pyx_mstate_global->__pyx_tuple__385
#define __pyx_tuple__387 __pyx_mstate_global->__pyx_tuple__387
#define __pyx_tuple__389 __pyx_mstate_global->__pyx_tuple__389
#define __pyx_tuple__391 __pyx_mstate_global->__pyx_tuple__391
#define __pyx_tuple__393 __pyx_mstate_global->__pyx_tuple__393
#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107
#define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126
#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
#define __pyx_codeobj__135 __pyx_mstate_global->__pyx_codeobj__135
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163
#define __pyx_codeobj__164 __pyx_mstate_global->__pyx_codeobj__164
#define __pyx_codeobj__166 __pyx_mstate_global->__pyx_codeobj__166
#define __pyx_codeobj__167 __pyx_mstate_global->__pyx_codeobj__167
#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169
#define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171
#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
#define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178
#define __pyx_codeobj__180 __pyx_mstate_global->__pyx_codeobj__180
#define __pyx_codeobj__182 __pyx_mstate_global->__pyx_codeobj__182
#define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__189 __pyx_mstate_global->__pyx_codeobj__189
#define __pyx_codeobj__191 __pyx_mstate_global->__pyx_codeobj__191
#define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194
#define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195
#define __pyx_codeobj__196 __pyx_mstate_global->__pyx_codeobj__196
#define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197
#define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198
#define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200
#define __pyx_codeobj__203 __pyx_mstate_global->__pyx_codeobj__203
#define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205
#define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207
#define __pyx_codeobj__210 __pyx_mstate_global->__pyx_codeobj__210
#define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215
#define __pyx_codeobj__217 __pyx_mstate_global->__pyx_codeobj__217
#define __pyx_codeobj__219 __pyx_mstate_global->__pyx_codeobj__219
#define __pyx_codeobj__221 __pyx_mstate_global->__pyx_codeobj__221
#define __pyx_codeobj__223 __pyx_mstate_global->__pyx_codeobj__223
#define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
#define __pyx_codeobj__227 __pyx_mstate_global->__pyx_codeobj__227
#define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229
#define __pyx_codeobj__231 __pyx_mstate_global->__pyx_codeobj__231
#define __pyx_codeobj__232 __pyx_mstate_global->__pyx_codeobj__232
#define __pyx_codeobj__233 __pyx_mstate_global->__pyx_codeobj__233
#define __pyx_codeobj__234 __pyx_mstate_global->__pyx_codeobj__234
#define __pyx_codeobj__235 __pyx_mstate_global->__pyx_codeobj__235
#define __pyx_codeobj__237 __pyx_mstate_global->__pyx_codeobj__237
#define __pyx_codeobj__238 __pyx_mstate_global->__pyx_codeobj__238
#define __pyx_codeobj__239 __pyx_mstate_global->__pyx_codeobj__239
#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240
#define __pyx_codeobj__241 __pyx_mstate_global->__pyx_codeobj__241
#define __pyx_codeobj__242 __pyx_mstate_global->__pyx_codeobj__242
#define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243
#define __pyx_codeobj__244 __pyx_mstate_global->__pyx_codeobj__244
#define __pyx_codeobj__245 __pyx_mstate_global->__pyx_codeobj__245
#define __pyx_codeobj__246 __pyx_mstate_global->__pyx_codeobj__246
#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247
#define __pyx_codeobj__251 __pyx_mstate_global->__pyx_codeobj__251
#define __pyx_codeobj__253 __pyx_mstate_global->__pyx_codeobj__253
#define __pyx_codeobj__254 __pyx_mstate_global->__pyx_codeobj__254
#define __pyx_codeobj__256 __pyx_mstate_global->__pyx_codeobj__256
#define __pyx_codeobj__258 __pyx_mstate_global->__pyx_codeobj__258
#define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259
#define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261
#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
#define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265
#define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267
#define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269
#define __pyx_codeobj__271 __pyx_mstate_global->__pyx_codeobj__271
#define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272
#define __pyx_codeobj__274 __pyx_mstate_global->__pyx_codeobj__274
#define __pyx_codeobj__277 __pyx_mstate_global->__pyx_codeobj__277
#define __pyx_codeobj__279 __pyx_mstate_global->__pyx_codeobj__279
#define __pyx_codeobj__282 __pyx_mstate_global->__pyx_codeobj__282
#define __pyx_codeobj__284 __pyx_mstate_global->__pyx_codeobj__284
#define __pyx_codeobj__286 __pyx_mstate_global->__pyx_codeobj__286
#define __pyx_codeobj__288 __pyx_mstate_global->__pyx_codeobj__288
#define __pyx_codeobj__290 __pyx_mstate_global->__pyx_codeobj__290
#define __pyx_codeobj__292 __pyx_mstate_global->__pyx_codeobj__292
#define __pyx_codeobj__294 __pyx_mstate_global->__pyx_codeobj__294
#define __pyx_codeobj__296 __pyx_mstate_global->__pyx_codeobj__296
#define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298
#define __pyx_codeobj__300 __pyx_mstate_global->__pyx_codeobj__300
#define __pyx_codeobj__302 __pyx_mstate_global->__pyx_codeobj__302
#define __pyx_codeobj__304 __pyx_mstate_global->__pyx_codeobj__304
#define __pyx_codeobj__307 __pyx_mstate_global->__pyx_codeobj__307
#define __pyx_codeobj__309 __pyx_mstate_global->__pyx_codeobj__309
#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311
#define __pyx_codeobj__314 __pyx_mstate_global->__pyx_codeobj__314
#define __pyx_codeobj__317 __pyx_mstate_global->__pyx_codeobj__317
#define __pyx_codeobj__319 __pyx_mstate_global->__pyx_codeobj__319
#define __pyx_codeobj__321 __pyx_mstate_global->__pyx_codeobj__321
#define __pyx_codeobj__324 __pyx_mstate_global->__pyx_codeobj__324
#define __pyx_codeobj__325 __pyx_mstate_global->__pyx_codeobj__325
#define __pyx_codeobj__327 __pyx_mstate_global->__pyx_codeobj__327
#define __pyx_codeobj__330 __pyx_mstate_global->__pyx_codeobj__330
#define __pyx_codeobj__332 __pyx_mstate_global->__pyx_codeobj__332
#define __pyx_codeobj__334 __pyx_mstate_global->__pyx_codeobj__334
#define __pyx_codeobj__336 __pyx_mstate_global->__pyx_codeobj__336
#define __pyx_codeobj__338 __pyx_mstate_global->__pyx_codeobj__338
#define __pyx_codeobj__341 __pyx_mstate_global->__pyx_codeobj__341
#define __pyx_codeobj__343 __pyx_mstate_global->__pyx_codeobj__343
#define __pyx_codeobj__346 __pyx_mstate_global->__pyx_codeobj__346
#define __pyx_codeobj__349 __pyx_mstate_global->__pyx_codeobj__349
#define __pyx_codeobj__352 __pyx_mstate_global->__pyx_codeobj__352
#define __pyx_codeobj__355 __pyx_mstate_global->__pyx_codeobj__355
#define __pyx_codeobj__358 __pyx_mstate_global->__pyx_codeobj__358
#define __pyx_codeobj__361 __pyx_mstate_global->__pyx_codeobj__361
#define __pyx_codeobj__363 __pyx_mstate_global->__pyx_codeobj__363
#define __pyx_codeobj__366 __pyx_mstate_global->__pyx_codeobj__366
#define __pyx_codeobj__368 __pyx_mstate_global->__pyx_codeobj__368
#define __pyx_codeobj__371 __pyx_mstate_global->__pyx_codeobj__371
#define __pyx_codeobj__374 __pyx_mstate_global->__pyx_codeobj__374
#define __pyx_codeobj__376 __pyx_mstate_global->__pyx_codeobj__376
#define __pyx_codeobj__378 __pyx_mstate_global->__pyx_codeobj__378
#define __pyx_codeobj__380 __pyx_mstate_global->__pyx_codeobj__380
#define __pyx_codeobj__381 __pyx_mstate_global->__pyx_codeobj__381
#define __pyx_codeobj__383 __pyx_mstate_global->__pyx_codeobj__383
#define __pyx_codeobj__386 __pyx_mstate_global->__pyx_codeobj__386
#define __pyx_codeobj__388 __pyx_mstate_global->__pyx_codeobj__388
#define __pyx_codeobj__390 __pyx_mstate_global->__pyx_codeobj__390
#define __pyx_codeobj__392 __pyx_mstate_global->__pyx_codeobj__392
#define __pyx_codeobj__394 __pyx_mstate_global->__pyx_codeobj__394
/* #### Code section: module_code ### */

/* "tbstock/tradeStrategy/stockStrategy.py":57
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 57, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 57, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock___init__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":58
 * 
 *     def __init__(self):
 *         self.my_dataproc = dataproc.dataPreprocess()             # <<<<<<<<<<<<<<
 *         self.img_save_path_root = utils.img_save_path_root
 *         self.lock_time = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dataPreprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_my_dataproc, __pyx_t_1) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":59
 *     def __init__(self):
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root             # <<<<<<<<<<<<<<
 *         self.lock_time = True
 *         self.getWebDriver()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root, __pyx_t_3) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":60
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root
 *         self.lock_time = True             # <<<<<<<<<<<<<<
 *         self.getWebDriver()
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock_time, Py_True) < 0) __PYX_ERR(0, 60, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":61
 *         self.img_save_path_root = utils.img_save_path_root
 *         self.lock_time = True
 *         self.getWebDriver()             # <<<<<<<<<<<<<<
 * 
 *     def getWebDriver(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getWebDriver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":57
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":63
 *         self.getWebDriver()
 * 
 *     def getWebDriver(self):             # <<<<<<<<<<<<<<
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_3getWebDriver(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_3getWebDriver = {"getWebDriver", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_3getWebDriver, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_3getWebDriver(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getWebDriver (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 63, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getWebDriver") < 0)) __PYX_ERR(0, 63, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getWebDriver", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 63, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.getWebDriver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_2getWebDriver(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_2getWebDriver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_service = NULL;
  PyObject *__pyx_v_options = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getWebDriver", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":64
 * 
 *     def getWebDriver(self):
 *         service = Service(executable_path=utils.edge_driver_path)             # <<<<<<<<<<<<<<
 *         options = Options()
 *         self.driver = webdriver.Edge(service=service, options=options)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Service); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_edge_driver_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_executable_path, __pyx_t_4) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_service = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":65
 *     def getWebDriver(self):
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()             # <<<<<<<<<<<<<<
 *         self.driver = webdriver.Edge(service=service, options=options)
 *         # self.driver.close()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_options = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":66
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()
 *         self.driver = webdriver.Edge(service=service, options=options)             # <<<<<<<<<<<<<<
 *         # self.driver.close()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_webdriver); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Edge); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_service, __pyx_v_service) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_options, __pyx_v_options) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_driver, __pyx_t_1) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":63
 *         self.getWebDriver()
 * 
 *     def getWebDriver(self):             # <<<<<<<<<<<<<<
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.getWebDriver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_service);
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":69
 *         # self.driver.close()
 * 
 *     def closeDriver(self):             # <<<<<<<<<<<<<<
 *         self.driver.close()
 *         self.driver.quit()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_5closeDriver(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_5closeDriver = {"closeDriver", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_5closeDriver, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_5closeDriver(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("closeDriver (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closeDriver") < 0)) __PYX_ERR(0, 69, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("closeDriver", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.closeDriver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_4closeDriver(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_4closeDriver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("closeDriver", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":70
 * 
 *     def closeDriver(self):
 *         self.driver.close()             # <<<<<<<<<<<<<<
 *         self.driver.quit()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_driver); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":71
 *     def closeDriver(self):
 *         self.driver.close()
 *         self.driver.quit()             # <<<<<<<<<<<<<<
 * 
 *     def setPlotTimeLock(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_driver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_quit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":69
 *         # self.driver.close()
 * 
 *     def closeDriver(self):             # <<<<<<<<<<<<<<
 *         self.driver.close()
 *         self.driver.quit()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.closeDriver", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":73
 *         self.driver.quit()
 * 
 *     def setPlotTimeLock(self):             # <<<<<<<<<<<<<<
 *         '''
 *         True:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_7setPlotTimeLock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_6setPlotTimeLock, "\n        True: \346\257\217\345\221\250\346\234\200\345\220\216\344\270\200\345\244\251\346\233\264\346\226\260\345\221\250\346\225\260\346\215\256\357\274\214\346\257\217\346\234\210\346\234\200\345\220\216\344\270\200\345\244\251\346\233\264\346\226\260\346\234\210\346\225\260\346\215\256\357\274\214\346\257\217\345\271\264\346\234\200\345\220\216\344\270\200\345\244\251\346\233\264\346\226\260\345\271\264\346\225\260\346\215\256\n        False\357\274\232\346\257\217\345\244\251\351\203\275\346\233\264\346\226\260\345\221\250\357\274\214\346\234\210\357\274\214\345\271\264\346\225\260\346\215\256\357\274\214\345\255\230\345\234\250\351\207\215\345\244\215\346\225\260\346\215\256\347\232\204\346\203\205\345\206\265\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_7setPlotTimeLock = {"setPlotTimeLock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_7setPlotTimeLock, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_6setPlotTimeLock};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_7setPlotTimeLock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setPlotTimeLock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setPlotTimeLock") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setPlotTimeLock", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 73, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.setPlotTimeLock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_6setPlotTimeLock(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_6setPlotTimeLock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setPlotTimeLock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":79
 *         :return:
 *         '''
 *         self.lock_time = False             # <<<<<<<<<<<<<<
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock_time, Py_False) < 0) __PYX_ERR(0, 79, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":73
 *         self.driver.quit()
 * 
 *     def setPlotTimeLock(self):             # <<<<<<<<<<<<<<
 *         '''
 *         True:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.setPlotTimeLock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":81
 *         self.lock_time = False
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_9setStrategyJsonFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_9setStrategyJsonFile = {"setStrategyJsonFile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_9setStrategyJsonFile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_9setStrategyJsonFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_strategy_json_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setStrategyJsonFile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_strategy_json_file,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strategy_json_file)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("setStrategyJsonFile", 1, 2, 2, 1); __PYX_ERR(0, 81, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setStrategyJsonFile") < 0)) __PYX_ERR(0, 81, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_strategy_json_file = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setStrategyJsonFile", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 81, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.setStrategyJsonFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_8setStrategyJsonFile(__pyx_self, __pyx_v_self, __pyx_v_strategy_json_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_8setStrategyJsonFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_json_file) {
  CYTHON_UNUSED PyObject *__pyx_v_file_extension = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setStrategyJsonFile", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":82
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):
 *         self.filename = os.path.basename(strategy_json_file)             # <<<<<<<<<<<<<<
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 *         self.datetime_str = self.base_filename[0:8]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_basename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_strategy_json_file};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_filename, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":83
 *     def setStrategyJsonFile(self, strategy_json_file):
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)             # <<<<<<<<<<<<<<
 *         self.datetime_str = self.base_filename[0:8]
 *         # print(f": {self.filename}")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_splitext); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 83, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 83, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_base_filename, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_file_extension = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":84
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 *         self.datetime_str = self.base_filename[0:8]             # <<<<<<<<<<<<<<
 *         # print(f": {self.filename}")
 *         # print(f": {self.base_filename}")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 8, NULL, NULL, &__pyx_slice_, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str, __pyx_t_3) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":88
 *         # print(f": {self.base_filename}")
 * 
 *         self.strategy_json_file = strategy_json_file             # <<<<<<<<<<<<<<
 *         self.strategy_json = {}
 *         self.has_strategy_file = False
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json_file, __pyx_v_strategy_json_file) < 0) __PYX_ERR(0, 88, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":89
 * 
 *         self.strategy_json_file = strategy_json_file
 *         self.strategy_json = {}             # <<<<<<<<<<<<<<
 *         self.has_strategy_file = False
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_3) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":90
 *         self.strategy_json_file = strategy_json_file
 *         self.strategy_json = {}
 *         self.has_strategy_file = False             # <<<<<<<<<<<<<<
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)
 *         if not self.has_strategy_file:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, Py_False) < 0) __PYX_ERR(0, 90, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":91
 *         self.strategy_json = {}
 *         self.has_strategy_file = False
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)             # <<<<<<<<<<<<<<
 *         if not self.has_strategy_file:
 *             raise RuntimeError(f"{strategy_json_file}.")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 91, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 91, __pyx_L1_error)
    __pyx_L6_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":92
 *         self.has_strategy_file = False
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)
 *         if not self.has_strategy_file:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = (!__pyx_t_7);
  if (unlikely(__pyx_t_8)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":93
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)
 *         if not self.has_strategy_file:
 *             raise RuntimeError(f"{strategy_json_file}.")             # <<<<<<<<<<<<<<
 * 
 *     def dumpJsonToFile(self):
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_n_u__2);
    __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
    __pyx_t_9 += 2;
    __Pyx_GIVEREF(__pyx_n_u__2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u__2);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_json_file, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__3);
    __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
    __pyx_t_9 += 4;
    __Pyx_GIVEREF(__pyx_kp_u__3);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__3);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 93, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":92
 *         self.has_strategy_file = False
 *         self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.strategy_json_file)
 *         if not self.has_strategy_file:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":81
 *         self.lock_time = False
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.setStrategyJsonFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_file_extension);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":95
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_11dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_11dumpJsonToFile = {"dumpJsonToFile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_11dumpJsonToFile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_11dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dumpJsonToFile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dumpJsonToFile") < 0)) __PYX_ERR(0, 95, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dumpJsonToFile", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 95, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_10dumpJsonToFile(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_10dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dumpJsonToFile", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":97
 *     def dumpJsonToFile(self):
 *         #  JSON
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)             # <<<<<<<<<<<<<<
 * 
 *     def plotStrategyFigure(self, strategy_json_file):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":95
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":99
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 * 
 *     def plotStrategyFigure(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_13plotStrategyFigure(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_13plotStrategyFigure = {"plotStrategyFigure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_13plotStrategyFigure, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_13plotStrategyFigure(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_strategy_json_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotStrategyFigure (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_strategy_json_file,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strategy_json_file)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("plotStrategyFigure", 1, 2, 2, 1); __PYX_ERR(0, 99, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotStrategyFigure") < 0)) __PYX_ERR(0, 99, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_strategy_json_file = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotStrategyFigure", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 99, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotStrategyFigure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_12plotStrategyFigure(__pyx_self, __pyx_v_self, __pyx_v_strategy_json_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_12plotStrategyFigure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_json_file) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotStrategyFigure", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":100
 * 
 *     def plotStrategyFigure(self, strategy_json_file):
 *         self.setStrategyJsonFile(strategy_json_file)             # <<<<<<<<<<<<<<
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 *             utils.logger.info("Strategy figure has generated.")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_setStrategyJsonFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_strategy_json_file};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":101
 *     def plotStrategyFigure(self, strategy_json_file):
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:             # <<<<<<<<<<<<<<
 *             utils.logger.info("Strategy figure has generated.")
 *             return
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_figured, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_figured); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":102
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 *             utils.logger.info("Strategy figure has generated.")             # <<<<<<<<<<<<<<
 *             return
 *         self.plotTop10UpLimit()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Strategy_figure_has_generated};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":103
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 *             utils.logger.info("Strategy figure has generated.")
 *             return             # <<<<<<<<<<<<<<
 *         self.plotTop10UpLimit()
 *         self.plotTop10Amplitude()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":101
 *     def plotStrategyFigure(self, strategy_json_file):
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:             # <<<<<<<<<<<<<<
 *             utils.logger.info("Strategy figure has generated.")
 *             return
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":104
 *             utils.logger.info("Strategy figure has generated.")
 *             return
 *         self.plotTop10UpLimit()             # <<<<<<<<<<<<<<
 *         self.plotTop10Amplitude()
 *         self.plotWaveUpRank()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTop10UpLimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":105
 *             return
 *         self.plotTop10UpLimit()
 *         self.plotTop10Amplitude()             # <<<<<<<<<<<<<<
 *         self.plotWaveUpRank()
 *         self.plotWaveDownRank()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTop10Amplitude); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":106
 *         self.plotTop10UpLimit()
 *         self.plotTop10Amplitude()
 *         self.plotWaveUpRank()             # <<<<<<<<<<<<<<
 *         self.plotWaveDownRank()
 *         self.plotTradeDistributionLen()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotWaveUpRank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":107
 *         self.plotTop10Amplitude()
 *         self.plotWaveUpRank()
 *         self.plotWaveDownRank()             # <<<<<<<<<<<<<<
 *         self.plotTradeDistributionLen()
 *         self.plotStockUplimtLadder()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotWaveDownRank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":108
 *         self.plotWaveUpRank()
 *         self.plotWaveDownRank()
 *         self.plotTradeDistributionLen()             # <<<<<<<<<<<<<<
 *         self.plotStockUplimtLadder()
 *         self.plotHotColdIndustryTable()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTradeDistributionLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":109
 *         self.plotWaveDownRank()
 *         self.plotTradeDistributionLen()
 *         self.plotStockUplimtLadder()             # <<<<<<<<<<<<<<
 *         self.plotHotColdIndustryTable()
 *         self.plotHotColdIndustryConceptFrequency('industry')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotStockUplimtLadder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":110
 *         self.plotTradeDistributionLen()
 *         self.plotStockUplimtLadder()
 *         self.plotHotColdIndustryTable()             # <<<<<<<<<<<<<<
 *         self.plotHotColdIndustryConceptFrequency('industry')
 *         self.plotHotColdConceptTable()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdIndustryTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":111
 *         self.plotStockUplimtLadder()
 *         self.plotHotColdIndustryTable()
 *         self.plotHotColdIndustryConceptFrequency('industry')             # <<<<<<<<<<<<<<
 *         self.plotHotColdConceptTable()
 *         self.plotHotColdIndustryConceptFrequency('concept')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdIndustryConceptFreque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_industry};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":112
 *         self.plotHotColdIndustryTable()
 *         self.plotHotColdIndustryConceptFrequency('industry')
 *         self.plotHotColdConceptTable()             # <<<<<<<<<<<<<<
 *         self.plotHotColdIndustryConceptFrequency('concept')
 *         self.plotHotColdStockTable()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdConceptTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":113
 *         self.plotHotColdIndustryConceptFrequency('industry')
 *         self.plotHotColdConceptTable()
 *         self.plotHotColdIndustryConceptFrequency('concept')             # <<<<<<<<<<<<<<
 *         self.plotHotColdStockTable()
 *         self.plotHotColdFutureTable()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdIndustryConceptFreque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_concept};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":114
 *         self.plotHotColdConceptTable()
 *         self.plotHotColdIndustryConceptFrequency('concept')
 *         self.plotHotColdStockTable()             # <<<<<<<<<<<<<<
 *         self.plotHotColdFutureTable()
 *         self.plotHotColdIndexTable()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdStockTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":115
 *         self.plotHotColdIndustryConceptFrequency('concept')
 *         self.plotHotColdStockTable()
 *         self.plotHotColdFutureTable()             # <<<<<<<<<<<<<<
 *         self.plotHotColdIndexTable()
 *         self.plotHoldNumberDecrease()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdFutureTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":116
 *         self.plotHotColdStockTable()
 *         self.plotHotColdFutureTable()
 *         self.plotHotColdIndexTable()             # <<<<<<<<<<<<<<
 *         self.plotHoldNumberDecrease()
 *         self.strategy_json['figured'] = True
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdIndexTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":117
 *         self.plotHotColdFutureTable()
 *         self.plotHotColdIndexTable()
 *         self.plotHoldNumberDecrease()             # <<<<<<<<<<<<<<
 *         self.strategy_json['figured'] = True
 *         self.dumpJsonToFile()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHoldNumberDecrease); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":118
 *         self.plotHotColdIndexTable()
 *         self.plotHoldNumberDecrease()
 *         self.strategy_json['figured'] = True             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_figured, Py_True) < 0))) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":119
 *         self.plotHoldNumberDecrease()
 *         self.strategy_json['figured'] = True
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def plotTop10UpLimit(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":99
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 * 
 *     def plotStrategyFigure(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotStrategyFigure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":121
 *         self.dumpJsonToFile()
 * 
 *     def plotTop10UpLimit(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_15plotTop10UpLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_15plotTop10UpLimit = {"plotTop10UpLimit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_15plotTop10UpLimit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_15plotTop10UpLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotTop10UpLimit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotTop10UpLimit") < 0)) __PYX_ERR(0, 121, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotTop10UpLimit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 121, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTop10UpLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_14plotTop10UpLimit(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_14plotTop10UpLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_day_len = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotTop10UpLimit", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":122
 * 
 *     def plotTop10UpLimit(self):
 *         strategy_key_name = 'top_10_up_limit'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_top_10_up_limit);
  __pyx_v_strategy_key_name = __pyx_n_s_top_10_up_limit;

  /* "tbstock/tradeStrategy/stockStrategy.py":124
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":125
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":126
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":124
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":129
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":130
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":131
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len) < 0))) __PYX_ERR(0, 131, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":132
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 132, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":133
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 133, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":134
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 134, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":133
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":136
 *             del strategy_data_dict['strategy_img_path']
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)             # <<<<<<<<<<<<<<
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_strategy_data_dict};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":137
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)             # <<<<<<<<<<<<<<
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_insert); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_int_0, __pyx_n_s_name, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":138
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)             # <<<<<<<<<<<<<<
 *         strategy_data_df.columns = ['', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_strategy_data_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 138, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_7 + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_1)) __PYX_ERR(0, 138, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":139
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']             # <<<<<<<<<<<<<<
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 * 
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s__4);
  __Pyx_GIVEREF(__pyx_kp_s__4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__4)) __PYX_ERR(0, 139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__5);
  __Pyx_GIVEREF(__pyx_kp_s__5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s__5)) __PYX_ERR(0, 139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__6);
  __Pyx_GIVEREF(__pyx_kp_s__6);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s__6)) __PYX_ERR(0, 139, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__7);
  __Pyx_GIVEREF(__pyx_kp_s__7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s__7)) __PYX_ERR(0, 139, __pyx_L1_error);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":140
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0             # <<<<<<<<<<<<<<
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_kp_s__7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_2, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_kp_s__7, __pyx_t_9) < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":142
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_plt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_figsize, __pyx_tuple__8) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 142, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 142, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_9;
  __pyx_t_9 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":143
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__9);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_n_u__10);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 9;
  __Pyx_GIVEREF(__pyx_n_u__10);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__10);
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":144
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             df=strategy_data_df,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_title};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":145
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Table); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "tbstock/tradeStrategy/stockStrategy.py":146
 *         ax.set_title(table_title)
 *         tab = Table(
 *             df=strategy_data_df,             # <<<<<<<<<<<<<<
 *             ax=ax,
 *             textprops={
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_df, __pyx_v_strategy_data_df) < 0) __PYX_ERR(0, 146, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":147
 *         tab = Table(
 *             df=strategy_data_df,
 *             ax=ax,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ax, __pyx_v_ax) < 0) __PYX_ERR(0, 146, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":149
 *             ax=ax,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_textprops, __pyx_t_2) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":153
 *             column_definitions=[
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")             # <<<<<<<<<<<<<<
 *             ],
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_name, __pyx_kp_s__7) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":151
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_12)) __PYX_ERR(0, 151, __pyx_L1_error);
  __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_column_definitions, __pyx_t_6) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":145
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_tab = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":156
 *             ],
 *         )
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__11);
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u_png);
  __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_table_save_path = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":157
 *         )
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # plt.show()
 *         plt.close()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 157, __pyx_L1_error);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_facecolor, __pyx_t_9) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":159
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         # print(strategy_data_df)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_close); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":162
 *         # print(strategy_data_df)
 * 
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":163
 * 
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotTop10Amplitude(self):
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":121
 *         self.dumpJsonToFile()
 * 
 *     def plotTop10UpLimit(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTop10UpLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_day_len);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":165
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTop10Amplitude(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_17plotTop10Amplitude(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_17plotTop10Amplitude = {"plotTop10Amplitude", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_17plotTop10Amplitude, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_17plotTop10Amplitude(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotTop10Amplitude (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotTop10Amplitude") < 0)) __PYX_ERR(0, 165, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotTop10Amplitude", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTop10Amplitude", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_16plotTop10Amplitude(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_16plotTop10Amplitude(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_day_len = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotTop10Amplitude", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":166
 * 
 *     def plotTop10Amplitude(self):
 *         strategy_key_name = 'top_10_amplitude'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_top_10_amplitude);
  __pyx_v_strategy_key_name = __pyx_n_s_top_10_amplitude;

  /* "tbstock/tradeStrategy/stockStrategy.py":168
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":169
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":170
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":168
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":173
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":174
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":175
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len) < 0))) __PYX_ERR(0, 175, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":176
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 176, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":177
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 177, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":178
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 178, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":177
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":180
 *             del strategy_data_dict['strategy_img_path']
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)             # <<<<<<<<<<<<<<
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_strategy_data_dict};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":181
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)             # <<<<<<<<<<<<<<
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_insert); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_int_0, __pyx_n_s_name, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":182
 *         strategy_data_df = pd.DataFrame(strategy_data_dict).round(2)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)             # <<<<<<<<<<<<<<
 *         strategy_data_df.columns = ['', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_strategy_data_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 182, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_7 + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_1)) __PYX_ERR(0, 182, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":183
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']             # <<<<<<<<<<<<<<
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 * 
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s__4);
  __Pyx_GIVEREF(__pyx_kp_s__4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__4)) __PYX_ERR(0, 183, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__5);
  __Pyx_GIVEREF(__pyx_kp_s__5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s__5)) __PYX_ERR(0, 183, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__6);
  __Pyx_GIVEREF(__pyx_kp_s__6);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s__6)) __PYX_ERR(0, 183, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__7);
  __Pyx_GIVEREF(__pyx_kp_s__7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s__7)) __PYX_ERR(0, 183, __pyx_L1_error);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":184
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0             # <<<<<<<<<<<<<<
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_kp_s__7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_2, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_kp_s__7, __pyx_t_9) < 0))) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":186
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_plt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_figsize, __pyx_tuple__8) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 186, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 186, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_9;
  __pyx_t_9 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":187
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__9);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_n_u__12);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 9;
  __Pyx_GIVEREF(__pyx_n_u__12);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__12);
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":188
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             strategy_data_df,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_title};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":189
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Table); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "tbstock/tradeStrategy/stockStrategy.py":190
 *         ax.set_title(table_title)
 *         tab = Table(
 *             strategy_data_df,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_strategy_data_df);
  __Pyx_GIVEREF(__pyx_v_strategy_data_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_strategy_data_df)) __PYX_ERR(0, 189, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":191
 *         tab = Table(
 *             strategy_data_df,
 *             textprops={             # <<<<<<<<<<<<<<
 *                 'ha': 'center',  #
 *             },
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "tbstock/tradeStrategy/stockStrategy.py":192
 *             strategy_data_df,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 192, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_textprops, __pyx_t_6) < 0) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":196
 *             column_definitions=[
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")             # <<<<<<<<<<<<<<
 *             ],
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_kp_s__7) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 196, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":194
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")
 */
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(0, 194, __pyx_L1_error);
  __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_column_definitions, __pyx_t_12) < 0) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":189
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tab = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":199
 *             ],
 *         )
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # #plt.show()
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__11);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_png);
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_table_save_path = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":200
 *         )
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # #plt.show()
 *         plt.close()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 200, __pyx_L1_error);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_facecolor, __pyx_t_4) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":202
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # #plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_plt); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_close); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":204
 *         plt.close()
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":205
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotWaveUpRank(self, show_fig=False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":165
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTop10Amplitude(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTop10Amplitude", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_day_len);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":207
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveUpRank(self, show_fig=False):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_up'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_19plotWaveUpRank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_19plotWaveUpRank = {"plotWaveUpRank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_19plotWaveUpRank, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_19plotWaveUpRank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_show_fig = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotWaveUpRank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_show_fig,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_show_fig);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotWaveUpRank") < 0)) __PYX_ERR(0, 207, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_show_fig = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotWaveUpRank", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotWaveUpRank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_18plotWaveUpRank(__pyx_self, __pyx_v_self, __pyx_v_show_fig);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_18plotWaveUpRank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_show_fig) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_day_len = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotWaveUpRank", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":208
 * 
 *     def plotWaveUpRank(self, show_fig=False):
 *         strategy_key_name = 'stock_wave_up'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_stock_wave_up);
  __pyx_v_strategy_key_name = __pyx_n_s_stock_wave_up;

  /* "tbstock/tradeStrategy/stockStrategy.py":211
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":212
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":213
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":211
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":216
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":217
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":218
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len) < 0))) __PYX_ERR(0, 218, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":219
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 219, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":220
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 220, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":221
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 221, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":220
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":224
 * 
 *         #
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)             # <<<<<<<<<<<<<<
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_strategy_data_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":225
 *         #
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)             # <<<<<<<<<<<<<<
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_insert); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_int_0, __pyx_n_s_name, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":226
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)             # <<<<<<<<<<<<<<
 *         strategy_data_df.columns = ['', '', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] - 1
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_strategy_data_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 226, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_7 + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 226, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":227
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']             # <<<<<<<<<<<<<<
 *         strategy_data_df[''] = strategy_data_df[''] - 1
 * 
 */
  __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s__4);
  __Pyx_GIVEREF(__pyx_kp_s__4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__4)) __PYX_ERR(0, 227, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__5);
  __Pyx_GIVEREF(__pyx_kp_s__5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s__5)) __PYX_ERR(0, 227, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__13);
  __Pyx_GIVEREF(__pyx_kp_s__13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s__13)) __PYX_ERR(0, 227, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__14);
  __Pyx_GIVEREF(__pyx_kp_s__14);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s__14)) __PYX_ERR(0, 227, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__15);
  __Pyx_GIVEREF(__pyx_kp_s__15);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_kp_s__15)) __PYX_ERR(0, 227, __pyx_L1_error);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":228
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']
 *         strategy_data_df[''] = strategy_data_df[''] - 1             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_kp_s__13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_kp_s__13, __pyx_t_6) < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":231
 * 
 *         #
 *         fig, ax = plt.subplots(figsize=(5, 8))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_figsize, __pyx_tuple__8) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 231, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 231, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":232
 *         #
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__9);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_n_u__16);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 11;
  __Pyx_GIVEREF(__pyx_n_u__16);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__16);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":233
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             strategy_data_df,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_title};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":234
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "tbstock/tradeStrategy/stockStrategy.py":235
 *         ax.set_title(table_title)
 *         tab = Table(
 *             strategy_data_df,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_strategy_data_df);
  __Pyx_GIVEREF(__pyx_v_strategy_data_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_strategy_data_df)) __PYX_ERR(0, 234, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":236
 *         tab = Table(
 *             strategy_data_df,
 *             textprops={             # <<<<<<<<<<<<<<
 *                 'ha': 'center',  #
 *             },
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "tbstock/tradeStrategy/stockStrategy.py":237
 *             strategy_data_df,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_textprops, __pyx_t_9) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":241
 *             column_definitions=[
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")             # <<<<<<<<<<<<<<
 *             ],
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_kp_s__13) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 241, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":239
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")
 */
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(0, 239, __pyx_L1_error);
  __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_column_definitions, __pyx_t_12) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":234
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tab = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":246
 * 
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__11);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_png);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_table_save_path = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":247
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         if show_fig:
 *             plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 247, __pyx_L1_error);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_facecolor, __pyx_t_4) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":248
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:             # <<<<<<<<<<<<<<
 *             plt.show()
 *         plt.close()
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_show_fig); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 248, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":249
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:
 *             plt.show()             # <<<<<<<<<<<<<<
 *         plt.close()
 *         # print(strategy_data_df)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_plt); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_show); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":248
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:             # <<<<<<<<<<<<<<
 *             plt.show()
 *         plt.close()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":250
 *         if show_fig:
 *             plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_close); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":252
 *         plt.close()
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":253
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotWaveDownRank(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":207
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveUpRank(self, show_fig=False):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_up'
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotWaveUpRank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_day_len);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":255
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveDownRank(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_down'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_21plotWaveDownRank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_21plotWaveDownRank = {"plotWaveDownRank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_21plotWaveDownRank, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_21plotWaveDownRank(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotWaveDownRank (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotWaveDownRank") < 0)) __PYX_ERR(0, 255, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotWaveDownRank", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 255, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotWaveDownRank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_20plotWaveDownRank(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_20plotWaveDownRank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_day_len = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotWaveDownRank", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":256
 * 
 *     def plotWaveDownRank(self):
 *         strategy_key_name = 'stock_wave_down'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_stock_wave_down);
  __pyx_v_strategy_key_name = __pyx_n_s_stock_wave_down;

  /* "tbstock/tradeStrategy/stockStrategy.py":259
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":260
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":261
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":259
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":264
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":265
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":266
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len) < 0))) __PYX_ERR(0, 266, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":267
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 267, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":268
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 268, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":269
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 269, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":268
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":272
 * 
 *         #
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)             # <<<<<<<<<<<<<<
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_strategy_data_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":273
 *         #
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)             # <<<<<<<<<<<<<<
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_insert); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_int_0, __pyx_n_s_name, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 3+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":274
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)             # <<<<<<<<<<<<<<
 *         strategy_data_df.columns = ['', '', '', '', '']
 *         strategy_data_df[''] = 1 - strategy_data_df['']
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_strategy_data_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_7 + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 274, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":275
 *         strategy_data_df.insert(0, 'name', strategy_data_df.index)
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']             # <<<<<<<<<<<<<<
 *         strategy_data_df[''] = 1 - strategy_data_df['']
 * 
 */
  __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s__4);
  __Pyx_GIVEREF(__pyx_kp_s__4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__4)) __PYX_ERR(0, 275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__5);
  __Pyx_GIVEREF(__pyx_kp_s__5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s__5)) __PYX_ERR(0, 275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__17);
  __Pyx_GIVEREF(__pyx_kp_s__17);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_kp_s__17)) __PYX_ERR(0, 275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__14);
  __Pyx_GIVEREF(__pyx_kp_s__14);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_kp_s__14)) __PYX_ERR(0, 275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__15);
  __Pyx_GIVEREF(__pyx_kp_s__15);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_kp_s__15)) __PYX_ERR(0, 275, __pyx_L1_error);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 275, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":276
 *         strategy_data_df.index = range(1, len(strategy_data_df) + 1)
 *         strategy_data_df.columns = ['', '', '', '', '']
 *         strategy_data_df[''] = 1 - strategy_data_df['']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_kp_s__17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_2, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_kp_s__17, __pyx_t_6) < 0))) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":279
 * 
 *         #
 *         fig, ax = plt.subplots(figsize=(5, 8))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_figsize, __pyx_tuple__8) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 279, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    index = 0; __pyx_t_6 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 279, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":280
 *         #
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__9);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__9);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_n_u__18);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 11;
  __Pyx_GIVEREF(__pyx_n_u__18);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__18);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":281
 *         fig, ax = plt.subplots(figsize=(5, 8))
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             strategy_data_df,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_title};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":282
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "tbstock/tradeStrategy/stockStrategy.py":283
 *         ax.set_title(table_title)
 *         tab = Table(
 *             strategy_data_df,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_strategy_data_df);
  __Pyx_GIVEREF(__pyx_v_strategy_data_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_strategy_data_df)) __PYX_ERR(0, 282, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":284
 *         tab = Table(
 *             strategy_data_df,
 *             textprops={             # <<<<<<<<<<<<<<
 *                 'ha': 'center',  #
 *             },
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "tbstock/tradeStrategy/stockStrategy.py":285
 *             strategy_data_df,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_textprops, __pyx_t_9) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":289
 *             column_definitions=[
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")             # <<<<<<<<<<<<<<
 *             ],
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_kp_s__17) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":287
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 # text_cmap=matplotlib.cm.Reds,
 *                 ColDef(name="", formatter="{:.2%}")
 */
  __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_13)) __PYX_ERR(0, 287, __pyx_L1_error);
  __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_column_definitions, __pyx_t_12) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":282
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tab = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":294
 * 
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__11);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_png);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_table_save_path = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":295
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # plt.show()
 *         plt.close()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 295, __pyx_L1_error);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_facecolor, __pyx_t_4) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":297
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_plt); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":299
 *         plt.close()
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":300
 *         # print(strategy_data_df)
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotTradeDistributionLen(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":255
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveDownRank(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_down'
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotWaveDownRank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_day_len);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":302
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTradeDistributionLen(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_23plotTradeDistributionLen(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_23plotTradeDistributionLen = {"plotTradeDistributionLen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_23plotTradeDistributionLen, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_23plotTradeDistributionLen(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotTradeDistributionLen (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotTradeDistributionLen") < 0)) __PYX_ERR(0, 302, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotTradeDistributionLen", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 302, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTradeDistributionLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_22plotTradeDistributionLen(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_22plotTradeDistributionLen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_key_list = NULL;
  PyObject *__pyx_v_value_list = NULL;
  PyObject *__pyx_v_up_num = NULL;
  PyObject *__pyx_v_zero_num = NULL;
  PyObject *__pyx_v_down_num = NULL;
  PyObject *__pyx_v_uplimt_num = NULL;
  PyObject *__pyx_v_downlimt_num = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_table_title = NULL;
  PyObject *__pyx_v_sub_table_title = NULL;
  PyObject *__pyx_v_color_function = NULL;
  PyObject *__pyx_v_init_opts = NULL;
  PyObject *__pyx_v_fig_bar = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotTradeDistributionLen", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":303
 * 
 *     def plotTradeDistributionLen(self):
 *         strategy_key_name = 'trade_distribution_len'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_trade_distribution_len);
  __pyx_v_strategy_key_name = __pyx_n_s_trade_distribution_len;

  /* "tbstock/tradeStrategy/stockStrategy.py":305
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":306
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":307
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":305
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":310
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":311
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 311, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":312
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 312, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":313
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         key_list = list(strategy_data_dict.keys())
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 313, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":312
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":315
 *             del strategy_data_dict['strategy_img_path']
 * 
 *         key_list = list(strategy_data_dict.keys())             # <<<<<<<<<<<<<<
 *         value_list = list(strategy_data_dict.values())
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_key_list = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":316
 * 
 *         key_list = list(strategy_data_dict.keys())
 *         value_list = list(strategy_data_dict.values())             # <<<<<<<<<<<<<<
 * 
 *         up_num = sum(value_list[6:10])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_dict, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_value_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":318
 *         value_list = list(strategy_data_dict.values())
 * 
 *         up_num = sum(value_list[6:10])             # <<<<<<<<<<<<<<
 *         zero_num = value_list[5]
 *         down_num = sum(value_list[1:5])
 */
  __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_value_list, 6, 10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_up_num = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":319
 * 
 *         up_num = sum(value_list[6:10])
 *         zero_num = value_list[5]             # <<<<<<<<<<<<<<
 *         down_num = sum(value_list[1:5])
 *         uplimt_num = value_list[-1]
 */
  __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_value_list, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_zero_num = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":320
 *         up_num = sum(value_list[6:10])
 *         zero_num = value_list[5]
 *         down_num = sum(value_list[1:5])             # <<<<<<<<<<<<<<
 *         uplimt_num = value_list[-1]
 *         downlimt_num = value_list[0]
 */
  __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_v_value_list, 1, 5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_down_num = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":321
 *         zero_num = value_list[5]
 *         down_num = sum(value_list[1:5])
 *         uplimt_num = value_list[-1]             # <<<<<<<<<<<<<<
 *         downlimt_num = value_list[0]
 * 
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_value_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uplimt_num = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":322
 *         down_num = sum(value_list[1:5])
 *         uplimt_num = value_list[-1]
 *         downlimt_num = value_list[0]             # <<<<<<<<<<<<<<
 * 
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_value_list, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_downlimt_num = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":324
 *         downlimt_num = value_list[0]
 * 
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-'
 *         sub_table_title = f":: = {up_num}:{zero_num}:{down_num}, : = {uplimt_num}:{downlimt_num}"
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__11);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u_png);
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_table_save_path = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":325
 * 
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         table_title = f'{self.datetime_str}-'             # <<<<<<<<<<<<<<
 *         sub_table_title = f":: = {up_num}:{zero_num}:{down_num}, : = {uplimt_num}:{downlimt_num}"
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_kp_u__19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":326
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         table_title = f'{self.datetime_str}-'
 *         sub_table_title = f":: = {up_num}:{zero_num}:{down_num}, : = {uplimt_num}:{downlimt_num}"             # <<<<<<<<<<<<<<
 * 
 *         color_function = """
 */
  __pyx_t_4 = PyTuple_New(10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u__20);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 11;
  __Pyx_GIVEREF(__pyx_kp_u__20);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__20);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_up_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__21);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_zero_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__21);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_down_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__22);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u__22);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__22);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_uplimt_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_kp_u__21);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_downlimt_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 10, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_sub_table_title = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":328
 *         sub_table_title = f":: = {up_num}:{zero_num}:{down_num}, : = {uplimt_num}:{downlimt_num}"
 * 
 *         color_function = """             # <<<<<<<<<<<<<<
 *                 function (params) {
 *                     if (params.dataIndex < 5)
 */
  __Pyx_INCREF(__pyx_kp_s_function_params_if_params_dataI);
  __pyx_v_color_function = __pyx_kp_s_function_params_if_params_dataI;

  /* "tbstock/tradeStrategy/stockStrategy.py":337
 *                 }
 *                 """
 *         init_opts = opts.InitOpts(theme=ThemeType.LIGHT, bg_color='#ffffff', is_fill_bg_color=True)             # <<<<<<<<<<<<<<
 *         fig_bar = (
 *             Bar(init_opts=init_opts)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_InitOpts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ThemeType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LIGHT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_theme, __pyx_t_6) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_bg_color, __pyx_kp_s_ffffff) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_fill_bg_color, Py_True) < 0) __PYX_ERR(0, 337, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_init_opts = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":339
 *         init_opts = opts.InitOpts(theme=ThemeType.LIGHT, bg_color='#ffffff', is_fill_bg_color=True)
 *         fig_bar = (
 *             Bar(init_opts=init_opts)             # <<<<<<<<<<<<<<
 *             .add_xaxis(key_list)
 *             # .add_yaxis('', value_list, itemstyle_opts=[
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Bar); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_init_opts, __pyx_v_init_opts) < 0) __PYX_ERR(0, 339, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":340
 *         fig_bar = (
 *             Bar(init_opts=init_opts)
 *             .add_xaxis(key_list)             # <<<<<<<<<<<<<<
 *             # .add_yaxis('', value_list, itemstyle_opts=[
 *             #     opts.ItemStyleOpts(color="green") if i < 5 else opts.ItemStyleOpts(color="grey") if i == 5 else opts.ItemStyleOpts(color="red") for
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_key_list};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":344
 *             #     opts.ItemStyleOpts(color="green") if i < 5 else opts.ItemStyleOpts(color="grey") if i == 5 else opts.ItemStyleOpts(color="red") for
 *             #     i in range(len(key_list))])
 *             .add_yaxis('', value_list, itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_function)))             # <<<<<<<<<<<<<<
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=table_title,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_kp_s__23);
  __Pyx_GIVEREF(__pyx_kp_s__23);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s__23)) __PYX_ERR(0, 344, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_value_list);
  __Pyx_GIVEREF(__pyx_v_value_list);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_value_list)) __PYX_ERR(0, 344, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_ItemStyleOpts); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_JsCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_color_function};
    __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_color, __pyx_t_12) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_itemstyle_opts, __pyx_t_12) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":345
 *             #     i in range(len(key_list))])
 *             .add_yaxis('', value_list, itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_function)))
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 title_opts=opts.TitleOpts(title=table_title,
 *                                           subtitle=sub_table_title),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":346
 *             .add_yaxis('', value_list, itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_function)))
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=table_title,             # <<<<<<<<<<<<<<
 *                                           subtitle=sub_table_title),
 *                 xaxis_opts=opts.AxisOpts(
 */
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TitleOpts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_title, __pyx_v_table_title) < 0) __PYX_ERR(0, 346, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":347
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=table_title,
 *                                           subtitle=sub_table_title),             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_subtitle, __pyx_v_sub_table_title) < 0) __PYX_ERR(0, 346, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":346
 *             .add_yaxis('', value_list, itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_function)))
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=table_title,             # <<<<<<<<<<<<<<
 *                                           subtitle=sub_table_title),
 *                 xaxis_opts=opts.AxisOpts(
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_title_opts, __pyx_t_9) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":348
 *                 title_opts=opts.TitleOpts(title=table_title,
 *                                           subtitle=sub_table_title),
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":349
 *                                           subtitle=sub_table_title),
 *                 xaxis_opts=opts.AxisOpts(
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_opts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AxisLineOpts); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_axisline_opts, __pyx_t_13) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":350
 *                 xaxis_opts=opts.AxisOpts(
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_opts); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_AxisTickOpts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_axistick_opts, __pyx_t_11) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":351
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_opts); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_splitline_opts, __pyx_t_4) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":348
 *                 title_opts=opts.TitleOpts(title=table_title,
 *                                           subtitle=sub_table_title),
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_xaxis_opts, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":353
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_opts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":354
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AxisLineOpts); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axisline_opts, __pyx_t_13) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":355
 *                 yaxis_opts=opts.AxisOpts(
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_opts); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_AxisTickOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_axistick_opts, __pyx_t_11) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":356
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 ),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_opts); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_splitline_opts, __pyx_t_6) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":353
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     axisline_opts=opts.AxisLineOpts(is_show=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_yaxis_opts, __pyx_t_6) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":345
 *             #     i in range(len(key_list))])
 *             .add_yaxis('', value_list, itemstyle_opts=opts.ItemStyleOpts(color=JsCode(color_function)))
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 title_opts=opts.TitleOpts(title=table_title,
 *                                           subtitle=sub_table_title),
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_fig_bar = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":361
 *         )
 * 
 *         fig_bar.render("trade_distribution_len.html")             # <<<<<<<<<<<<<<
 *         make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path, driver=self.driver)
 *         # make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path)  #
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig_bar, __pyx_n_s_render); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_trade_distribution_len_html};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":362
 * 
 *         fig_bar.render("trade_distribution_len.html")
 *         make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path, driver=self.driver)             # <<<<<<<<<<<<<<
 *         # make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path)  #
 *         temp_dict = {table_title + ', ' + sub_table_title: table_save_path}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_make_snapshot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_fun_driver); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12)) __PYX_ERR(0, 362, __pyx_L1_error);
  __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_file_name, __pyx_kp_s_trade_distribution_len_html) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_output_name, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_driver); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_driver, __pyx_t_4) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":364
 *         make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path, driver=self.driver)
 *         # make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path)  #
 *         temp_dict = {table_title + ', ' + sub_table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_v_table_title, __pyx_kp_s__24); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_12, __pyx_v_sub_table_title); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_t_2, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":365
 *         # make_snapshot(fun_driver, file_name="trade_distribution_len.html", output_name=table_save_path)  #
 *         temp_dict = {table_title + ', ' + sub_table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotStockUplimtLadder(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":302
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTradeDistributionLen(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotTradeDistributionLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_key_list);
  __Pyx_XDECREF(__pyx_v_value_list);
  __Pyx_XDECREF(__pyx_v_up_num);
  __Pyx_XDECREF(__pyx_v_zero_num);
  __Pyx_XDECREF(__pyx_v_down_num);
  __Pyx_XDECREF(__pyx_v_uplimt_num);
  __Pyx_XDECREF(__pyx_v_downlimt_num);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_sub_table_title);
  __Pyx_XDECREF(__pyx_v_color_function);
  __Pyx_XDECREF(__pyx_v_init_opts);
  __Pyx_XDECREF(__pyx_v_fig_bar);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":367
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotStockUplimtLadder(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_25plotStockUplimtLadder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_25plotStockUplimtLadder = {"plotStockUplimtLadder", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_25plotStockUplimtLadder, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_25plotStockUplimtLadder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotStockUplimtLadder (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotStockUplimtLadder") < 0)) __PYX_ERR(0, 367, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotStockUplimtLadder", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 367, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotStockUplimtLadder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_24plotStockUplimtLadder(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_24plotStockUplimtLadder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_max_level = NULL;
  PyObject *__pyx_v_foot_size = NULL;
  PyObject *__pyx_v_max_rows = NULL;
  PyObject *__pyx_v_first_uplimit_num = NULL;
  PyObject *__pyx_v_per_row_num = NULL;
  PyObject *__pyx_v_pre_fig_row = NULL;
  PyObject *__pyx_v_interval = NULL;
  PyObject *__pyx_v_strategy_data_dict_ = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_codes_list = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_codes_str = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotStockUplimtLadder", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":368
 * 
 *     def plotStockUplimtLadder(self):
 *         strategy_key_name = 'stock_uplimt_ladder'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_stock_uplimt_ladder);
  __pyx_v_strategy_key_name = __pyx_n_s_stock_uplimt_ladder;

  /* "tbstock/tradeStrategy/stockStrategy.py":370
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":371
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":372
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":370
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":374
 *             return False
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         max_level = strategy_data_dict['max_level']
 *         del strategy_data_dict['updated']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":375
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         max_level = strategy_data_dict['max_level']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         del strategy_data_dict['max_level']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_max_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_max_level = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":376
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         max_level = strategy_data_dict['max_level']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['max_level']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 376, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":377
 *         max_level = strategy_data_dict['max_level']
 *         del strategy_data_dict['updated']
 *         del strategy_data_dict['max_level']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_max_level) < 0))) __PYX_ERR(0, 377, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":378
 *         del strategy_data_dict['updated']
 *         del strategy_data_dict['max_level']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 378, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":379
 *         del strategy_data_dict['max_level']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 379, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":378
 *         del strategy_data_dict['updated']
 *         del strategy_data_dict['max_level']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":382
 * 
 *         #
 *         foot_size = 7  # 7             # <<<<<<<<<<<<<<
 *         max_rows = int(1 / (foot_size * 2 / 72))  # 1 1
 *         first_uplimit_num = len(strategy_data_dict['1'])  # 1
 */
  __Pyx_INCREF(__pyx_int_7);
  __pyx_v_foot_size = __pyx_int_7;

  /* "tbstock/tradeStrategy/stockStrategy.py":383
 *         #
 *         foot_size = 7  # 7
 *         max_rows = int(1 / (foot_size * 2 / 72))  # 1 1             # <<<<<<<<<<<<<<
 *         first_uplimit_num = len(strategy_data_dict['1'])  # 1
 *         per_row_num = math.ceil(first_uplimit_num / max_rows)  #
 */
  __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_v_foot_size, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_2, __pyx_int_72, 72, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_max_rows = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":384
 *         foot_size = 7  # 7
 *         max_rows = int(1 / (foot_size * 2 / 72))  # 1 1
 *         first_uplimit_num = len(strategy_data_dict['1'])  # 1             # <<<<<<<<<<<<<<
 *         per_row_num = math.ceil(first_uplimit_num / max_rows)  #
 *         pre_fig_row = math.floor(per_row_num * (4 * foot_size * 1.5 / 72)) + 2
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_kp_s_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_first_uplimit_num = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":385
 *         max_rows = int(1 / (foot_size * 2 / 72))  # 1 1
 *         first_uplimit_num = len(strategy_data_dict['1'])  # 1
 *         per_row_num = math.ceil(first_uplimit_num / max_rows)  #             # <<<<<<<<<<<<<<
 *         pre_fig_row = math.floor(per_row_num * (4 * foot_size * 1.5 / 72)) + 2
 *         # print('per_row_num = ', per_row_num)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ceil); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_first_uplimit_num, __pyx_v_max_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_per_row_num = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":386
 *         first_uplimit_num = len(strategy_data_dict['1'])  # 1
 *         per_row_num = math.ceil(first_uplimit_num / max_rows)  #
 *         pre_fig_row = math.floor(per_row_num * (4 * foot_size * 1.5 / 72)) + 2             # <<<<<<<<<<<<<<
 *         # print('per_row_num = ', per_row_num)
 *         # print('pre_fig_row = ', pre_fig_row)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_floor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_4, __pyx_v_foot_size, 4, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_float_1_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_9, __pyx_int_72, 72, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Multiply(__pyx_v_per_row_num, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_pre_fig_row = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":391
 * 
 *         ## dict
 *         interval = per_row_num             # <<<<<<<<<<<<<<
 *         strategy_data_dict_ = {}
 *         strategy_data_dict_[''] = strategy_data_dict
 */
  __Pyx_INCREF(__pyx_v_per_row_num);
  __pyx_v_interval = __pyx_v_per_row_num;

  /* "tbstock/tradeStrategy/stockStrategy.py":392
 *         ## dict
 *         interval = per_row_num
 *         strategy_data_dict_ = {}             # <<<<<<<<<<<<<<
 *         strategy_data_dict_[''] = strategy_data_dict
 *         for key, value in reversed(strategy_data_dict.items()):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_strategy_data_dict_ = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":393
 *         interval = per_row_num
 *         strategy_data_dict_ = {}
 *         strategy_data_dict_[''] = strategy_data_dict             # <<<<<<<<<<<<<<
 *         for key, value in reversed(strategy_data_dict.items()):
 *             codes_list = list(value.values())
 */
  if (unlikely((PyDict_SetItem(__pyx_v_strategy_data_dict_, __pyx_kp_s__4, __pyx_v_strategy_data_dict) < 0))) __PYX_ERR(0, 393, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":394
 *         strategy_data_dict_ = {}
 *         strategy_data_dict_[''] = strategy_data_dict
 *         for key, value in reversed(strategy_data_dict.items()):             # <<<<<<<<<<<<<<
 *             codes_list = list(value.values())
 *             for i in range(interval, len(codes_list), interval):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_7 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 394, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_11(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 394, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 394, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12);
      index = 0; __pyx_t_9 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_6)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 394, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":395
 *         strategy_data_dict_[''] = strategy_data_dict
 *         for key, value in reversed(strategy_data_dict.items()):
 *             codes_list = list(value.values())             # <<<<<<<<<<<<<<
 *             for i in range(interval, len(codes_list), interval):
 *                 codes_list[i] = '\n' + codes_list[i]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_codes_list, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":396
 *         for key, value in reversed(strategy_data_dict.items()):
 *             codes_list = list(value.values())
 *             for i in range(interval, len(codes_list), interval):             # <<<<<<<<<<<<<<
 *                 codes_list[i] = '\n' + codes_list[i]
 *             codes_str = ','.join(codes_list)
 */
    __pyx_t_14 = __Pyx_PyList_GET_SIZE(__pyx_v_codes_list); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 396, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_interval);
    __Pyx_GIVEREF(__pyx_v_interval);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_interval)) __PYX_ERR(0, 396, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_interval);
    __Pyx_GIVEREF(__pyx_v_interval);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_interval)) __PYX_ERR(0, 396, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 396, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 396, __pyx_L1_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 396, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 396, __pyx_L1_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 396, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_15(__pyx_t_4);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 396, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":397
 *             codes_list = list(value.values())
 *             for i in range(interval, len(codes_list), interval):
 *                 codes_list[i] = '\n' + codes_list[i]             # <<<<<<<<<<<<<<
 *             codes_str = ','.join(codes_list)
 *             strategy_data_dict_[''][key] = codes_str
 */
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_codes_list, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyNumber_Add(__pyx_kp_s__25, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_codes_list, __pyx_v_i, __pyx_t_9) < 0))) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":396
 *         for key, value in reversed(strategy_data_dict.items()):
 *             codes_list = list(value.values())
 *             for i in range(interval, len(codes_list), interval):             # <<<<<<<<<<<<<<
 *                 codes_list[i] = '\n' + codes_list[i]
 *             codes_str = ','.join(codes_list)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":398
 *             for i in range(interval, len(codes_list), interval):
 *                 codes_list[i] = '\n' + codes_list[i]
 *             codes_str = ','.join(codes_list)             # <<<<<<<<<<<<<<
 *             strategy_data_dict_[''][key] = codes_str
 * 
 */
    __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_v_codes_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_codes_str, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":399
 *                 codes_list[i] = '\n' + codes_list[i]
 *             codes_str = ','.join(codes_list)
 *             strategy_data_dict_[''][key] = codes_str             # <<<<<<<<<<<<<<
 * 
 *         ## dataframe
 */
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_strategy_data_dict_, __pyx_kp_s__4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_v_key, __pyx_v_codes_str) < 0))) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":394
 *         strategy_data_dict_ = {}
 *         strategy_data_dict_[''] = strategy_data_dict
 *         for key, value in reversed(strategy_data_dict.items()):             # <<<<<<<<<<<<<<
 *             codes_list = list(value.values())
 *             for i in range(interval, len(codes_list), interval):
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":402
 * 
 *         ## dataframe
 *         strategy_data_df = pd.DataFrame(strategy_data_dict_)             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_strategy_data_dict_};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":405
 * 
 *         ##
 *         fig, ax = plt.subplots(figsize=(pre_fig_row, max_level))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-'
 *         ax.set_title(table_title)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_subplots); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_pre_fig_row);
  __Pyx_GIVEREF(__pyx_v_pre_fig_row);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pre_fig_row)) __PYX_ERR(0, 405, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_max_level);
  __Pyx_GIVEREF(__pyx_v_max_level);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_max_level)) __PYX_ERR(0, 405, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_figsize, __pyx_t_4) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 405, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_9);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_9 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L15_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_6), 2) < 0) __PYX_ERR(0, 405, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L16_unpacking_done;
    __pyx_L15_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 405, __pyx_L1_error)
    __pyx_L16_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_ax = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":406
 *         ##
 *         fig, ax = plt.subplots(figsize=(pre_fig_row, max_level))
 *         table_title = f'{self.datetime_str}-'             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_kp_u__27); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":407
 *         fig, ax = plt.subplots(figsize=(pre_fig_row, max_level))
 *         table_title = f'{self.datetime_str}-'
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             df=strategy_data_df,
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_title};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":408
 *         table_title = f'{self.datetime_str}-'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "tbstock/tradeStrategy/stockStrategy.py":409
 *         ax.set_title(table_title)
 *         tab = Table(
 *             df=strategy_data_df,             # <<<<<<<<<<<<<<
 *             ax=ax,
 *             textprops={
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_df, __pyx_v_strategy_data_df) < 0) __PYX_ERR(0, 409, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":410
 *         tab = Table(
 *             df=strategy_data_df,
 *             ax=ax,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ax, __pyx_v_ax) < 0) __PYX_ERR(0, 409, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":412
 *             ax=ax,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_textprops, __pyx_t_2) < 0) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":415
 *             },
 *             column_definitions=[
 *                 ColDef(name="", width=50, title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="index", width=3, title='', cmap=matplotlib.cm.Reds),
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_name, __pyx_kp_s__4) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_width, __pyx_int_50) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_title, __pyx_kp_s__28) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":416
 *             column_definitions=[
 *                 ColDef(name="", width=50, title=''),
 *                 ColDef(name="index", width=3, title='', cmap=matplotlib.cm.Reds),             # <<<<<<<<<<<<<<
 * 
 *             ]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_n_s_index) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_width, __pyx_int_3) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_title, __pyx_kp_s__29) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_matplotlib); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_cm); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_Reds); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cmap, __pyx_t_16) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":414
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 ColDef(name="", width=50, title=''),
 *                 ColDef(name="index", width=3, title='', cmap=matplotlib.cm.Reds),
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_12);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_12)) __PYX_ERR(0, 414, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_16);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_16)) __PYX_ERR(0, 414, __pyx_L1_error);
  __pyx_t_12 = 0;
  __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_column_definitions, __pyx_t_2) < 0) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":408
 *         table_title = f'{self.datetime_str}-'
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_tab = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":420
 *             ]
 *         )
 *         for i in range(0, max_level):             # <<<<<<<<<<<<<<
 *             tab.rows[i].set_fontsize(foot_size)
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 420, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_max_level);
  __Pyx_GIVEREF(__pyx_v_max_level);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_max_level)) __PYX_ERR(0, 420, __pyx_L1_error);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
    __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_7 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 420, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
        #else
        __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 420, __pyx_L1_error)
        #else
        __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_11(__pyx_t_2);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 420, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":421
 *         )
 *         for i in range(0, max_level):
 *             tab.rows[i].set_fontsize(foot_size)             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tab, __pyx_n_s_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_set_fontsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_foot_size};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":420
 *             ]
 *         )
 *         for i in range(0, max_level):             # <<<<<<<<<<<<<<
 *             tab.rows[i].set_fontsize(foot_size)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":424
 * 
 *         ##
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_16);
  __pyx_t_16 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u__11);
  __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_16);
  __pyx_t_16 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u_png);
  __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_v_table_save_path = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":425
 *         ##
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # plt.show()
 *         plt.close()
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 425, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_facecolor, __pyx_t_4) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_16, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":427
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":428
 *         # plt.show()
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 428, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":429
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":367
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotStockUplimtLadder(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotStockUplimtLadder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_max_level);
  __Pyx_XDECREF(__pyx_v_foot_size);
  __Pyx_XDECREF(__pyx_v_max_rows);
  __Pyx_XDECREF(__pyx_v_first_uplimit_num);
  __Pyx_XDECREF(__pyx_v_per_row_num);
  __Pyx_XDECREF(__pyx_v_pre_fig_row);
  __Pyx_XDECREF(__pyx_v_interval);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict_);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_codes_list);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_codes_str);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":431
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):             # <<<<<<<<<<<<<<
 * 
 *         if mode not in ['industry', 'concept']:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_27plotHotColdIndustryConceptFrequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_27plotHotColdIndustryConceptFrequency = {"plotHotColdIndustryConceptFrequency", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_27plotHotColdIndustryConceptFrequency, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_27plotHotColdIndustryConceptFrequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_show_fig = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdIndustryConceptFrequency (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mode,&__pyx_n_s_show_fig,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_industry)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_show_fig);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdIndustryConceptFrequency") < 0)) __PYX_ERR(0, 431, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_show_fig = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdIndustryConceptFrequency", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 431, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndustryConceptFrequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_26plotHotColdIndustryConceptFrequency(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_show_fig);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_26plotHotColdIndustryConceptFrequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_show_fig) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_near_day = NULL;
  PyObject *__pyx_v_new_short_day_dict = NULL;
  PyObject *__pyx_v_key_day = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_column_name_list = NULL;
  PyObject *__pyx_v_index_list = NULL;
  PyObject *__pyx_v_up_row_index = NULL;
  PyObject *__pyx_v_down_row_index = NULL;
  PyObject *__pyx_v_foot_size = NULL;
  PyObject *__pyx_v_row_num = NULL;
  PyObject *__pyx_v_row_inch = NULL;
  Py_ssize_t __pyx_v_col_inch;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_7genexpr__pyx_v_col_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdIndustryConceptFrequency", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":433
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):
 * 
 *         if mode not in ['industry', 'concept']:             # <<<<<<<<<<<<<<
 *             raise ValueError("mode must switch in ['industry','concept']")
 * 
 */
  __Pyx_INCREF(__pyx_v_mode);
  __pyx_t_1 = __pyx_v_mode;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_industry, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 433, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_concept, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 433, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  if (unlikely(__pyx_t_3)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":434
 * 
 *         if mode not in ['industry', 'concept']:
 *             raise ValueError("mode must switch in ['industry','concept']")             # <<<<<<<<<<<<<<
 * 
 *         if mode == 'industry':
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 434, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":433
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):
 * 
 *         if mode not in ['industry', 'concept']:             # <<<<<<<<<<<<<<
 *             raise ValueError("mode must switch in ['industry','concept']")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":436
 *             raise ValueError("mode must switch in ['industry','concept']")
 * 
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             strategy_key_name = 'hot_industry_frequency'
 *         else:
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 436, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":437
 * 
 *         if mode == 'industry':
 *             strategy_key_name = 'hot_industry_frequency'             # <<<<<<<<<<<<<<
 *         else:
 *             strategy_key_name = 'hot_concept_frequency'
 */
    __Pyx_INCREF(__pyx_n_s_hot_industry_frequency);
    __pyx_v_strategy_key_name = __pyx_n_s_hot_industry_frequency;

    /* "tbstock/tradeStrategy/stockStrategy.py":436
 *             raise ValueError("mode must switch in ['industry','concept']")
 * 
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             strategy_key_name = 'hot_industry_frequency'
 *         else:
 */
    goto __pyx_L6;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":439
 *             strategy_key_name = 'hot_industry_frequency'
 *         else:
 *             strategy_key_name = 'hot_concept_frequency'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_hot_concept_frequency);
    __pyx_v_strategy_key_name = __pyx_n_s_hot_concept_frequency;
  }
  __pyx_L6:;

  /* "tbstock/tradeStrategy/stockStrategy.py":442
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (!__pyx_t_2);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":443
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":444
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":442
 * 
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":447
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         near_day = strategy_data_dict['near_day']
 *         del strategy_data_dict['near_day']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":448
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         near_day = strategy_data_dict['near_day']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['near_day']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_near_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_near_day = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":449
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         near_day = strategy_data_dict['near_day']
 *         del strategy_data_dict['near_day']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_near_day) < 0))) __PYX_ERR(0, 449, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":450
 *         near_day = strategy_data_dict['near_day']
 *         del strategy_data_dict['near_day']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 450, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":451
 *         del strategy_data_dict['near_day']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 451, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":452
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         new_short_day_dict = {}
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 452, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":451
 *         del strategy_data_dict['near_day']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":454
 *             del strategy_data_dict['strategy_img_path']
 * 
 *         new_short_day_dict = {}             # <<<<<<<<<<<<<<
 *         for key_day, value in strategy_data_dict.items():
 *             if len(key_day) == 8:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_new_short_day_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":455
 * 
 *         new_short_day_dict = {}
 *         for key_day, value in strategy_data_dict.items():             # <<<<<<<<<<<<<<
 *             if len(key_day) == 8:
 *                 new_short_day_dict[key_day[-4:]] = value
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_strategy_data_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 455, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_strategy_data_dict, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_11, &__pyx_t_7, &__pyx_t_4, &__pyx_t_6, NULL, __pyx_t_12);
    if (unlikely(__pyx_t_13 == 0)) break;
    if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key_day, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":456
 *         new_short_day_dict = {}
 *         for key_day, value in strategy_data_dict.items():
 *             if len(key_day) == 8:             # <<<<<<<<<<<<<<
 *                 new_short_day_dict[key_day[-4:]] = value
 *             else:
 */
    __pyx_t_14 = PyObject_Length(__pyx_v_key_day); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 456, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_14 == 8);
    if (__pyx_t_3) {

      /* "tbstock/tradeStrategy/stockStrategy.py":457
 *         for key_day, value in strategy_data_dict.items():
 *             if len(key_day) == 8:
 *                 new_short_day_dict[key_day[-4:]] = value             # <<<<<<<<<<<<<<
 *             else:
 *                 new_short_day_dict[key_day] = value
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_key_day, -4L, 0, NULL, NULL, &__pyx_slice__31, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely((PyDict_SetItem(__pyx_v_new_short_day_dict, __pyx_t_6, __pyx_v_value) < 0))) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":456
 *         new_short_day_dict = {}
 *         for key_day, value in strategy_data_dict.items():
 *             if len(key_day) == 8:             # <<<<<<<<<<<<<<
 *                 new_short_day_dict[key_day[-4:]] = value
 *             else:
 */
      goto __pyx_L13;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":459
 *                 new_short_day_dict[key_day[-4:]] = value
 *             else:
 *                 new_short_day_dict[key_day] = value             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    /*else*/ {
      if (unlikely((PyDict_SetItem(__pyx_v_new_short_day_dict, __pyx_v_key_day, __pyx_v_value) < 0))) __PYX_ERR(0, 459, __pyx_L1_error)
    }
    __pyx_L13:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":462
 * 
 *         #
 *         strategy_data_df = pd.DataFrame(new_short_day_dict)             # <<<<<<<<<<<<<<
 *         strategy_data_df.set_index('index', inplace=True)
 *         column_name_list = strategy_data_df.columns.values
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_new_short_day_dict};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":463
 *         #
 *         strategy_data_df = pd.DataFrame(new_short_day_dict)
 *         strategy_data_df.set_index('index', inplace=True)             # <<<<<<<<<<<<<<
 *         column_name_list = strategy_data_df.columns.values
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__32, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":464
 *         strategy_data_df = pd.DataFrame(new_short_day_dict)
 *         strategy_data_df.set_index('index', inplace=True)
 *         column_name_list = strategy_data_df.columns.values             # <<<<<<<<<<<<<<
 * 
 *         index_list = list(strategy_data_dict['index'].values())
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_columns); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_column_name_list = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":466
 *         column_name_list = strategy_data_df.columns.values
 * 
 *         index_list = list(strategy_data_dict['index'].values())             # <<<<<<<<<<<<<<
 *         up_row_index = index_list.index('')
 *         down_row_index = index_list.index('')
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_index_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":467
 * 
 *         index_list = list(strategy_data_dict['index'].values())
 *         up_row_index = index_list.index('')             # <<<<<<<<<<<<<<
 *         down_row_index = index_list.index('')
 * 
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_index_list, __pyx_kp_s__33); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_up_row_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":468
 *         index_list = list(strategy_data_dict['index'].values())
 *         up_row_index = index_list.index('')
 *         down_row_index = index_list.index('')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_index, __pyx_v_index_list, __pyx_kp_s__34); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_down_row_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":471
 * 
 *         #
 *         foot_size = 7  # 7             # <<<<<<<<<<<<<<
 *         row_num = len(index_list)  #
 *         row_inch = math.ceil(row_num * (foot_size * 2 / 72) + 1)
 */
  __Pyx_INCREF(__pyx_int_7);
  __pyx_v_foot_size = __pyx_int_7;

  /* "tbstock/tradeStrategy/stockStrategy.py":472
 *         #
 *         foot_size = 7  # 7
 *         row_num = len(index_list)  #             # <<<<<<<<<<<<<<
 *         row_inch = math.ceil(row_num * (foot_size * 2 / 72) + 1)
 *         col_inch = len(strategy_data_dict)
 */
  __pyx_t_11 = __Pyx_PyList_GET_SIZE(__pyx_v_index_list); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 472, __pyx_L1_error)
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_row_num = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":473
 *         foot_size = 7  # 7
 *         row_num = len(index_list)  #
 *         row_inch = math.ceil(row_num * (foot_size * 2 / 72) + 1)             # <<<<<<<<<<<<<<
 *         col_inch = len(strategy_data_dict)
 *         print(f"row_inch = {row_inch}, col_inch = {col_inch}")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_math); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ceil); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_MultiplyObjC(__pyx_v_foot_size, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_4, __pyx_int_72, 72, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_row_num, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_row_inch = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":474
 *         row_num = len(index_list)  #
 *         row_inch = math.ceil(row_num * (foot_size * 2 / 72) + 1)
 *         col_inch = len(strategy_data_dict)             # <<<<<<<<<<<<<<
 *         print(f"row_inch = {row_inch}, col_inch = {col_inch}")
 * 
 */
  __pyx_t_11 = PyObject_Length(__pyx_v_strategy_data_dict); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 474, __pyx_L1_error)
  __pyx_v_col_inch = __pyx_t_11;

  /* "tbstock/tradeStrategy/stockStrategy.py":475
 *         row_inch = math.ceil(row_num * (foot_size * 2 / 72) + 1)
 *         col_inch = len(strategy_data_dict)
 *         print(f"row_inch = {row_inch}, col_inch = {col_inch}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_row_inch);
  __pyx_t_11 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_row_inch);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_row_inch);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_row_inch, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u_col_inch);
  __pyx_t_11 += 13;
  __Pyx_GIVEREF(__pyx_kp_u_col_inch);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_col_inch);
  __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_col_inch, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":478
 * 
 *         #
 *         fig, ax = plt.subplots(figsize=(col_inch, row_inch))             # <<<<<<<<<<<<<<
 *         table_title = f"{self.datetime_str}-{near_day}{mode.upper()}"
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_subplots); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_col_inch); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_row_inch);
  __Pyx_GIVEREF(__pyx_v_row_inch);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_row_inch)) __PYX_ERR(0, 478, __pyx_L1_error);
  __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_figsize, __pyx_t_4) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 478, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    index = 0; __pyx_t_1 = __pyx_t_15(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_6 = __pyx_t_15(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_9), 2) < 0) __PYX_ERR(0, 478, __pyx_L1_error)
    __pyx_t_15 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_15 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 478, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_ax = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":479
 *         #
 *         fig, ax = plt.subplots(figsize=(col_inch, row_inch))
 *         table_title = f"{self.datetime_str}-{near_day}{mode.upper()}"             # <<<<<<<<<<<<<<
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)
 *         tab = Table(
 */
  __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = 0;
  __pyx_t_8 = 127;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_kp_u__35);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__35);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__35);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_near_day, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_n_u__36);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 6;
  __Pyx_GIVEREF(__pyx_n_u__36);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__36);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_upper); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_n_u__37);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 3;
  __Pyx_GIVEREF(__pyx_n_u__37);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_n_u__37);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":480
 *         fig, ax = plt.subplots(figsize=(col_inch, row_inch))
 *         table_title = f"{self.datetime_str}-{near_day}{mode.upper()}"
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             strategy_data_df,
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = 0;
  __pyx_t_8 = 127;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__35);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 3;
  __Pyx_GIVEREF(__pyx_kp_u__35);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__35);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_near_day, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_n_u__36);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 6;
  __Pyx_GIVEREF(__pyx_n_u__36);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u__36);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mode, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_16 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_kp_u__38);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 9;
  __Pyx_GIVEREF(__pyx_kp_u__38);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_kp_u__38);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_n_u_6);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_11 += 9;
  __Pyx_GIVEREF(__pyx_n_u_6);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_n_u_6);
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 8, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fontsize, __pyx_int_10) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":481
 *         table_title = f"{self.datetime_str}-{near_day}{mode.upper()}"
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Table); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "tbstock/tradeStrategy/stockStrategy.py":482
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)
 *         tab = Table(
 *             strategy_data_df,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_strategy_data_df);
  __Pyx_GIVEREF(__pyx_v_strategy_data_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strategy_data_df)) __PYX_ERR(0, 481, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":483
 *         tab = Table(
 *             strategy_data_df,
 *             textprops={             # <<<<<<<<<<<<<<
 *                 'ha': 'center',  #
 *             },
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "tbstock/tradeStrategy/stockStrategy.py":484
 *             strategy_data_df,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_textprops, __pyx_t_6) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":488
 *             column_definitions=[
 *                                    # text_cmap=matplotlib.cm.Reds,
 *                                    ColDef(name="index", title=f"{mode}"),             # <<<<<<<<<<<<<<
 *                                ] + [
 *                                    # PiYG_r  text_cmap
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_16 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_name, __pyx_n_s_index) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
  __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_title, __pyx_t_17) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":486
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                                    # text_cmap=matplotlib.cm.Reds,
 *                                    ColDef(name="index", title=f"{mode}"),
 */
  __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_17);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_17)) __PYX_ERR(0, 486, __pyx_L1_error);
  __pyx_t_17 = 0;
  { /* enter inner scope */

    /* "tbstock/tradeStrategy/stockStrategy.py":489
 *                                    # text_cmap=matplotlib.cm.Reds,
 *                                    ColDef(name="index", title=f"{mode}"),
 *                                ] + [             # <<<<<<<<<<<<<<
 *                                    # PiYG_r  text_cmap
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 */
    __pyx_t_17 = PyList_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 489, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_17);

    /* "tbstock/tradeStrategy/stockStrategy.py":492
 *                                    # PiYG_r  text_cmap
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 *                                    column_name_list[0:-1]             # <<<<<<<<<<<<<<
 *                                ] + [ColDef(name=column_name_list[-1],
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]
 */
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_column_name_list, 0, -1L, NULL, NULL, &__pyx_slice__39, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_18 = __pyx_t_6; __Pyx_INCREF(__pyx_t_18);
      __pyx_t_11 = 0;
      __pyx_t_19 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 492, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 492, __pyx_L18_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_19)) {
        if (likely(PyList_CheckExact(__pyx_t_18))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_18);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L18_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 492, __pyx_L18_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_18, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_18);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L18_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 492, __pyx_L18_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_18, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_19(__pyx_t_18);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 492, __pyx_L18_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_col_name, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":491
 *                                ] + [
 *                                    # PiYG_r  text_cmap
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in             # <<<<<<<<<<<<<<
 *                                    column_name_list[0:-1]
 *                                ] + [ColDef(name=column_name_list[-1],
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_20 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_20);
      if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_name, __pyx_7genexpr__pyx_v_col_name) < 0) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_n_s_normed_cmap); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_v_strategy_data_df, __pyx_7genexpr__pyx_v_col_name); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_22);
      __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_23);
      __Pyx_GIVEREF(__pyx_t_22);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_22)) __PYX_ERR(0, 491, __pyx_L18_error);
      __pyx_t_22 = 0;
      __pyx_t_22 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_22);
      __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_matplotlib); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_24);
      __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_cm); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_25);
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_bwr_r); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
      if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_cmap, __pyx_t_24) < 0) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_23, __pyx_t_22); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
      __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
      if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_text_cmap, __pyx_t_24) < 0) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
      __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_20); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 491, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_24);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_17, (PyObject*)__pyx_t_24))) __PYX_ERR(0, 489, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    }
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_col_name); __pyx_7genexpr__pyx_v_col_name = 0;
    goto __pyx_L22_exit_scope;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_col_name); __pyx_7genexpr__pyx_v_col_name = 0;
    goto __pyx_L1_error;
    __pyx_L22_exit_scope:;
  } /* exit inner scope */

  /* "tbstock/tradeStrategy/stockStrategy.py":489
 *                                    # text_cmap=matplotlib.cm.Reds,
 *                                    ColDef(name="index", title=f"{mode}"),
 *                                ] + [             # <<<<<<<<<<<<<<
 *                                    # PiYG_r  text_cmap
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 */
  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":493
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 *                                    column_name_list[0:-1]
 *                                ] + [ColDef(name=column_name_list[-1],             # <<<<<<<<<<<<<<
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_24 = __Pyx_GetItemInt(__pyx_v_column_name_list, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_name, __pyx_t_24) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":494
 *                                    column_name_list[0:-1]
 *                                ] + [ColDef(name=column_name_list[-1],
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]             # <<<<<<<<<<<<<<
 *         )
 *         tab.rows[up_row_index].set_facecolor('silver')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_normed_cmap); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_24);
  __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_column_name_list, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_strategy_data_df, __pyx_t_20); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_matplotlib); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_cm); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_23);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_autumn_r); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cmap, __pyx_t_22) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_20, __pyx_t_6); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_text_cmap, __pyx_t_22) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":493
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 *                                    column_name_list[0:-1]
 *                                ] + [ColDef(name=column_name_list[-1],             # <<<<<<<<<<<<<<
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]
 *         )
 */
  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, __pyx_t_16); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_GIVEREF(__pyx_t_22);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_22)) __PYX_ERR(0, 493, __pyx_L1_error);
  __pyx_t_22 = 0;
  __pyx_t_22 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_column_definitions, __pyx_t_22) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":481
 *         table_title = f"{self.datetime_str}-{near_day}{mode.upper()}"
 *         ax.set_title(f"{self.datetime_str}-{near_day}{mode.upper()}\n\n{mode}6", fontsize=10)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             strategy_data_df,
 *             textprops={
 */
  __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_tab = __pyx_t_22;
  __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":496
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]
 *         )
 *         tab.rows[up_row_index].set_facecolor('silver')             # <<<<<<<<<<<<<<
 *         tab.rows[down_row_index].set_facecolor('silver')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tab, __pyx_n_s_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_up_row_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_facecolor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_silver};
    __pyx_t_22 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":497
 *         )
 *         tab.rows[up_row_index].set_facecolor('silver')
 *         tab.rows[down_row_index].set_facecolor('silver')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tab, __pyx_n_s_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_down_row_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_facecolor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_silver};
    __pyx_t_22 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":500
 * 
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:
 */
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = 0;
  __pyx_t_8 = 127;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_11 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__11);
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
  __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_11 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u_png);
  __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_22, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_table_save_path = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":501
 *         #
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         if show_fig:
 *             plt.show()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 501, __pyx_L1_error);
  __pyx_t_22 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_18 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_18)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_18);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_18, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_facecolor, __pyx_t_1) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, __pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":502
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:             # <<<<<<<<<<<<<<
 *             plt.show()
 *         plt.close()
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_show_fig); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 502, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":503
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:
 *             plt.show()             # <<<<<<<<<<<<<<
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}
 */
    __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_n_s_plt); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_22);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_show); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __pyx_t_22 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_22 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_22)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_22);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_22, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":502
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         if show_fig:             # <<<<<<<<<<<<<<
 *             plt.show()
 *         plt.close()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":504
 *         if show_fig:
 *             plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_plt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_close); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_22))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_22);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_22);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_22, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_22, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":505
 *             plt.show()
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 505, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":506
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdIndustryTable(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_22 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_22);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_22, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":431
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):             # <<<<<<<<<<<<<<
 * 
 *         if mode not in ['industry', 'concept']:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndustryConceptFrequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_near_day);
  __Pyx_XDECREF(__pyx_v_new_short_day_dict);
  __Pyx_XDECREF(__pyx_v_key_day);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_column_name_list);
  __Pyx_XDECREF(__pyx_v_index_list);
  __Pyx_XDECREF(__pyx_v_up_row_index);
  __Pyx_XDECREF(__pyx_v_down_row_index);
  __Pyx_XDECREF(__pyx_v_foot_size);
  __Pyx_XDECREF(__pyx_v_row_num);
  __Pyx_XDECREF(__pyx_v_row_inch);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_col_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":508
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_29plotHotColdIndustryTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_29plotHotColdIndustryTable = {"plotHotColdIndustryTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_29plotHotColdIndustryTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_29plotHotColdIndustryTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdIndustryTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdIndustryTable") < 0)) __PYX_ERR(0, 508, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdIndustryTable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 508, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndustryTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_28plotHotColdIndustryTable(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_28plotHotColdIndustryTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdIndustryTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":509
 * 
 *     def plotHotColdIndustryTable(self):
 *         strategy_key_name = 'hot_cold_industry_table'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_industry_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_industry_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":511
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":512
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":513
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         type_name = ''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":511
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":515
 *             return False
 * 
 *         type_name = ''             # <<<<<<<<<<<<<<
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__40);
  __pyx_v_type_name = __pyx_kp_s__40;

  /* "tbstock/tradeStrategy/stockStrategy.py":516
 * 
 *         type_name = ''
 *         self._plotHotColdTables(strategy_key_name, type_name)             # <<<<<<<<<<<<<<
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdTables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_strategy_key_name, __pyx_v_type_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":508
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndustryTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":518
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_31_plotHotColdTables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_31_plotHotColdTables = {"_plotHotColdTables", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_31_plotHotColdTables, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_31_plotHotColdTables(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_strategy_key_name = 0;
  PyObject *__pyx_v_type_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_plotHotColdTables (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_strategy_key_name,&__pyx_n_s_type_name,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strategy_key_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotHotColdTables", 1, 3, 3, 1); __PYX_ERR(0, 518, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotHotColdTables", 1, 3, 3, 2); __PYX_ERR(0, 518, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_plotHotColdTables") < 0)) __PYX_ERR(0, 518, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_strategy_key_name = values[1];
    __pyx_v_type_name = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_plotHotColdTables", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 518, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._plotHotColdTables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_30_plotHotColdTables(__pyx_self, __pyx_v_self, __pyx_v_strategy_key_name, __pyx_v_type_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_30_plotHotColdTables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_strategy_key_name, PyObject *__pyx_v_type_name) {
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_num_rank = NULL;
  PyObject *__pyx_v_near_num = NULL;
  PyObject *__pyx_v_all_time_day_df = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value_dict = NULL;
  PyObject *__pyx_v_last_five_items = NULL;
  PyObject *__pyx_v_last_five_dict = NULL;
  PyObject *__pyx_v_time_key = NULL;
  PyObject *__pyx_v_time_value = NULL;
  PyObject *__pyx_v_key_pandas = NULL;
  PyObject *__pyx_v_base_list = NULL;
  PyObject *__pyx_v_color_list = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_new_base_list = NULL;
  PyObject *__pyx_v_table_title = NULL;
  PyObject *__pyx_v_col_title = NULL;
  PyObject *__pyx_v_sub_strategy_name = NULL;
  PyObject *__pyx_v_table_save_png_path = NULL;
  PyObject *__pyx_v_all_time_week_df = NULL;
  PyObject *__pyx_v_year_str = NULL;
  PyObject *__pyx_v_all_time_month_df = NULL;
  PyObject *__pyx_v_all_near_df = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_j = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_j = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_j = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *(*__pyx_t_18)(PyObject *);
  PyObject *(*__pyx_t_19)(PyObject *);
  Py_UCS4 __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_plotHotColdTables", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":519
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}             # <<<<<<<<<<<<<<
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         num_rank = strategy_data_dict['num_tr']
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_n_s_strategy_img_path, __pyx_t_1) < 0))) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":520
 *     def _plotHotColdTables(self, strategy_key_name, type_name):
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":521
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         num_rank = strategy_data_dict['num_tr']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_num_rank = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":522
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_num_tr) < 0))) __PYX_ERR(0, 522, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":523
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 523, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":524
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 524, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":525
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         ## day,week,month,year
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 525, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":524
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":529
 *         ## day,week,month,year
 *         ## day
 *         near_num = 0             # <<<<<<<<<<<<<<
 *         all_time_day_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_near_num = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":530
 *         ## day
 *         near_num = 0
 *         all_time_day_df = pd.DataFrame()             # <<<<<<<<<<<<<<
 *         for key, value_dict in strategy_data_dict.items():
 *             if key != 'day':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_all_time_day_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":531
 *         near_num = 0
 *         all_time_day_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():             # <<<<<<<<<<<<<<
 *             if key != 'day':
 *                 continue
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_strategy_data_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 531, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_strategy_data_dict, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_9);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_dict, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":532
 *         all_time_day_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key != 'day':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_day, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 532, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":533
 *         for key, value_dict in strategy_data_dict.items():
 *             if key != 'day':
 *                 continue             # <<<<<<<<<<<<<<
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 */
      goto __pyx_L4_continue;

      /* "tbstock/tradeStrategy/stockStrategy.py":532
 *         all_time_day_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key != 'day':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":534
 *             if key != 'day':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_value_dict); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 534, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":535
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_11) {
      } else {
        __pyx_t_6 = __pyx_t_11;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_value_dict, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 535, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_12 = (!__pyx_t_11);
      __pyx_t_6 = __pyx_t_12;
      __pyx_L9_bool_binop_done:;
      if (__pyx_t_6) {

        /* "tbstock/tradeStrategy/stockStrategy.py":536
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue             # <<<<<<<<<<<<<<
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 */
        goto __pyx_L4_continue;

        /* "tbstock/tradeStrategy/stockStrategy.py":535
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":537
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 *                 del value_dict['updated']             # <<<<<<<<<<<<<<
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 */
      if (unlikely((PyObject_DelItem(__pyx_v_value_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 537, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":538
 *                     continue
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]             # <<<<<<<<<<<<<<
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_t_4, -5L, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_last_five_items, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":539
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)             # <<<<<<<<<<<<<<
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():  # time_key time_value dict
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_last_five_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_last_five_dict, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":540
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)             # <<<<<<<<<<<<<<
 *                 for time_key, time_value in last_five_dict.items():  # time_key time_value dict
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 */
      __pyx_t_13 = PyDict_Size(__pyx_v_last_five_dict); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 540, __pyx_L1_error)
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_near_num, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":541
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():  # time_key time_value dict             # <<<<<<<<<<<<<<
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_day_df = pd.concat([key_pandas, all_time_day_df], ignore_index=False)
 */
      __pyx_t_13 = 0;
      __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_last_five_dict, 1, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_4;
      __pyx_t_4 = 0;
      while (1) {
        __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_14, &__pyx_t_13, &__pyx_t_4, &__pyx_t_2, NULL, __pyx_t_10);
        if (unlikely(__pyx_t_15 == 0)) break;
        if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_time_key, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_time_value, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":542
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():  # time_key time_value dict
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)             # <<<<<<<<<<<<<<
 *                     all_time_day_df = pd.concat([key_pandas, all_time_day_df], ignore_index=False)
 * 
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertDictToPandas); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_time_key, __pyx_v_time_value};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_key_pandas, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":543
 *                 for time_key, time_value in last_five_dict.items():  # time_key time_value dict
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_day_df = pd.concat([key_pandas, all_time_day_df], ignore_index=False)             # <<<<<<<<<<<<<<
 * 
 *         # print('all_time_day_df', all_time_day_df)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_concat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_key_pandas);
        __Pyx_GIVEREF(__pyx_v_key_pandas);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_key_pandas)) __PYX_ERR(0, 543, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_all_time_day_df);
        __Pyx_GIVEREF(__pyx_v_all_time_day_df);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_v_all_time_day_df)) __PYX_ERR(0, 543, __pyx_L1_error);
        __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_index, Py_False) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
        __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_16, __pyx_t_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_all_time_day_df, __pyx_t_17);
        __pyx_t_17 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":534
 *             if key != 'day':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    }
    __pyx_L4_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":547
 *         # print('all_time_day_df', all_time_day_df)
 *         #
 *         if not all_time_day_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_time_day_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_12 = (!__pyx_t_6);
  if (__pyx_t_12) {

    /* "tbstock/tradeStrategy/stockStrategy.py":548
 *         #
 *         if not all_time_day_df.empty:
 *             base_list = range(0, num_rank)             # <<<<<<<<<<<<<<
 *             color_list = []
 *             for i in range(0, near_num, 2):  # index
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 548, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_num_rank);
    __Pyx_GIVEREF(__pyx_v_num_rank);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_num_rank)) __PYX_ERR(0, 548, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_base_list = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":549
 *         if not all_time_day_df.empty:
 *             base_list = range(0, num_rank)
 *             color_list = []             # <<<<<<<<<<<<<<
 *             for i in range(0, near_num, 2):  # index
 *                 new_base_list = [j + num_rank * i for j in base_list]
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_color_list = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":550
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):  # index             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 550, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_near_num);
    __Pyx_GIVEREF(__pyx_v_near_num);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_near_num)) __PYX_ERR(0, 550, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_2)) __PYX_ERR(0, 550, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_8 = 0;
      __pyx_t_18 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 550, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_18)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 550, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 550, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 550, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 550, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_18(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 550, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":551
 *             color_list = []
 *             for i in range(0, near_num, 2):  # index
 *                 new_base_list = [j + num_rank * i for j in base_list]             # <<<<<<<<<<<<<<
 *                 color_list = color_list + new_base_list
 * 
 */
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (likely(PyList_CheckExact(__pyx_v_base_list)) || PyTuple_CheckExact(__pyx_v_base_list)) {
          __pyx_t_17 = __pyx_v_base_list; __Pyx_INCREF(__pyx_t_17);
          __pyx_t_7 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_base_list); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 551, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 551, __pyx_L18_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_17))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 551, __pyx_L18_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 551, __pyx_L18_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L18_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 551, __pyx_L18_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 551, __pyx_L18_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L18_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_19(__pyx_t_17);
            if (unlikely(!__pyx_t_2)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 551, __pyx_L18_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_j, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyNumber_Multiply(__pyx_v_num_rank, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = PyNumber_Add(__pyx_8genexpr1__pyx_v_j, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 551, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 551, __pyx_L18_error)
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_j); __pyx_8genexpr1__pyx_v_j = 0;
        goto __pyx_L22_exit_scope;
        __pyx_L18_error:;
        __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_j); __pyx_8genexpr1__pyx_v_j = 0;
        goto __pyx_L1_error;
        __pyx_L22_exit_scope:;
      } /* exit inner scope */
      __Pyx_XDECREF_SET(__pyx_v_new_base_list, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":552
 *             for i in range(0, near_num, 2):  # index
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list             # <<<<<<<<<<<<<<
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 */
      __pyx_t_1 = PyNumber_Add(__pyx_v_color_list, __pyx_v_new_base_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":550
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):  # index             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":554
 *                 color_list = color_list + new_base_list
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'             # <<<<<<<<<<<<<<
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_day'
 */
    __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = 0;
    __pyx_t_20 = 127;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_kp_u__35);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__35);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__35);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_near_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_n_u__41);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_n_u__41);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_n_u__41);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_n_u__42);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 5;
    __Pyx_GIVEREF(__pyx_n_u__42);
    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_n_u__42);
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_8, __pyx_t_20); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_table_title = ((PyObject*)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":555
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']             # <<<<<<<<<<<<<<
 *             sub_strategy_name = strategy_key_name + '_day'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 */
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_17, __pyx_kp_u__4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_kp_s__43);
    __Pyx_GIVEREF(__pyx_kp_s__43);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 0, __pyx_kp_s__43)) __PYX_ERR(0, 555, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 1, __pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_v_col_title = ((PyObject*)__pyx_t_17);
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":556
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_day'             # <<<<<<<<<<<<<<
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_day_df, table_title, table_save_png_path, col_title, color_list)
 */
    __pyx_t_17 = PyNumber_Add(__pyx_v_strategy_key_name, __pyx_n_s_day_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 556, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_v_sub_strategy_name = __pyx_t_17;
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":557
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_day'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"             # <<<<<<<<<<<<<<
 *             self._plotTablePandas(all_time_day_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = 0;
    __pyx_t_20 = 127;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_16);
    __pyx_t_16 = 0;
    __Pyx_INCREF(__pyx_kp_u__11);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__11);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__11);
    __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_sub_strategy_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_16);
    __pyx_t_16 = 0;
    __Pyx_INCREF(__pyx_kp_u_png);
    __pyx_t_8 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_png);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_png);
    __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_8, __pyx_t_20); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_v_table_save_png_path = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":558
 *             sub_strategy_name = strategy_key_name + '_day'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_day_df, table_title, table_save_png_path, col_title, color_list)             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 * 
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTablePandas); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_17, __pyx_v_all_time_day_df, __pyx_v_table_title, __pyx_v_table_save_png_path, __pyx_v_col_title, __pyx_v_color_list};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":559
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_day_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path             # <<<<<<<<<<<<<<
 * 
 *         ## week
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_16, __pyx_n_s_strategy_img_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_title, __pyx_v_table_save_png_path) < 0))) __PYX_ERR(0, 559, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":547
 *         # print('all_time_day_df', all_time_day_df)
 *         #
 *         if not all_time_day_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":562
 * 
 *         ## week
 *         all_time_week_df = pd.DataFrame()             # <<<<<<<<<<<<<<
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'week':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_pd); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __pyx_v_all_time_week_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":563
 *         ## week
 *         all_time_week_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():             # <<<<<<<<<<<<<<
 *             if key.startswith('near') or key != 'week':
 *                 continue
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_strategy_data_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 563, __pyx_L1_error)
  }
  __pyx_t_17 = __Pyx_dict_iterator(__pyx_v_strategy_data_dict, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_17;
  __pyx_t_17 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_7, &__pyx_t_8, &__pyx_t_17, &__pyx_t_16, NULL, __pyx_t_9);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_dict, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":564
 *         all_time_week_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'week':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_startswith); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_near};
      __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (!__pyx_t_6) {
    } else {
      __pyx_t_12 = __pyx_t_6;
      goto __pyx_L27_bool_binop_done;
    }
    __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_week, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 564, __pyx_L1_error)
    __pyx_t_12 = __pyx_t_6;
    __pyx_L27_bool_binop_done:;
    if (__pyx_t_12) {

      /* "tbstock/tradeStrategy/stockStrategy.py":565
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'week':
 *                 continue             # <<<<<<<<<<<<<<
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 */
      goto __pyx_L24_continue;

      /* "tbstock/tradeStrategy/stockStrategy.py":564
 *         all_time_week_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'week':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":566
 *             if key.startswith('near') or key != 'week':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_value_dict); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
    if (__pyx_t_12) {

      /* "tbstock/tradeStrategy/stockStrategy.py":567
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_time); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (__pyx_t_6) {
      } else {
        __pyx_t_12 = __pyx_t_6;
        goto __pyx_L31_bool_binop_done;
      }
      __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_v_value_dict, __pyx_n_s_updated); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_11 = (!__pyx_t_6);
      __pyx_t_12 = __pyx_t_11;
      __pyx_L31_bool_binop_done:;
      if (__pyx_t_12) {

        /* "tbstock/tradeStrategy/stockStrategy.py":568
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue             # <<<<<<<<<<<<<<
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 */
        goto __pyx_L24_continue;

        /* "tbstock/tradeStrategy/stockStrategy.py":567
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":569
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 *                 del value_dict['updated']             # <<<<<<<<<<<<<<
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 */
      if (unlikely((PyObject_DelItem(__pyx_v_value_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 569, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":570
 *                     continue
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]             # <<<<<<<<<<<<<<
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 */
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __pyx_t_1 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      }
      __pyx_t_17 = __Pyx_PySequence_ListKeepNew(__pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = __Pyx_PyList_GetSlice(__pyx_t_17, -5L, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_XDECREF_SET(__pyx_v_last_five_items, ((PyObject*)__pyx_t_16));
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":571
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)             # <<<<<<<<<<<<<<
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():
 */
      __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_last_five_items); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_XDECREF_SET(__pyx_v_last_five_dict, ((PyObject*)__pyx_t_16));
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":572
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)             # <<<<<<<<<<<<<<
 *                 for time_key, time_value in last_five_dict.items():
 *                     year_str = time_key[0:4]
 */
      __pyx_t_14 = PyDict_Size(__pyx_v_last_five_dict); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 572, __pyx_L1_error)
      __pyx_t_16 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 572, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF_SET(__pyx_v_near_num, __pyx_t_16);
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":573
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():             # <<<<<<<<<<<<<<
 *                     year_str = time_key[0:4]
 *                     time_key = time_key.replace(year_str, '')
 */
      __pyx_t_14 = 0;
      __pyx_t_17 = __Pyx_dict_iterator(__pyx_v_last_five_dict, 1, __pyx_n_s_items, (&__pyx_t_13), (&__pyx_t_10)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_XDECREF(__pyx_t_16);
      __pyx_t_16 = __pyx_t_17;
      __pyx_t_17 = 0;
      while (1) {
        __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_16, __pyx_t_13, &__pyx_t_14, &__pyx_t_17, &__pyx_t_1, NULL, __pyx_t_10);
        if (unlikely(__pyx_t_15 == 0)) break;
        if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 573, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_time_key, __pyx_t_17);
        __pyx_t_17 = 0;
        __Pyx_XDECREF_SET(__pyx_v_time_value, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":574
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():
 *                     year_str = time_key[0:4]             # <<<<<<<<<<<<<<
 *                     time_key = time_key.replace(year_str, '')
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_time_key, 0, 4, NULL, NULL, &__pyx_slice__44, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_year_str, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":575
 *                 for time_key, time_value in last_five_dict.items():
 *                     year_str = time_key[0:4]
 *                     time_key = time_key.replace(year_str, '')             # <<<<<<<<<<<<<<
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_week_df = pd.concat([key_pandas, all_time_week_df], ignore_index=False)
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_time_key, __pyx_n_s_replace); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_2 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_year_str, __pyx_kp_s__23};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_time_key, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":576
 *                     year_str = time_key[0:4]
 *                     time_key = time_key.replace(year_str, '')
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)             # <<<<<<<<<<<<<<
 *                     all_time_week_df = pd.concat([key_pandas, all_time_week_df], ignore_index=False)
 *         # print('all_time_week_df', all_time_week_df)
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertDictToPandas); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 576, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_2 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_time_key, __pyx_v_time_value};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_key_pandas, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":577
 *                     time_key = time_key.replace(year_str, '')
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_week_df = pd.concat([key_pandas, all_time_week_df], ignore_index=False)             # <<<<<<<<<<<<<<
 *         # print('all_time_week_df', all_time_week_df)
 *         #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_concat); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_key_pandas);
        __Pyx_GIVEREF(__pyx_v_key_pandas);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_key_pandas)) __PYX_ERR(0, 577, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_all_time_week_df);
        __Pyx_GIVEREF(__pyx_v_all_time_week_df);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_all_time_week_df)) __PYX_ERR(0, 577, __pyx_L1_error);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error);
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_index, Py_False) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_all_time_week_df, __pyx_t_4);
        __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":566
 *             if key.startswith('near') or key != 'week':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    }
    __pyx_L24_continue:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":580
 *         # print('all_time_week_df', all_time_week_df)
 *         #
 *         if not all_time_week_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_time_week_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = (!__pyx_t_12);
  if (__pyx_t_11) {

    /* "tbstock/tradeStrategy/stockStrategy.py":581
 *         #
 *         if not all_time_week_df.empty:
 *             base_list = range(0, num_rank)             # <<<<<<<<<<<<<<
 *             color_list = []
 *             for i in range(0, near_num, 2):
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 581, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_num_rank);
    __Pyx_GIVEREF(__pyx_v_num_rank);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_num_rank)) __PYX_ERR(0, 581, __pyx_L1_error);
    __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_base_list, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":582
 *         if not all_time_week_df.empty:
 *             base_list = range(0, num_rank)
 *             color_list = []             # <<<<<<<<<<<<<<
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 */
    __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_XDECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_16));
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":583
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_int_0)) __PYX_ERR(0, 583, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_near_num);
    __Pyx_GIVEREF(__pyx_v_near_num);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_near_num)) __PYX_ERR(0, 583, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_int_2)) __PYX_ERR(0, 583, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_16 = __pyx_t_3; __Pyx_INCREF(__pyx_t_16);
      __pyx_t_7 = 0;
      __pyx_t_18 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 583, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 583, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_18)) {
        if (likely(PyList_CheckExact(__pyx_t_16))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 583, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 583, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_16);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 583, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 583, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_18(__pyx_t_16);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 583, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":584
 *             color_list = []
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]             # <<<<<<<<<<<<<<
 *                 color_list = color_list + new_base_list
 *             # print(f"num_rank = {num_rank}")
 */
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(PyList_CheckExact(__pyx_v_base_list)) || PyTuple_CheckExact(__pyx_v_base_list)) {
          __pyx_t_4 = __pyx_v_base_list; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_8 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_base_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 584, __pyx_L40_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_4))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 584, __pyx_L40_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 584, __pyx_L40_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L40_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 584, __pyx_L40_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 584, __pyx_L40_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L40_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
            }
          } else {
            __pyx_t_1 = __pyx_t_19(__pyx_t_4);
            if (unlikely(!__pyx_t_1)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 584, __pyx_L40_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_j, __pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_1 = PyNumber_Multiply(__pyx_v_num_rank, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = PyNumber_Add(__pyx_8genexpr2__pyx_v_j, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 584, __pyx_L40_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_j); __pyx_8genexpr2__pyx_v_j = 0;
        goto __pyx_L44_exit_scope;
        __pyx_L40_error:;
        __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_j); __pyx_8genexpr2__pyx_v_j = 0;
        goto __pyx_L1_error;
        __pyx_L44_exit_scope:;
      } /* exit inner scope */
      __Pyx_XDECREF_SET(__pyx_v_new_base_list, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":585
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list             # <<<<<<<<<<<<<<
 *             # print(f"num_rank = {num_rank}")
 *             # print(f"color_list = {color_list}")
 */
      __pyx_t_3 = PyNumber_Add(__pyx_v_color_list, __pyx_v_new_base_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":583
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":590
 *             # print(f"all_time_week_df rows = {all_time_week_df.shape[0]}")
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'             # <<<<<<<<<<<<<<
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_week'
 */
    __pyx_t_16 = PyTuple_New(6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = 0;
    __pyx_t_20 = 127;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_kp_u__35);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_7 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__35);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_kp_u__35);
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_near_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_n_u__45);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_n_u__45);
    PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_n_u__45);
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_INCREF(__pyx_n_u__42);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_7 += 5;
    __Pyx_GIVEREF(__pyx_n_u__42);
    PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_n_u__42);
    __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_16, 6, __pyx_t_7, __pyx_t_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_title, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":591
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']             # <<<<<<<<<<<<<<
 *             sub_strategy_name = strategy_key_name + '_week'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 */
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u__4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s__45);
    __Pyx_GIVEREF(__pyx_n_s__45);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s__45)) __PYX_ERR(0, 591, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_16);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_16)) __PYX_ERR(0, 591, __pyx_L1_error);
    __pyx_t_16 = 0;
    __Pyx_XDECREF_SET(__pyx_v_col_title, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":592
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_week'             # <<<<<<<<<<<<<<
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_week_df, table_title, table_save_png_path, col_title, color_list)
 */
    __pyx_t_4 = PyNumber_Add(__pyx_v_strategy_key_name, __pyx_n_s_week_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_sub_strategy_name, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":593
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_week'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"             # <<<<<<<<<<<<<<
 *             self._plotTablePandas(all_time_week_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = PyTuple_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = 0;
    __pyx_t_20 = 127;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u__11);
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__11);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_kp_u__11);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_sub_strategy_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_png);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_png);
    PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_kp_u_png);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_16, 4, __pyx_t_7, __pyx_t_20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_save_png_path, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":594
 *             sub_strategy_name = strategy_key_name + '_week'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_week_df, table_title, table_save_png_path, col_title, color_list)             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTablePandas); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_all_time_week_df, __pyx_v_table_title, __pyx_v_table_save_png_path, __pyx_v_col_title, __pyx_v_color_list};
      __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":595
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_week_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path             # <<<<<<<<<<<<<<
 * 
 *         ## month
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_strategy_img_path); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_v_table_title, __pyx_v_table_save_png_path) < 0))) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":580
 *         # print('all_time_week_df', all_time_week_df)
 *         #
 *         if not all_time_week_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":598
 * 
 *         ## month
 *         all_time_month_df = pd.DataFrame()             # <<<<<<<<<<<<<<
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'month':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_all_time_month_df = __pyx_t_16;
  __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":599
 *         ## month
 *         all_time_month_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():             # <<<<<<<<<<<<<<
 *             if key.startswith('near') or key != 'month':
 *                 continue
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_strategy_data_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 599, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_strategy_data_dict, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_16);
  __pyx_t_16 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_16, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_2, NULL, __pyx_t_9);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_dict, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":600
 *         all_time_month_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'month':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_near};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_12) {
    } else {
      __pyx_t_11 = __pyx_t_12;
      goto __pyx_L49_bool_binop_done;
    }
    __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_month, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 600, __pyx_L1_error)
    __pyx_t_11 = __pyx_t_12;
    __pyx_L49_bool_binop_done:;
    if (__pyx_t_11) {

      /* "tbstock/tradeStrategy/stockStrategy.py":601
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'month':
 *                 continue             # <<<<<<<<<<<<<<
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 */
      goto __pyx_L46_continue;

      /* "tbstock/tradeStrategy/stockStrategy.py":600
 *         all_time_month_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if key.startswith('near') or key != 'month':             # <<<<<<<<<<<<<<
 *                 continue
 *             if value_dict:
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":602
 *             if key.startswith('near') or key != 'month':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_value_dict); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 602, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "tbstock/tradeStrategy/stockStrategy.py":603
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_12) {
      } else {
        __pyx_t_11 = __pyx_t_12;
        goto __pyx_L53_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_value_dict, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = (!__pyx_t_12);
      __pyx_t_11 = __pyx_t_6;
      __pyx_L53_bool_binop_done:;
      if (__pyx_t_11) {

        /* "tbstock/tradeStrategy/stockStrategy.py":604
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue             # <<<<<<<<<<<<<<
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 */
        goto __pyx_L46_continue;

        /* "tbstock/tradeStrategy/stockStrategy.py":603
 *                 continue
 *             if value_dict:
 *                 if self.lock_time and not value_dict['updated']:             # <<<<<<<<<<<<<<
 *                     continue
 *                 del value_dict['updated']
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":605
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 *                 del value_dict['updated']             # <<<<<<<<<<<<<<
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 */
      if (unlikely((PyObject_DelItem(__pyx_v_value_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 605, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":606
 *                     continue
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]             # <<<<<<<<<<<<<<
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_t_4, -5L, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_last_five_items, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":607
 *                 del value_dict['updated']
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)             # <<<<<<<<<<<<<<
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():
 */
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_last_five_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_last_five_dict, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":608
 *                 last_five_items = list(value_dict.items())[-5:]
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)             # <<<<<<<<<<<<<<
 *                 for time_key, time_value in last_five_dict.items():
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 */
      __pyx_t_13 = PyDict_Size(__pyx_v_last_five_dict); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 608, __pyx_L1_error)
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_near_num, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":609
 *                 last_five_dict = dict(last_five_items)
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():             # <<<<<<<<<<<<<<
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_month_df = pd.concat([key_pandas, all_time_month_df], ignore_index=False)
 */
      __pyx_t_13 = 0;
      __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_last_five_dict, 1, __pyx_n_s_items, (&__pyx_t_14), (&__pyx_t_10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_4;
      __pyx_t_4 = 0;
      while (1) {
        __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_14, &__pyx_t_13, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_10);
        if (unlikely(__pyx_t_15 == 0)) break;
        if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 609, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_time_key, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_time_value, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":610
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)             # <<<<<<<<<<<<<<
 *                     all_time_month_df = pd.concat([key_pandas, all_time_month_df], ignore_index=False)
 *         # print('all_time_month_df', all_time_month_df)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertDictToPandas); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_time_key, __pyx_v_time_value};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 610, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_key_pandas, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":611
 *                 for time_key, time_value in last_five_dict.items():
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 *                     all_time_month_df = pd.concat([key_pandas, all_time_month_df], ignore_index=False)             # <<<<<<<<<<<<<<
 *         # print('all_time_month_df', all_time_month_df)
 *         #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_concat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_key_pandas);
        __Pyx_GIVEREF(__pyx_v_key_pandas);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_key_pandas)) __PYX_ERR(0, 611, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_all_time_month_df);
        __Pyx_GIVEREF(__pyx_v_all_time_month_df);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_v_all_time_month_df)) __PYX_ERR(0, 611, __pyx_L1_error);
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ignore_index, Py_False) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
        __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 611, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_all_time_month_df, __pyx_t_17);
        __pyx_t_17 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":602
 *             if key.startswith('near') or key != 'month':
 *                 continue
 *             if value_dict:             # <<<<<<<<<<<<<<
 *                 if self.lock_time and not value_dict['updated']:
 *                     continue
 */
    }
    __pyx_L46_continue:;
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":614
 *         # print('all_time_month_df', all_time_month_df)
 *         #
 *         if not all_time_month_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_time_month_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_6 = (!__pyx_t_11);
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":615
 *         #
 *         if not all_time_month_df.empty:
 *             base_list = range(0, num_rank)             # <<<<<<<<<<<<<<
 *             color_list = []
 *             for i in range(0, near_num, 2):
 */
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_int_0)) __PYX_ERR(0, 615, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_num_rank);
    __Pyx_GIVEREF(__pyx_v_num_rank);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_v_num_rank)) __PYX_ERR(0, 615, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF_SET(__pyx_v_base_list, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":616
 *         if not all_time_month_df.empty:
 *             base_list = range(0, num_rank)
 *             color_list = []             # <<<<<<<<<<<<<<
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":617
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 617, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_near_num);
    __Pyx_GIVEREF(__pyx_v_near_num);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_near_num)) __PYX_ERR(0, 617, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_2)) __PYX_ERR(0, 617, __pyx_L1_error);
    __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_16)) || PyTuple_CheckExact(__pyx_t_16)) {
      __pyx_t_2 = __pyx_t_16; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_18 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 617, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    for (;;) {
      if (likely(!__pyx_t_18)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_16 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_16); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
          #else
          __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 617, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_16); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
          #else
          __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 617, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          #endif
        }
      } else {
        __pyx_t_16 = __pyx_t_18(__pyx_t_2);
        if (unlikely(!__pyx_t_16)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 617, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_16);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_16);
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":618
 *             color_list = []
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]             # <<<<<<<<<<<<<<
 *                 color_list = color_list + new_base_list
 * 
 */
      { /* enter inner scope */
        __pyx_t_16 = PyList_New(0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 618, __pyx_L62_error)
        __Pyx_GOTREF(__pyx_t_16);
        if (likely(PyList_CheckExact(__pyx_v_base_list)) || PyTuple_CheckExact(__pyx_v_base_list)) {
          __pyx_t_17 = __pyx_v_base_list; __Pyx_INCREF(__pyx_t_17);
          __pyx_t_7 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_17 = PyObject_GetIter(__pyx_v_base_list); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 618, __pyx_L62_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 618, __pyx_L62_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_17))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_17);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 618, __pyx_L62_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_17, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 618, __pyx_L62_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L62_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_17);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 618, __pyx_L62_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_17, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 618, __pyx_L62_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_17, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L62_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_19(__pyx_t_17);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 618, __pyx_L62_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_j, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = PyNumber_Multiply(__pyx_v_num_rank, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L62_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = PyNumber_Add(__pyx_8genexpr3__pyx_v_j, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L62_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_16, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 618, __pyx_L62_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_j); __pyx_8genexpr3__pyx_v_j = 0;
        goto __pyx_L66_exit_scope;
        __pyx_L62_error:;
        __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_j); __pyx_8genexpr3__pyx_v_j = 0;
        goto __pyx_L1_error;
        __pyx_L66_exit_scope:;
      } /* exit inner scope */
      __Pyx_XDECREF_SET(__pyx_v_new_base_list, ((PyObject*)__pyx_t_16));
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":619
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list             # <<<<<<<<<<<<<<
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 */
      __pyx_t_16 = PyNumber_Add(__pyx_v_color_list, __pyx_v_new_base_list); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_16));
      __pyx_t_16 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":617
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":621
 *                 color_list = color_list + new_base_list
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'             # <<<<<<<<<<<<<<
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_month'
 */
    __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_20 = 127;
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_16, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_kp_u__35);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 3;
    __Pyx_GIVEREF(__pyx_kp_u__35);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__35);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_near_num, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_n_u__46);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_n_u__46);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_n_u__46);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_n_u__42);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_8 += 5;
    __Pyx_GIVEREF(__pyx_n_u__42);
    PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_n_u__42);
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_8, __pyx_t_20); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_title, ((PyObject*)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":622
 * 
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']             # <<<<<<<<<<<<<<
 *             sub_strategy_name = strategy_key_name + '_month'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 */
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_2 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_17, __pyx_kp_u__4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_17 = PyList_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_n_s__46);
    __Pyx_GIVEREF(__pyx_n_s__46);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 0, __pyx_n_s__46)) __PYX_ERR(0, 622, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 1, __pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_col_title, ((PyObject*)__pyx_t_17));
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":623
 *             table_title = f'{self.datetime_str}-{near_num}{type_name}'
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_month'             # <<<<<<<<<<<<<<
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_month_df, table_title, table_save_png_path, col_title, color_list)
 */
    __pyx_t_17 = PyNumber_Add(__pyx_v_strategy_key_name, __pyx_n_s_month_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_XDECREF_SET(__pyx_v_sub_strategy_name, __pyx_t_17);
    __pyx_t_17 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":624
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_month'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"             # <<<<<<<<<<<<<<
 *             self._plotTablePandas(all_time_month_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_20 = 127;
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_16, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__11);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__11);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__11);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_sub_strategy_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_20;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_png);
    __pyx_t_8 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_png);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u_png);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_8, __pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_17, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_save_png_path, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":625
 *             sub_strategy_name = strategy_key_name + '_month'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_month_df, table_title, table_save_png_path, col_title, color_list)             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTablePandas); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_17 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_17, __pyx_v_all_time_month_df, __pyx_v_table_title, __pyx_v_table_save_png_path, __pyx_v_col_title, __pyx_v_color_list};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":626
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_time_month_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path             # <<<<<<<<<<<<<<
 * 
 *         ## near_5,near_10,near_20,near_30,near_60
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_strategy_img_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_v_table_title, __pyx_v_table_save_png_path) < 0))) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":614
 *         # print('all_time_month_df', all_time_month_df)
 *         #
 *         if not all_time_month_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":630
 *         ## near_5,near_10,near_20,near_30,near_60
 *         # dict
 *         near_num = 0             # <<<<<<<<<<<<<<
 *         all_near_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_DECREF_SET(__pyx_v_near_num, __pyx_int_0);

  /* "tbstock/tradeStrategy/stockStrategy.py":631
 *         # dict
 *         near_num = 0
 *         all_near_df = pd.DataFrame()             # <<<<<<<<<<<<<<
 *         for key, value_dict in strategy_data_dict.items():
 *             if not key.startswith('near'):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __pyx_v_all_near_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":632
 *         near_num = 0
 *         all_near_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():             # <<<<<<<<<<<<<<
 *             if not key.startswith('near'):
 *                 continue
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_strategy_data_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 632, __pyx_L1_error)
  }
  __pyx_t_17 = __Pyx_dict_iterator(__pyx_v_strategy_data_dict, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = __pyx_t_17;
  __pyx_t_17 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_7, &__pyx_t_8, &__pyx_t_17, &__pyx_t_1, NULL, __pyx_t_9);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_dict, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":633
 *         all_near_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if not key.startswith('near'):             # <<<<<<<<<<<<<<
 *                 continue
 *             near_num += 1
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_startswith); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_16 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_n_s_near};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = (!__pyx_t_6);
    if (__pyx_t_11) {

      /* "tbstock/tradeStrategy/stockStrategy.py":634
 *         for key, value_dict in strategy_data_dict.items():
 *             if not key.startswith('near'):
 *                 continue             # <<<<<<<<<<<<<<
 *             near_num += 1
 *             key_pandas = self._convertDictToPandas(key, value_dict)
 */
      goto __pyx_L68_continue;

      /* "tbstock/tradeStrategy/stockStrategy.py":633
 *         all_near_df = pd.DataFrame()
 *         for key, value_dict in strategy_data_dict.items():
 *             if not key.startswith('near'):             # <<<<<<<<<<<<<<
 *                 continue
 *             near_num += 1
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":635
 *             if not key.startswith('near'):
 *                 continue
 *             near_num += 1             # <<<<<<<<<<<<<<
 *             key_pandas = self._convertDictToPandas(key, value_dict)
 *             all_near_df = pd.concat([all_near_df, key_pandas], ignore_index=False)
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_near_num, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_near_num, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":636
 *                 continue
 *             near_num += 1
 *             key_pandas = self._convertDictToPandas(key, value_dict)             # <<<<<<<<<<<<<<
 *             all_near_df = pd.concat([all_near_df, key_pandas], ignore_index=False)
 *         # print('all_near_df', all_near_df)
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_convertDictToPandas); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_16 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_key, __pyx_v_value_dict};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_key_pandas, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":637
 *             near_num += 1
 *             key_pandas = self._convertDictToPandas(key, value_dict)
 *             all_near_df = pd.concat([all_near_df, key_pandas], ignore_index=False)             # <<<<<<<<<<<<<<
 *         # print('all_near_df', all_near_df)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_concat); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_all_near_df);
    __Pyx_GIVEREF(__pyx_v_all_near_df);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_all_near_df)) __PYX_ERR(0, 637, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_key_pandas);
    __Pyx_GIVEREF(__pyx_v_key_pandas);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_key_pandas)) __PYX_ERR(0, 637, __pyx_L1_error);
    __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_index, Py_False) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_16, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_all_near_df, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_L68_continue:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":641
 * 
 *         #
 *         if not all_near_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_near_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (!__pyx_t_11);
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":642
 *         #
 *         if not all_near_df.empty:
 *             base_list = range(0, num_rank)             # <<<<<<<<<<<<<<
 *             color_list = []
 *             for i in range(0, near_num, 2):
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 642, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_num_rank);
    __Pyx_GIVEREF(__pyx_v_num_rank);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_num_rank)) __PYX_ERR(0, 642, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_base_list, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":643
 *         if not all_near_df.empty:
 *             base_list = range(0, num_rank)
 *             color_list = []             # <<<<<<<<<<<<<<
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":644
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 644, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_near_num);
    __Pyx_GIVEREF(__pyx_v_near_num);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_near_num)) __PYX_ERR(0, 644, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_2);
    __Pyx_GIVEREF(__pyx_int_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_2)) __PYX_ERR(0, 644, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_18 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 644, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_18)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 644, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 644, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 644, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 644, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_18(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 644, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":645
 *             color_list = []
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]             # <<<<<<<<<<<<<<
 *                 color_list = color_list + new_base_list
 * 
 */
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L76_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (likely(PyList_CheckExact(__pyx_v_base_list)) || PyTuple_CheckExact(__pyx_v_base_list)) {
          __pyx_t_1 = __pyx_v_base_list; __Pyx_INCREF(__pyx_t_1);
          __pyx_t_8 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_base_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 645, __pyx_L76_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 645, __pyx_L76_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_16); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 645, __pyx_L76_error)
              #else
              __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 645, __pyx_L76_error)
              __Pyx_GOTREF(__pyx_t_16);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 645, __pyx_L76_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_16 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_16); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 645, __pyx_L76_error)
              #else
              __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 645, __pyx_L76_error)
              __Pyx_GOTREF(__pyx_t_16);
              #endif
            }
          } else {
            __pyx_t_16 = __pyx_t_19(__pyx_t_1);
            if (unlikely(!__pyx_t_16)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 645, __pyx_L76_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_16);
          }
          __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_j, __pyx_t_16);
          __pyx_t_16 = 0;
          __pyx_t_16 = PyNumber_Multiply(__pyx_v_num_rank, __pyx_v_i); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 645, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_17 = PyNumber_Add(__pyx_8genexpr4__pyx_v_j, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 645, __pyx_L76_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_17))) __PYX_ERR(0, 645, __pyx_L76_error)
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_j); __pyx_8genexpr4__pyx_v_j = 0;
        goto __pyx_L80_exit_scope;
        __pyx_L76_error:;
        __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_j); __pyx_8genexpr4__pyx_v_j = 0;
        goto __pyx_L1_error;
        __pyx_L80_exit_scope:;
      } /* exit inner scope */
      __Pyx_XDECREF_SET(__pyx_v_new_base_list, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":646
 *             for i in range(0, near_num, 2):
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list             # <<<<<<<<<<<<<<
 * 
 *             table_title = f'{self.datetime_str}-x{type_name}'
 */
      __pyx_t_2 = PyNumber_Add(__pyx_v_color_list, __pyx_v_new_base_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_color_list, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":644
 *             base_list = range(0, num_rank)
 *             color_list = []
 *             for i in range(0, near_num, 2):             # <<<<<<<<<<<<<<
 *                 new_base_list = [j + num_rank * i for j in base_list]
 *                 color_list = color_list + new_base_list
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":648
 *                 color_list = color_list + new_base_list
 * 
 *             table_title = f'{self.datetime_str}-x{type_name}'             # <<<<<<<<<<<<<<
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_near'
 */
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_20 = 127;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u_x);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_7 += 5;
    __Pyx_GIVEREF(__pyx_kp_u_x);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_x);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_n_u__42);
    __pyx_t_20 = (65535 > __pyx_t_20) ? 65535 : __pyx_t_20;
    __pyx_t_7 += 5;
    __Pyx_GIVEREF(__pyx_n_u__42);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_n_u__42);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_7, __pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_title, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":649
 * 
 *             table_title = f'{self.datetime_str}-x{type_name}'
 *             col_title = ['', f'{type_name}']             # <<<<<<<<<<<<<<
 *             sub_strategy_name = strategy_key_name + '_near'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 */
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_type_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_kp_u__4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__47);
    __Pyx_GIVEREF(__pyx_kp_s__47);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__47)) __PYX_ERR(0, 649, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_col_title, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":650
 *             table_title = f'{self.datetime_str}-x{type_name}'
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_near'             # <<<<<<<<<<<<<<
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_near_df, table_title, table_save_png_path, col_title, color_list)
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_strategy_key_name, __pyx_n_s_near_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_sub_strategy_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":651
 *             col_title = ['', f'{type_name}']
 *             sub_strategy_name = strategy_key_name + '_near'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"             # <<<<<<<<<<<<<<
 *             self._plotTablePandas(all_near_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_20 = 127;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_kp_u__11);
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__11);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__11);
    __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_sub_strategy_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_20 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_20) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_20;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
    __Pyx_GIVEREF(__pyx_t_17);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_17);
    __pyx_t_17 = 0;
    __Pyx_INCREF(__pyx_kp_u_png);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_png);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_png);
    __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_7, __pyx_t_20); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_XDECREF_SET(__pyx_v_table_save_png_path, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":652
 *             sub_strategy_name = strategy_key_name + '_near'
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_near_df, table_title, table_save_png_path, col_title, color_list)             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path
 * 
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotTablePandas); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_1, __pyx_v_all_near_df, __pyx_v_table_title, __pyx_v_table_save_png_path, __pyx_v_col_title, __pyx_v_color_list};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":653
 *             table_save_png_path = self.img_save_path_root + f"{self.base_filename}-{sub_strategy_name}.png"
 *             self._plotTablePandas(all_near_df, table_title, table_save_png_path, col_title, color_list)
 *             self.strategy_json[strategy_key_name]['strategy_img_path'][table_title] = table_save_png_path             # <<<<<<<<<<<<<<
 * 
 *         # # excel
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_17, __pyx_n_s_strategy_img_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_title, __pyx_v_table_save_png_path) < 0))) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":641
 * 
 *         #
 *         if not all_near_df.empty:             # <<<<<<<<<<<<<<
 *             base_list = range(0, num_rank)
 *             color_list = []
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":518
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._plotHotColdTables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_num_rank);
  __Pyx_XDECREF(__pyx_v_near_num);
  __Pyx_XDECREF(__pyx_v_all_time_day_df);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value_dict);
  __Pyx_XDECREF(__pyx_v_last_five_items);
  __Pyx_XDECREF(__pyx_v_last_five_dict);
  __Pyx_XDECREF(__pyx_v_time_key);
  __Pyx_XDECREF(__pyx_v_time_value);
  __Pyx_XDECREF(__pyx_v_key_pandas);
  __Pyx_XDECREF(__pyx_v_base_list);
  __Pyx_XDECREF(__pyx_v_color_list);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_new_base_list);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_col_title);
  __Pyx_XDECREF(__pyx_v_sub_strategy_name);
  __Pyx_XDECREF(__pyx_v_table_save_png_path);
  __Pyx_XDECREF(__pyx_v_all_time_week_df);
  __Pyx_XDECREF(__pyx_v_year_str);
  __Pyx_XDECREF(__pyx_v_all_time_month_df);
  __Pyx_XDECREF(__pyx_v_all_near_df);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_j);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_j);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_j);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":684
 *         # # self.strategy_json[strategy_key_name]['strategy_img_path'] = table_save_png_path
 * 
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):             # <<<<<<<<<<<<<<
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_33_plotTablePandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_33_plotTablePandas = {"_plotTablePandas", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_33_plotTablePandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_33_plotTablePandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_plot_df = 0;
  PyObject *__pyx_v_table_title = 0;
  PyObject *__pyx_v_table_save_png_path = 0;
  PyObject *__pyx_v_col_title = 0;
  PyObject *__pyx_v_color_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_plotTablePandas (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_plot_df,&__pyx_n_s_table_title,&__pyx_n_s_table_save_png_path,&__pyx_n_s_col_title,&__pyx_n_s_color_list,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_plot_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, 1); __PYX_ERR(0, 684, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_title)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, 2); __PYX_ERR(0, 684, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_save_png_path)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, 3); __PYX_ERR(0, 684, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_col_title)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, 4); __PYX_ERR(0, 684, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_color_list)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[5]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, 5); __PYX_ERR(0, 684, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_plotTablePandas") < 0)) __PYX_ERR(0, 684, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 6)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
      values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
      values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
    }
    __pyx_v_self = values[0];
    __pyx_v_plot_df = values[1];
    __pyx_v_table_title = values[2];
    __pyx_v_table_save_png_path = values[3];
    __pyx_v_col_title = values[4];
    __pyx_v_color_list = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_plotTablePandas", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 684, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._plotTablePandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_32_plotTablePandas(__pyx_self, __pyx_v_self, __pyx_v_plot_df, __pyx_v_table_title, __pyx_v_table_save_png_path, __pyx_v_col_title, __pyx_v_color_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_32_plotTablePandas(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_plot_df, PyObject *__pyx_v_table_title, PyObject *__pyx_v_table_save_png_path, PyObject *__pyx_v_col_title, PyObject *__pyx_v_color_list) {
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  unsigned int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_plotTablePandas", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":686
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_figsize, __pyx_tuple__48) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 686, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 686, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 686, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":687
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 *         ax.set_title(table_title)             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             df=plot_df,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_table_title};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":688
 *         fig, ax = plt.subplots(figsize=(8, 8))
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=plot_df,
 *             ax=ax,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Table); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "tbstock/tradeStrategy/stockStrategy.py":689
 *         ax.set_title(table_title)
 *         tab = Table(
 *             df=plot_df,             # <<<<<<<<<<<<<<
 *             ax=ax,
 *             textprops={
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_df, __pyx_v_plot_df) < 0) __PYX_ERR(0, 689, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":690
 *         tab = Table(
 *             df=plot_df,
 *             ax=ax,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ax, __pyx_v_ax) < 0) __PYX_ERR(0, 689, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":692
 *             ax=ax,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             # text_cmap=normed_cmap(plot_df[""], cmap=matplotlib.cm.autumn_r)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_textprops, __pyx_t_1) < 0) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":696
 *             # text_cmap=normed_cmap(plot_df[""], cmap=matplotlib.cm.autumn_r)
 *             column_definitions=[
 *                 ColDef(name="key_name", width=2, title=col_title[0]),             # <<<<<<<<<<<<<<
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_n_s_key_name) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_width, __pyx_int_2) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_col_title, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_title, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":697
 *             column_definitions=[
 *                 ColDef(name="key_name", width=2, title=col_title[0]),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),             # <<<<<<<<<<<<<<
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_kp_s__49) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_width, __pyx_int_3) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_col_title, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_title, __pyx_t_8) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, __pyx_kp_s__50) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":698
 *                 ColDef(name="key_name", width=2, title=col_title[0]),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 *                 ColDef(name="", formatter="{:.2%}", group=""),             # <<<<<<<<<<<<<<
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_kp_s__51) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_group, __pyx_kp_s__50) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":699
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),             # <<<<<<<<<<<<<<
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 *             ]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_kp_s__52) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_width, __pyx_int_3) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_col_title, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_title, __pyx_t_10) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group, __pyx_kp_s__53) < 0) __PYX_ERR(0, 699, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":700
 *                 ColDef(name="", formatter="{:.2%}", group=""),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 *                 ColDef(name="", formatter="{:.2%}", group=""),             # <<<<<<<<<<<<<<
 *             ]
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_kp_s__54) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_group, __pyx_kp_s__53) < 0) __PYX_ERR(0, 700, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":695
 *             },
 *             # text_cmap=normed_cmap(plot_df[""], cmap=matplotlib.cm.autumn_r)
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 ColDef(name="key_name", width=2, title=col_title[0]),
 *                 ColDef(name="", width=3, title=col_title[1], group=""),
 */
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_8)) __PYX_ERR(0, 695, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_9)) __PYX_ERR(0, 695, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_10)) __PYX_ERR(0, 695, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_t_11)) __PYX_ERR(0, 695, __pyx_L1_error);
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_column_definitions, __pyx_t_4) < 0) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":688
 *         fig, ax = plt.subplots(figsize=(8, 8))
 *         ax.set_title(table_title)
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=plot_df,
 *             ax=ax,
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tab = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":705
 *         #
 *         ##
 *         for i in color_list:             # <<<<<<<<<<<<<<
 *             tab.rows[i].set_facecolor('silver')
 *         ##
 */
  if (likely(PyList_CheckExact(__pyx_v_color_list)) || PyTuple_CheckExact(__pyx_v_color_list)) {
    __pyx_t_4 = __pyx_v_color_list; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_color_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 705, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 705, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 705, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 705, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 705, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_13(__pyx_t_4);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 705, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":706
 *         ##
 *         for i in color_list:
 *             tab.rows[i].set_facecolor('silver')             # <<<<<<<<<<<<<<
 *         ##
 *         fig.savefig(table_save_png_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tab, __pyx_n_s_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_set_facecolor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_n_s_silver};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":705
 *         #
 *         ##
 *         for i in color_list:             # <<<<<<<<<<<<<<
 *             tab.rows[i].set_facecolor('silver')
 *         ##
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":708
 *             tab.rows[i].set_facecolor('silver')
 *         ##
 *         fig.savefig(table_save_png_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # plt.show()
 *         plt.close()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_table_save_png_path);
  __Pyx_GIVEREF(__pyx_v_table_save_png_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_table_save_png_path)) __PYX_ERR(0, 708, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_9 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_facecolor, __pyx_t_11) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dpi, __pyx_int_300) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":710
 *         fig.savefig(table_save_png_path, facecolor=fig.get_facecolor(), dpi=300, bbox_inches='tight')
 *         # plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":684
 *         # # self.strategy_json[strategy_key_name]['strategy_img_path'] = table_save_png_path
 * 
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):             # <<<<<<<<<<<<<<
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._plotTablePandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":712
 *         plt.close()
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         if time_key:
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_35_convertDictToPandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_35_convertDictToPandas = {"_convertDictToPandas", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_35_convertDictToPandas, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_35_convertDictToPandas(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_near_name = 0;
  PyObject *__pyx_v_ori_dict = 0;
  PyObject *__pyx_v_time_key = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_convertDictToPandas (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_near_name,&__pyx_n_s_ori_dict,&__pyx_n_s_time_key,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s__23)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_near_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_convertDictToPandas", 0, 3, 4, 1); __PYX_ERR(0, 712, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ori_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_convertDictToPandas", 0, 3, 4, 2); __PYX_ERR(0, 712, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_time_key);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_convertDictToPandas") < 0)) __PYX_ERR(0, 712, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_near_name = values[1];
    __pyx_v_ori_dict = values[2];
    __pyx_v_time_key = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_convertDictToPandas", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 712, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._convertDictToPandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_34_convertDictToPandas(__pyx_self, __pyx_v_self, __pyx_v_near_name, __pyx_v_ori_dict, __pyx_v_time_key);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_34_convertDictToPandas(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_near_name, PyObject *__pyx_v_ori_dict, PyObject *__pyx_v_time_key) {
  PyObject *__pyx_v_new_dict = NULL;
  PyObject *__pyx_v_num_k = NULL;
  PyObject *__pyx_v_num_rank = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_value_ratio = NULL;
  PyObject *__pyx_v_new_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_convertDictToPandas", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":713
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:
 *         if time_key:             # <<<<<<<<<<<<<<
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_time_key); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 713, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":714
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:
 *         if time_key:
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}             # <<<<<<<<<<<<<<
 *         else:
 *             new_dict = {'key_name': [], '': [], '': [], '': [], '': [], '': []}
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key_time, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key_name, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__55, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__49, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__51, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__52, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__54, __pyx_t_3) < 0) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_new_dict = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":713
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:
 *         if time_key:             # <<<<<<<<<<<<<<
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":716
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 *         else:
 *             new_dict = {'key_name': [], '': [], '': [], '': [], '': [], '': []}             # <<<<<<<<<<<<<<
 *         num_k = 0
 *         num_rank = int(len(ori_dict) / 2)
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key_name, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__55, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__49, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__51, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__52, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_kp_s__54, __pyx_t_3) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_new_dict = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":717
 *         else:
 *             new_dict = {'key_name': [], '': [], '': [], '': [], '': [], '': []}
 *         num_k = 0             # <<<<<<<<<<<<<<
 *         num_rank = int(len(ori_dict) / 2)
 *         for key, value in ori_dict.items():
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_num_k = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":718
 *             new_dict = {'key_name': [], '': [], '': [], '': [], '': [], '': []}
 *         num_k = 0
 *         num_rank = int(len(ori_dict) / 2)             # <<<<<<<<<<<<<<
 *         for key, value in ori_dict.items():
 *             num_k += 1
 */
  __pyx_t_4 = PyObject_Length(__pyx_v_ori_dict); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 718, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_FromDouble((((double)__pyx_t_4) / 2.0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_num_rank = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":719
 *         num_k = 0
 *         num_rank = int(len(ori_dict) / 2)
 *         for key, value in ori_dict.items():             # <<<<<<<<<<<<<<
 *             num_k += 1
 *             value_ratio = round(value - 1, 4)
 */
  __pyx_t_4 = 0;
  if (unlikely(__pyx_v_ori_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 719, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_ori_dict, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_3 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_5, &__pyx_t_4, &__pyx_t_3, &__pyx_t_7, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":720
 *         num_rank = int(len(ori_dict) / 2)
 *         for key, value in ori_dict.items():
 *             num_k += 1             # <<<<<<<<<<<<<<
 *             value_ratio = round(value - 1, 4)
 *             if num_k <= num_rank:
 */
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_num_k, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_num_k, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":721
 *         for key, value in ori_dict.items():
 *             num_k += 1
 *             value_ratio = round(value - 1, 4)             # <<<<<<<<<<<<<<
 *             if num_k <= num_rank:
 *                 new_dict[''].append(key)
 */
    __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_v_value, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7)) __PYX_ERR(0, 721, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_4);
    __Pyx_GIVEREF(__pyx_int_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_4)) __PYX_ERR(0, 721, __pyx_L1_error);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_ratio, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":722
 *             num_k += 1
 *             value_ratio = round(value - 1, 4)
 *             if num_k <= num_rank:             # <<<<<<<<<<<<<<
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)
 */
    __pyx_t_7 = PyObject_RichCompare(__pyx_v_num_k, __pyx_v_num_rank, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 722, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 722, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":723
 *             value_ratio = round(value - 1, 4)
 *             if num_k <= num_rank:
 *                 new_dict[''].append(key)             # <<<<<<<<<<<<<<
 *                 new_dict[''].append(value_ratio)
 *                 new_dict['key_name'].append(near_name)
 */
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__49); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_key); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 723, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":724
 *             if num_k <= num_rank:
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)             # <<<<<<<<<<<<<<
 *                 new_dict['key_name'].append(near_name)
 *                 if time_key:
 */
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__51); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_value_ratio); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 724, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":725
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)
 *                 new_dict['key_name'].append(near_name)             # <<<<<<<<<<<<<<
 *                 if time_key:
 *                     new_dict['key_time'].append(time_key)
 */
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_n_s_key_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_near_name); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":726
 *                 new_dict[''].append(value_ratio)
 *                 new_dict['key_name'].append(near_name)
 *                 if time_key:             # <<<<<<<<<<<<<<
 *                     new_dict['key_time'].append(time_key)
 *                 new_dict[''].append(num_k)
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_time_key); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 726, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":727
 *                 new_dict['key_name'].append(near_name)
 *                 if time_key:
 *                     new_dict['key_time'].append(time_key)             # <<<<<<<<<<<<<<
 *                 new_dict[''].append(num_k)
 *             else:
 */
        __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_n_s_key_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_time_key); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 727, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":726
 *                 new_dict[''].append(value_ratio)
 *                 new_dict['key_name'].append(near_name)
 *                 if time_key:             # <<<<<<<<<<<<<<
 *                     new_dict['key_time'].append(time_key)
 *                 new_dict[''].append(num_k)
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":728
 *                 if time_key:
 *                     new_dict['key_time'].append(time_key)
 *                 new_dict[''].append(num_k)             # <<<<<<<<<<<<<<
 *             else:
 *                 new_dict[''].append(key)
 */
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__55); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_num_k); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 728, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":722
 *             num_k += 1
 *             value_ratio = round(value - 1, 4)
 *             if num_k <= num_rank:             # <<<<<<<<<<<<<<
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)
 */
      goto __pyx_L6;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":730
 *                 new_dict[''].append(num_k)
 *             else:
 *                 new_dict[''].append(key)             # <<<<<<<<<<<<<<
 *                 new_dict[''].append(value_ratio)
 *         new_dict[''].reverse()
 */
    /*else*/ {
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__52); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_key); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 730, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":731
 *             else:
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)             # <<<<<<<<<<<<<<
 *         new_dict[''].reverse()
 *         new_dict[''].reverse()
 */
      __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__54); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_value_ratio); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 731, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_L6:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":732
 *                 new_dict[''].append(key)
 *                 new_dict[''].append(value_ratio)
 *         new_dict[''].reverse()             # <<<<<<<<<<<<<<
 *         new_dict[''].reverse()
 *         new_df = pd.DataFrame(new_dict)
 */
  __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__52); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":733
 *                 new_dict[''].append(value_ratio)
 *         new_dict[''].reverse()
 *         new_dict[''].reverse()             # <<<<<<<<<<<<<<
 *         new_df = pd.DataFrame(new_dict)
 *         # #  loc
 */
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_new_dict, __pyx_kp_s__54); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":734
 *         new_dict[''].reverse()
 *         new_dict[''].reverse()
 *         new_df = pd.DataFrame(new_dict)             # <<<<<<<<<<<<<<
 *         # #  loc
 *         # new_df.loc[len(new_df)] = pd.Series(index=new_df.columns, dtype=None)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_new_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_new_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":737
 *         # #  loc
 *         # new_df.loc[len(new_df)] = pd.Series(index=new_df.columns, dtype=None)
 *         new_df.set_index('key_name', inplace=True)             # <<<<<<<<<<<<<<
 *         return new_df
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__56, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":738
 *         # new_df.loc[len(new_df)] = pd.Series(index=new_df.columns, dtype=None)
 *         new_df.set_index('key_name', inplace=True)
 *         return new_df             # <<<<<<<<<<<<<<
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_new_df);
  __pyx_r = __pyx_v_new_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":712
 *         plt.close()
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         if time_key:
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._convertDictToPandas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_dict);
  __Pyx_XDECREF(__pyx_v_num_k);
  __Pyx_XDECREF(__pyx_v_num_rank);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_value_ratio);
  __Pyx_XDECREF(__pyx_v_new_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":740
 *         return new_df
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):             # <<<<<<<<<<<<<<
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_37_saveToImg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_37_saveToImg = {"_saveToImg", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_37_saveToImg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_37_saveToImg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_save_excel_path = 0;
  PyObject *__pyx_v_table_save_png_path = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_saveToImg (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_save_excel_path,&__pyx_n_s_table_save_png_path,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_save_excel_path)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_saveToImg", 1, 3, 3, 1); __PYX_ERR(0, 740, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_save_png_path)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_saveToImg", 1, 3, 3, 2); __PYX_ERR(0, 740, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_saveToImg") < 0)) __PYX_ERR(0, 740, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_table_save_excel_path = values[1];
    __pyx_v_table_save_png_path = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_saveToImg", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 740, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._saveToImg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_36_saveToImg(__pyx_self, __pyx_v_self, __pyx_v_table_save_excel_path, __pyx_v_table_save_png_path);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_36_saveToImg(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_table_save_excel_path, PyObject *__pyx_v_table_save_png_path) {
  PyObject *__pyx_v_spires = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_spires_common = NULL;
  PyObject *__pyx_v_workbook = NULL;
  PyObject *__pyx_v_sheet = NULL;
  PyObject *__pyx_v_image = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_saveToImg", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":741
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):
 *         import spire.xls as spires             # <<<<<<<<<<<<<<
 *         import spire.xls.common as spires_common
 * 
 */
  __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_spire_xls, __pyx_tuple__57); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_spires = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":742
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common             # <<<<<<<<<<<<<<
 * 
 *         # Workbook
 */
  __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_spire_xls_common, __pyx_tuple__59); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_spires_common = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":745
 * 
 *         # Workbook
 *         workbook = spires.Workbook()             # <<<<<<<<<<<<<<
 *         # Excel
 *         workbook.LoadFromFile(table_save_excel_path)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spires, __pyx_n_s_Workbook); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_workbook = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":747
 *         workbook = spires.Workbook()
 *         # Excel
 *         workbook.LoadFromFile(table_save_excel_path)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_workbook, __pyx_n_s_LoadFromFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_table_save_excel_path};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":750
 * 
 *         #
 *         sheet = workbook.Worksheets.get_Item(0)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_workbook, __pyx_n_s_Worksheets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_Item); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_0};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_sheet = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":753
 * 
 *         #
 *         image = sheet.ToImage(sheet.FirstRow, sheet.FirstColumn, sheet.LastRow, sheet.LastColumn)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_ToImage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_FirstRow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_FirstColumn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_LastRow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sheet, __pyx_n_s_LastColumn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_2, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_image = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":756
 * 
 *         #
 *         image.Save(table_save_png_path)             # <<<<<<<<<<<<<<
 *         workbook.Dispose()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_image, __pyx_n_s_Save); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_table_save_png_path};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":757
 *         #
 *         image.Save(table_save_png_path)
 *         workbook.Dispose()             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdConceptTable(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_workbook, __pyx_n_s_Dispose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":740
 *         return new_df
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):             # <<<<<<<<<<<<<<
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock._saveToImg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_spires);
  __Pyx_XDECREF(__pyx_v_spires_common);
  __Pyx_XDECREF(__pyx_v_workbook);
  __Pyx_XDECREF(__pyx_v_sheet);
  __Pyx_XDECREF(__pyx_v_image);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":759
 *         workbook.Dispose()
 * 
 *     def plotHotColdConceptTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_39plotHotColdConceptTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_39plotHotColdConceptTable = {"plotHotColdConceptTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_39plotHotColdConceptTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_39plotHotColdConceptTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdConceptTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdConceptTable") < 0)) __PYX_ERR(0, 759, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdConceptTable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 759, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdConceptTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_38plotHotColdConceptTable(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_38plotHotColdConceptTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdConceptTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":760
 * 
 *     def plotHotColdConceptTable(self):
 *         strategy_key_name = 'hot_cold_concept_table'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_concept_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_concept_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":762
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":763
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":764
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         type_name = ''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":762
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":766
 *             return False
 * 
 *         type_name = ''             # <<<<<<<<<<<<<<
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__60);
  __pyx_v_type_name = __pyx_kp_s__60;

  /* "tbstock/tradeStrategy/stockStrategy.py":767
 * 
 *         type_name = ''
 *         self._plotHotColdTables(strategy_key_name, type_name)             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdStockTable(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdTables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_strategy_key_name, __pyx_v_type_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":759
 *         workbook.Dispose()
 * 
 *     def plotHotColdConceptTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdConceptTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":769
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdStockTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_41plotHotColdStockTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_41plotHotColdStockTable = {"plotHotColdStockTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_41plotHotColdStockTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_41plotHotColdStockTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdStockTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdStockTable") < 0)) __PYX_ERR(0, 769, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdStockTable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 769, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdStockTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_40plotHotColdStockTable(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_40plotHotColdStockTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdStockTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":770
 * 
 *     def plotHotColdStockTable(self):
 *         strategy_key_name = 'hot_cold_stock_table'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_stock_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_stock_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":772
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 772, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":773
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":774
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         type_name = ''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":772
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":776
 *             return False
 * 
 *         type_name = ''             # <<<<<<<<<<<<<<
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__61);
  __pyx_v_type_name = __pyx_kp_s__61;

  /* "tbstock/tradeStrategy/stockStrategy.py":777
 * 
 *         type_name = ''
 *         self._plotHotColdTables(strategy_key_name, type_name)             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdFutureTable(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdTables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_strategy_key_name, __pyx_v_type_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":769
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdStockTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdStockTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":779
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdFutureTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_43plotHotColdFutureTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_43plotHotColdFutureTable = {"plotHotColdFutureTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_43plotHotColdFutureTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_43plotHotColdFutureTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdFutureTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdFutureTable") < 0)) __PYX_ERR(0, 779, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdFutureTable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 779, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdFutureTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_42plotHotColdFutureTable(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_42plotHotColdFutureTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdFutureTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":780
 * 
 *     def plotHotColdFutureTable(self):
 *         strategy_key_name = 'hot_cold_future_table'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_future_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_future_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":782
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":783
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":784
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         type_name = ''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":782
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":786
 *             return False
 * 
 *         type_name = ''             # <<<<<<<<<<<<<<
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__62);
  __pyx_v_type_name = __pyx_kp_s__62;

  /* "tbstock/tradeStrategy/stockStrategy.py":787
 * 
 *         type_name = ''
 *         self._plotHotColdTables(strategy_key_name, type_name)             # <<<<<<<<<<<<<<
 * 
 *     def plotHotColdIndexTable(self):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdTables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_strategy_key_name, __pyx_v_type_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":779
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdFutureTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdFutureTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":789
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdIndexTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_45plotHotColdIndexTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_45plotHotColdIndexTable = {"plotHotColdIndexTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_45plotHotColdIndexTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_45plotHotColdIndexTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHotColdIndexTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHotColdIndexTable") < 0)) __PYX_ERR(0, 789, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHotColdIndexTable", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 789, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndexTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_44plotHotColdIndexTable(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_44plotHotColdIndexTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_type_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHotColdIndexTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":790
 * 
 *     def plotHotColdIndexTable(self):
 *         strategy_key_name = 'hot_cold_index_table'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_index_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_index_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":792
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":793
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":794
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         type_name = ''
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":792
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":796
 *             return False
 * 
 *         type_name = ''             # <<<<<<<<<<<<<<
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 */
  __Pyx_INCREF(__pyx_kp_s__63);
  __pyx_v_type_name = __pyx_kp_s__63;

  /* "tbstock/tradeStrategy/stockStrategy.py":797
 * 
 *         type_name = ''
 *         self._plotHotColdTables(strategy_key_name, type_name)             # <<<<<<<<<<<<<<
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_plotHotColdTables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_strategy_key_name, __pyx_v_type_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 2+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":789
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdIndexTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHotColdIndexTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_type_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":799
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_47plotHoldNumberDecrease(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_47plotHoldNumberDecrease = {"plotHoldNumberDecrease", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_47plotHoldNumberDecrease, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_47plotHoldNumberDecrease(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_rows = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotHoldNumberDecrease (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_rows,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_25)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 799, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_rows);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 799, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotHoldNumberDecrease") < 0)) __PYX_ERR(0, 799, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_table_rows = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotHoldNumberDecrease", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 799, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHoldNumberDecrease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_46plotHoldNumberDecrease(__pyx_self, __pyx_v_self, __pyx_v_table_rows);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_46plotHoldNumberDecrease(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_rows) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_day_len = NULL;
  PyObject *__pyx_v_strategy_data_df = NULL;
  PyObject *__pyx_v_fig = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_v_table_title = NULL;
  PyObject *__pyx_v_table_save_path = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_tab = NULL;
  PyObject *__pyx_v_temp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotHoldNumberDecrease", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":800
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):
 *         strategy_key_name = 'hold_number_decrease'             # <<<<<<<<<<<<<<
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 */
  __Pyx_INCREF(__pyx_n_s_hold_number_decrease);
  __pyx_v_strategy_key_name = __pyx_n_s_hold_number_decrease;

  /* "tbstock/tradeStrategy/stockStrategy.py":802
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":803
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_7 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_not_been_updated);
    __pyx_t_7 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_not_been_updated);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_not_been_updated);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":804
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":802
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 *         if (strategy_key_name not in self.strategy_json) or (not self.strategy_json[strategy_key_name]['updated']):             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'The {strategy_key_name} table has not been updated.')
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":806
 *             return False
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])             # <<<<<<<<<<<<<<
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":807
 * 
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_len = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":808
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_day_len) < 0))) __PYX_ERR(0, 808, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":809
 *         day_len = strategy_data_dict['day_len']
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 809, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":810
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 810, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":811
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 811, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":810
 *         del strategy_data_dict['day_len']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":813
 *             del strategy_data_dict['strategy_img_path']
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)             # <<<<<<<<<<<<<<
 *         strategy_data_df = strategy_data_df.iloc[0:table_rows, ]
 *         strategy_data_df['decrease_ratio'] = 1 - strategy_data_df['decrease_ratio']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_strategy_data_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_strategy_data_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":814
 * 
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df = strategy_data_df.iloc[0:table_rows, ]             # <<<<<<<<<<<<<<
 *         strategy_data_df['decrease_ratio'] = 1 - strategy_data_df['decrease_ratio']
 *         strategy_data_df['holder_num'] = strategy_data_df['holder_num'].astype(int)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_strategy_data_df, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PySlice_New(__pyx_int_0, __pyx_v_table_rows, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 814, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_strategy_data_df, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":815
 *         strategy_data_df = pd.DataFrame(strategy_data_dict)
 *         strategy_data_df = strategy_data_df.iloc[0:table_rows, ]
 *         strategy_data_df['decrease_ratio'] = 1 - strategy_data_df['decrease_ratio']             # <<<<<<<<<<<<<<
 *         strategy_data_df['holder_num'] = strategy_data_df['holder_num'].astype(int)
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_n_s_decrease_ratio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_6, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_n_s_decrease_ratio, __pyx_t_4) < 0))) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":816
 *         strategy_data_df = strategy_data_df.iloc[0:table_rows, ]
 *         strategy_data_df['decrease_ratio'] = 1 - strategy_data_df['decrease_ratio']
 *         strategy_data_df['holder_num'] = strategy_data_df['holder_num'].astype(int)             # <<<<<<<<<<<<<<
 * 
 *         # print('strategy_data_df', strategy_data_df)
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_df, __pyx_n_s_holder_num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)(&PyInt_Type))};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_strategy_data_df, __pyx_n_s_holder_num, __pyx_t_4) < 0))) __PYX_ERR(0, 816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":821
 * 
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))             # <<<<<<<<<<<<<<
 *         table_title = f"{self.datetime_str}-{day_len}"
 *         ax.set_title(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_plt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_subplots); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_figsize, __pyx_tuple__48) < 0) __PYX_ERR(0, 821, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
    PyObject* sequence = __pyx_t_6;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 821, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < 0) __PYX_ERR(0, 821, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 821, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_ax = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":822
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 *         table_title = f"{self.datetime_str}-{day_len}"             # <<<<<<<<<<<<<<
 *         ax.set_title(
 *             f'{self.datetime_str}-{day_len}\n\n:={day_len},=0,=1')
 */
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__64);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__64);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u__64);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_n_u__65);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 12;
  __Pyx_GIVEREF(__pyx_n_u__65);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_n_u__65);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_table_title = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":823
 *         fig, ax = plt.subplots(figsize=(8, 8))
 *         table_title = f"{self.datetime_str}-{day_len}"
 *         ax.set_title(             # <<<<<<<<<<<<<<
 *             f'{self.datetime_str}-{day_len}\n\n:={day_len},=0,=1')
 *         # ax.set_title(':={day_len},=0,=1', loc='left', fontsize=6)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_set_title); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "tbstock/tradeStrategy/stockStrategy.py":824
 *         table_title = f"{self.datetime_str}-{day_len}"
 *         ax.set_title(
 *             f'{self.datetime_str}-{day_len}\n\n:={day_len},=0,=1')             # <<<<<<<<<<<<<<
 *         # ax.set_title(':={day_len},=0,=1', loc='left', fontsize=6)
 *         # plt.annotate(f':={day_len},=0,=1', xy=(1, 25),  fontsize=10,
 */
  __pyx_t_2 = PyTuple_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_datetime_str); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_INCREF(__pyx_kp_u__64);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__64);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__64);
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_INCREF(__pyx_kp_u__66);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 27;
  __Pyx_GIVEREF(__pyx_kp_u__66);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__66);
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_day_len, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_12);
  __pyx_t_12 = 0;
  __Pyx_INCREF(__pyx_kp_u_0_1);
  __pyx_t_8 = (65535 > __pyx_t_8) ? 65535 : __pyx_t_8;
  __pyx_t_7 += 25;
  __Pyx_GIVEREF(__pyx_kp_u_0_1);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_kp_u_0_1);
  __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_2, 6, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_12};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":830
 * 
 *         ##
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"             # <<<<<<<<<<<<<<
 *         tab = Table(
 *             df=strategy_data_df,
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_img_save_path_root); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_filename); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_12, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__11);
  __pyx_t_7 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__11);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u__11);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u_png);
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_png);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u_png);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_table_save_path = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":831
 *         ##
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "tbstock/tradeStrategy/stockStrategy.py":832
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         tab = Table(
 *             df=strategy_data_df,             # <<<<<<<<<<<<<<
 *             ax=ax,
 *             textprops={
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_df, __pyx_v_strategy_data_df) < 0) __PYX_ERR(0, 832, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":833
 *         tab = Table(
 *             df=strategy_data_df,
 *             ax=ax,             # <<<<<<<<<<<<<<
 *             textprops={
 *                 'ha': 'center',  #
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ax, __pyx_v_ax) < 0) __PYX_ERR(0, 832, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":835
 *             ax=ax,
 *             textprops={
 *                 'ha': 'center',  #             # <<<<<<<<<<<<<<
 *             },
 *             column_definitions=[
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ha, __pyx_n_s_center) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_textprops, __pyx_t_4) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":838
 *             },
 *             column_definitions=[
 *                 ColDef(name="index", title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="code", title=''),
 *                 ColDef(name="date", title=''),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_n_s_index) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_title, __pyx_kp_s__28) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":839
 *             column_definitions=[
 *                 ColDef(name="index", title=''),
 *                 ColDef(name="code", title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="date", title=''),
 *                 ColDef(name="holder_num", title=''),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_n_s_code) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_title, __pyx_kp_s__67) < 0) __PYX_ERR(0, 839, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":840
 *                 ColDef(name="index", title=''),
 *                 ColDef(name="code", title=''),
 *                 ColDef(name="date", title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="holder_num", title=''),
 *                 ColDef(name="avg_amount_pa", title=''),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_n_s_date) < 0) __PYX_ERR(0, 840, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_title, __pyx_kp_s__68) < 0) __PYX_ERR(0, 840, __pyx_L1_error)
  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":841
 *                 ColDef(name="code", title=''),
 *                 ColDef(name="date", title=''),
 *                 ColDef(name="holder_num", title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="avg_amount_pa", title=''),
 *                 ColDef(name="decrease_ratio", title='', formatter="{:.2%}"),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_n_s_holder_num) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_title, __pyx_kp_s__69) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":842
 *                 ColDef(name="date", title=''),
 *                 ColDef(name="holder_num", title=''),
 *                 ColDef(name="avg_amount_pa", title=''),             # <<<<<<<<<<<<<<
 *                 ColDef(name="decrease_ratio", title='', formatter="{:.2%}"),
 *                 ColDef(name="num_quantile", title='', formatter="{:.2f}"),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_n_s_avg_amount_pa) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_title, __pyx_kp_s__70) < 0) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":843
 *                 ColDef(name="holder_num", title=''),
 *                 ColDef(name="avg_amount_pa", title=''),
 *                 ColDef(name="decrease_ratio", title='', formatter="{:.2%}"),             # <<<<<<<<<<<<<<
 *                 ColDef(name="num_quantile", title='', formatter="{:.2f}"),
 *             ]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_n_s_decrease_ratio) < 0) __PYX_ERR(0, 843, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_title, __pyx_kp_s__71) < 0) __PYX_ERR(0, 843, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_formatter, __pyx_kp_s_2) < 0) __PYX_ERR(0, 843, __pyx_L1_error)
  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":844
 *                 ColDef(name="avg_amount_pa", title=''),
 *                 ColDef(name="decrease_ratio", title='', formatter="{:.2%}"),
 *                 ColDef(name="num_quantile", title='', formatter="{:.2f}"),             # <<<<<<<<<<<<<<
 *             ]
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_name, __pyx_n_s_num_quantile) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_title, __pyx_kp_s__72) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_formatter, __pyx_kp_s_2f) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":837
 *                 'ha': 'center',  #
 *             },
 *             column_definitions=[             # <<<<<<<<<<<<<<
 *                 ColDef(name="index", title=''),
 *                 ColDef(name="code", title=''),
 */
  __pyx_t_12 = PyList_New(7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_9)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_13)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_14);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_14)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 3, __pyx_t_15)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_16);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 4, __pyx_t_16)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_17);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 5, __pyx_t_17)) __PYX_ERR(0, 837, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_18);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 6, __pyx_t_18)) __PYX_ERR(0, 837, __pyx_L1_error);
  __pyx_t_9 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __pyx_t_15 = 0;
  __pyx_t_16 = 0;
  __pyx_t_17 = 0;
  __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_column_definitions, __pyx_t_12) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":831
 *         ##
 *         table_save_path = self.img_save_path_root + f"{self.base_filename}-{strategy_key_name}.png"
 *         tab = Table(             # <<<<<<<<<<<<<<
 *             df=strategy_data_df,
 *             ax=ax,
 */
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tab = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":848
 *         )
 * 
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=500, bbox_inches='tight')             # <<<<<<<<<<<<<<
 *         # plt.show()
 *         plt.close()
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_savefig); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_table_save_path);
  __Pyx_GIVEREF(__pyx_v_table_save_path);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_table_save_path)) __PYX_ERR(0, 848, __pyx_L1_error);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_get_facecolor); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_16 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL};
    __pyx_t_18 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_facecolor, __pyx_t_18) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dpi, __pyx_int_500) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bbox_inches, __pyx_n_s_tight) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":850
 *         fig.savefig(table_save_path, facecolor=fig.get_facecolor(), dpi=500, bbox_inches='tight')
 *         # plt.show()
 *         plt.close()             # <<<<<<<<<<<<<<
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_18 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":851
 *         # plt.show()
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_v_table_title, __pyx_v_table_save_path) < 0) __PYX_ERR(0, 851, __pyx_L1_error)
  __pyx_v_temp_dict = ((PyObject*)__pyx_t_18);
  __pyx_t_18 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":852
 *         plt.close()
 *         temp_dict = {table_title: table_save_path}
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict             # <<<<<<<<<<<<<<
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:
 */
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_18, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_strategy_img_path, __pyx_v_temp_dict) < 0))) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":799
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotHoldNumberDecrease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_day_len);
  __Pyx_XDECREF(__pyx_v_strategy_data_df);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XDECREF(__pyx_v_table_title);
  __Pyx_XDECREF(__pyx_v_table_save_path);
  __Pyx_XDECREF(__pyx_v_tab);
  __Pyx_XDECREF(__pyx_v_temp_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":854
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:             # <<<<<<<<<<<<<<
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_49splitStockData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_49splitStockData = {"splitStockData", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_49splitStockData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_49splitStockData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_origin_df = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("splitStockData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_origin_df,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_origin_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("splitStockData", 1, 2, 2, 1); __PYX_ERR(0, 854, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "splitStockData") < 0)) __PYX_ERR(0, 854, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_origin_df = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("splitStockData", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 854, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.splitStockData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_48splitStockData(__pyx_self, __pyx_v_self, __pyx_v_origin_df);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_48splitStockData(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_origin_df) {
  PyObject *__pyx_v_datas = NULL;
  PyObject *__pyx_v_times = NULL;
  PyObject *__pyx_v_vols = NULL;
  PyObject *__pyx_v_difs = NULL;
  PyObject *__pyx_v_deas = NULL;
  PyObject *__pyx_v_macds = NULL;
  PyObject *__pyx_v_ma_5 = NULL;
  PyObject *__pyx_v_ma_10 = NULL;
  PyObject *__pyx_v_ma_20 = NULL;
  PyObject *__pyx_v_ma_30 = NULL;
  PyObject *__pyx_v_ma_60 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("splitStockData", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":855
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high             # <<<<<<<<<<<<<<
 *         times = origin_df['date'].tolist()
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_origin_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_open)) __PYX_ERR(0, 855, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_close)) __PYX_ERR(0, 855, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_low)) __PYX_ERR(0, 855, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_high)) __PYX_ERR(0, 855, __pyx_L1_error);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_slice__73);
  __Pyx_GIVEREF(__pyx_slice__73);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_slice__73)) __PYX_ERR(0, 855, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_datas = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":856
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()             # <<<<<<<<<<<<<<
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()
 *         difs = origin_df['macd'].round(2).tolist()
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_times = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":857
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()             # <<<<<<<<<<<<<<
 *         difs = origin_df['macd'].round(2).tolist()
 *         deas = origin_df['macdsignal'].round(2).tolist()
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_volume); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_2, __pyx_int_1000000, 0xF4240, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_vols = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":858
 *         times = origin_df['date'].tolist()
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()
 *         difs = origin_df['macd'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         deas = origin_df['macdsignal'].round(2).tolist()
 *         macds = origin_df['macdhist'].round(2).tolist()
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_macd); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_difs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":859
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()
 *         difs = origin_df['macd'].round(2).tolist()
 *         deas = origin_df['macdsignal'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         macds = origin_df['macdhist'].round(2).tolist()
 *         ma_5 = origin_df['ema_5'].round(2).tolist()
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_macdsignal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_round); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_deas = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":860
 *         difs = origin_df['macd'].round(2).tolist()
 *         deas = origin_df['macdsignal'].round(2).tolist()
 *         macds = origin_df['macdhist'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         ma_5 = origin_df['ema_5'].round(2).tolist()
 *         ma_10 = origin_df['ema_10'].round(2).tolist()
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_macdhist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_macds = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":861
 *         deas = origin_df['macdsignal'].round(2).tolist()
 *         macds = origin_df['macdhist'].round(2).tolist()
 *         ma_5 = origin_df['ema_5'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         ma_10 = origin_df['ema_10'].round(2).tolist()
 *         ma_20 = origin_df['ema_20'].round(2).tolist()
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_ema_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_ma_5 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":862
 *         macds = origin_df['macdhist'].round(2).tolist()
 *         ma_5 = origin_df['ema_5'].round(2).tolist()
 *         ma_10 = origin_df['ema_10'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         ma_20 = origin_df['ema_20'].round(2).tolist()
 *         ma_30 = origin_df['ema_30'].round(2).tolist()
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_ema_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_round); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_ma_10 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":863
 *         ma_5 = origin_df['ema_5'].round(2).tolist()
 *         ma_10 = origin_df['ema_10'].round(2).tolist()
 *         ma_20 = origin_df['ema_20'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         ma_30 = origin_df['ema_30'].round(2).tolist()
 *         ma_60 = origin_df['ema_60'].round(2).tolist()
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_ema_20); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_round); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_ma_20 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":864
 *         ma_10 = origin_df['ema_10'].round(2).tolist()
 *         ma_20 = origin_df['ema_20'].round(2).tolist()
 *         ma_30 = origin_df['ema_30'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         ma_60 = origin_df['ema_60'].round(2).tolist()
 *         return {
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_ema_30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_round); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_int_2};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_ma_30 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":865
 *         ma_20 = origin_df['ema_20'].round(2).tolist()
 *         ma_30 = origin_df['ema_30'].round(2).tolist()
 *         ma_60 = origin_df['ema_60'].round(2).tolist()             # <<<<<<<<<<<<<<
 *         return {
 *             "datas": datas,
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_origin_df, __pyx_n_s_ema_60); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_round); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_ma_60 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":866
 *         ma_30 = origin_df['ema_30'].round(2).tolist()
 *         ma_60 = origin_df['ema_60'].round(2).tolist()
 *         return {             # <<<<<<<<<<<<<<
 *             "datas": datas,
 *             "times": times,
 */
  __Pyx_XDECREF(__pyx_r);

  /* "tbstock/tradeStrategy/stockStrategy.py":867
 *         ma_60 = origin_df['ema_60'].round(2).tolist()
 *         return {
 *             "datas": datas,             # <<<<<<<<<<<<<<
 *             "times": times,
 *             "vols": vols,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_datas, __pyx_v_datas) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":868
 *         return {
 *             "datas": datas,
 *             "times": times,             # <<<<<<<<<<<<<<
 *             "vols": vols,
 *             "macds": macds,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_times, __pyx_v_times) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":869
 *             "datas": datas,
 *             "times": times,
 *             "vols": vols,             # <<<<<<<<<<<<<<
 *             "macds": macds,
 *             "difs": difs,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vols, __pyx_v_vols) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":870
 *             "times": times,
 *             "vols": vols,
 *             "macds": macds,             # <<<<<<<<<<<<<<
 *             "difs": difs,
 *             "deas": deas,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_macds, __pyx_v_macds) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":871
 *             "vols": vols,
 *             "macds": macds,
 *             "difs": difs,             # <<<<<<<<<<<<<<
 *             "deas": deas,
 *             "ma_5": ma_5,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_difs, __pyx_v_difs) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":872
 *             "macds": macds,
 *             "difs": difs,
 *             "deas": deas,             # <<<<<<<<<<<<<<
 *             "ma_5": ma_5,
 *             "ma_10": ma_10,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_deas, __pyx_v_deas) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":873
 *             "difs": difs,
 *             "deas": deas,
 *             "ma_5": ma_5,             # <<<<<<<<<<<<<<
 *             "ma_10": ma_10,
 *             "ma_20": ma_20,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ma_5, __pyx_v_ma_5) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":874
 *             "deas": deas,
 *             "ma_5": ma_5,
 *             "ma_10": ma_10,             # <<<<<<<<<<<<<<
 *             "ma_20": ma_20,
 *             "ma_30": ma_30,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ma_10, __pyx_v_ma_10) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":875
 *             "ma_5": ma_5,
 *             "ma_10": ma_10,
 *             "ma_20": ma_20,             # <<<<<<<<<<<<<<
 *             "ma_30": ma_30,
 *             "ma_60": ma_60,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ma_20, __pyx_v_ma_20) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":876
 *             "ma_10": ma_10,
 *             "ma_20": ma_20,
 *             "ma_30": ma_30,             # <<<<<<<<<<<<<<
 *             "ma_60": ma_60,
 *         }
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ma_30, __pyx_v_ma_30) < 0) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":877
 *             "ma_20": ma_20,
 *             "ma_30": ma_30,
 *             "ma_60": ma_60,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ma_60, __pyx_v_ma_60) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":854
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:             # <<<<<<<<<<<<<<
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.splitStockData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datas);
  __Pyx_XDECREF(__pyx_v_times);
  __Pyx_XDECREF(__pyx_v_vols);
  __Pyx_XDECREF(__pyx_v_difs);
  __Pyx_XDECREF(__pyx_v_deas);
  __Pyx_XDECREF(__pyx_v_macds);
  __Pyx_XDECREF(__pyx_v_ma_5);
  __Pyx_XDECREF(__pyx_v_ma_10);
  __Pyx_XDECREF(__pyx_v_ma_20);
  __Pyx_XDECREF(__pyx_v_ma_30);
  __Pyx_XDECREF(__pyx_v_ma_60);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":880
 *         }
 * 
 *     def drawKlineChart(self, data, stock_code):             # <<<<<<<<<<<<<<
 *         kline = (
 *             Kline()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_51drawKlineChart(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_51drawKlineChart = {"drawKlineChart", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_51drawKlineChart, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_51drawKlineChart(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_stock_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("drawKlineChart (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,&__pyx_n_s_stock_code,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("drawKlineChart", 1, 3, 3, 1); __PYX_ERR(0, 880, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("drawKlineChart", 1, 3, 3, 2); __PYX_ERR(0, 880, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "drawKlineChart") < 0)) __PYX_ERR(0, 880, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
    __pyx_v_stock_code = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("drawKlineChart", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 880, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.drawKlineChart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_50drawKlineChart(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_stock_code);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_50drawKlineChart(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_stock_code) {
  PyObject *__pyx_v_kline = NULL;
  PyObject *__pyx_v_kline_line = NULL;
  PyObject *__pyx_v_overlap_kline_line = NULL;
  PyObject *__pyx_v_bar_1 = NULL;
  PyObject *__pyx_v_bar_2 = NULL;
  PyObject *__pyx_v_line_2 = NULL;
  PyObject *__pyx_v_overlap_bar_line = NULL;
  PyObject *__pyx_v_grid_chart = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("drawKlineChart", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":882
 *     def drawKlineChart(self, data, stock_code):
 *         kline = (
 *             Kline()             # <<<<<<<<<<<<<<
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Kline); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":883
 *         kline = (
 *             Kline()
 *             .add_xaxis(xaxis_data=data["times"])             # <<<<<<<<<<<<<<
 *             .add_yaxis(
 *                 series_name="",
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xaxis_data, __pyx_t_3) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":884
 *             Kline()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="",
 *                 y_axis=data["datas"],
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":885
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 *                 series_name="",             # <<<<<<<<<<<<<<
 *                 y_axis=data["datas"],
 *                 itemstyle_opts=opts.ItemStyleOpts(
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_series_name, __pyx_kp_s__23) < 0) __PYX_ERR(0, 885, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":886
 *             .add_yaxis(
 *                 series_name="",
 *                 y_axis=data["datas"],             # <<<<<<<<<<<<<<
 *                 itemstyle_opts=opts.ItemStyleOpts(
 *                     color="#ef232a",
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_datas); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_y_axis, __pyx_t_2) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":887
 *                 series_name="",
 *                 y_axis=data["datas"],
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color="#ef232a",
 *                     color0="#14b143",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ItemStyleOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":888
 *                 y_axis=data["datas"],
 *                 itemstyle_opts=opts.ItemStyleOpts(
 *                     color="#ef232a",             # <<<<<<<<<<<<<<
 *                     color0="#14b143",
 *                     border_color="#ef232a",
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color, __pyx_kp_s_ef232a) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color0, __pyx_kp_s_14b143) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_border_color, __pyx_kp_s_ef232a) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_border_color0, __pyx_kp_s_14b143) < 0) __PYX_ERR(0, 888, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":887
 *                 series_name="",
 *                 y_axis=data["datas"],
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color="#ef232a",
 *                     color0="#14b143",
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_itemstyle_opts, __pyx_t_6) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":893
 *                     border_color0="#14b143",
 *                 ),
 *                 markpoint_opts=opts.MarkPointOpts(             # <<<<<<<<<<<<<<
 *                     data=[
 *                         opts.MarkPointItem(type_="max", name=""),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_MarkPointOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":894
 *                 ),
 *                 markpoint_opts=opts.MarkPointOpts(
 *                     data=[             # <<<<<<<<<<<<<<
 *                         opts.MarkPointItem(type_="max", name=""),
 *                         opts.MarkPointItem(type_="min", name=""),
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "tbstock/tradeStrategy/stockStrategy.py":895
 *                 markpoint_opts=opts.MarkPointOpts(
 *                     data=[
 *                         opts.MarkPointItem(type_="max", name=""),             # <<<<<<<<<<<<<<
 *                         opts.MarkPointItem(type_="min", name=""),
 *                     ]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_MarkPointItem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_s_max) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_kp_s__74) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":896
 *                     data=[
 *                         opts.MarkPointItem(type_="max", name=""),
 *                         opts.MarkPointItem(type_="min", name=""),             # <<<<<<<<<<<<<<
 *                     ]
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_MarkPointItem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_s_min) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_kp_s__75) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":894
 *                 ),
 *                 markpoint_opts=opts.MarkPointOpts(
 *                     data=[             # <<<<<<<<<<<<<<
 *                         opts.MarkPointItem(type_="max", name=""),
 *                         opts.MarkPointItem(type_="min", name=""),
 */
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error);
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_t_5) < 0) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":893
 *                     border_color0="#14b143",
 *                 ),
 *                 markpoint_opts=opts.MarkPointOpts(             # <<<<<<<<<<<<<<
 *                     data=[
 *                         opts.MarkPointItem(type_="max", name=""),
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_markpoint_opts, __pyx_t_5) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":884
 *             Kline()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="",
 *                 y_axis=data["datas"],
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":900
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),
 *                 xaxis_opts=opts.AxisOpts(
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":901
 *             )
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_TitleOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_n_u_Kline_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_title, __pyx_t_9) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos_left, __pyx_kp_s_0) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_title_opts, __pyx_t_9) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":902
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     is_scale=True,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":903
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",             # <<<<<<<<<<<<<<
 *                     is_scale=True,
 *                     boundary_gap=False,
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_s_category) < 0) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":904
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 *                     is_scale=True,             # <<<<<<<<<<<<<<
 *                     boundary_gap=False,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 */
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_scale, Py_True) < 0) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":905
 *                     type_="category",
 *                     is_scale=True,
 *                     boundary_gap=False,             # <<<<<<<<<<<<<<
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 */
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_boundary_gap, Py_False) < 0) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":906
 *                     is_scale=True,
 *                     boundary_gap=False,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),             # <<<<<<<<<<<<<<
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                     split_number=20,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AxisLineOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_on_zero, Py_False) < 0) __PYX_ERR(0, 906, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_axisline_opts, __pyx_t_8) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":907
 *                     boundary_gap=False,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     split_number=20,
 *                     min_="dataMin",
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 907, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_splitline_opts, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_split_number, __pyx_int_20) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_min_2, __pyx_n_s_dataMin) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_max_2, __pyx_n_s_dataMax) < 0) __PYX_ERR(0, 903, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":902
 *             .set_global_opts(
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     is_scale=True,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_xaxis_opts, __pyx_t_2) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":912
 *                     max_="dataMax",
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     is_scale=True, splitline_opts=opts.SplitLineOpts(is_show=True)
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":913
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 *                     is_scale=True, splitline_opts=opts.SplitLineOpts(is_show=True)             # <<<<<<<<<<<<<<
 *                 ),
 *                 tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="line"),
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_scale, Py_True) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_True) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_splitline_opts, __pyx_t_6) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":912
 *                     max_="dataMax",
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     is_scale=True, splitline_opts=opts.SplitLineOpts(is_show=True)
 *                 ),
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_yaxis_opts, __pyx_t_6) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":915
 *                     is_scale=True, splitline_opts=opts.SplitLineOpts(is_show=True)
 *                 ),
 *                 tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="line"),             # <<<<<<<<<<<<<<
 *                 datazoom_opts=[
 *                     opts.DataZoomOpts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_TooltipOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_trigger, __pyx_n_s_axis) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axis_pointer_type, __pyx_n_s_line) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_tooltip_opts, __pyx_t_9) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":917
 *                 tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="line"),
 *                 datazoom_opts=[
 *                     opts.DataZoomOpts(             # <<<<<<<<<<<<<<
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100
 *                     ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DataZoomOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":918
 *                 datazoom_opts=[
 *                     opts.DataZoomOpts(
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100             # <<<<<<<<<<<<<<
 *                     ),
 *                     opts.DataZoomOpts(
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 918, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_type, __pyx_n_s_inside) < 0) __PYX_ERR(0, 918, __pyx_L1_error)
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 918, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(0, 918, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_t_2) < 0) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_range_end, __pyx_int_100) < 0) __PYX_ERR(0, 918, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":917
 *                 tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="line"),
 *                 datazoom_opts=[
 *                     opts.DataZoomOpts(             # <<<<<<<<<<<<<<
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100
 *                     ),
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":920
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100
 *                     ),
 *                     opts.DataZoomOpts(             # <<<<<<<<<<<<<<
 *                         is_show=True, xaxis_index=[0, 1], pos_top="97%", range_end=100
 *                     ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DataZoomOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":921
 *                     ),
 *                     opts.DataZoomOpts(
 *                         is_show=True, xaxis_index=[0, 1], pos_top="97%", range_end=100             # <<<<<<<<<<<<<<
 *                     ),
 *                     opts.DataZoomOpts(is_show=False, xaxis_index=[0, 2], range_end=100),
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_show, Py_True) < 0) __PYX_ERR(0, 921, __pyx_L1_error)
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 921, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 921, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_t_1) < 0) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pos_top, __pyx_kp_s_97) < 0) __PYX_ERR(0, 921, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_range_end, __pyx_int_100) < 0) __PYX_ERR(0, 921, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":920
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100
 *                     ),
 *                     opts.DataZoomOpts(             # <<<<<<<<<<<<<<
 *                         is_show=True, xaxis_index=[0, 1], pos_top="97%", range_end=100
 *                     ),
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":923
 *                         is_show=True, xaxis_index=[0, 1], pos_top="97%", range_end=100
 *                     ),
 *                     opts.DataZoomOpts(is_show=False, xaxis_index=[0, 2], range_end=100),             # <<<<<<<<<<<<<<
 *                 ],
 *                 # #  axis
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_DataZoomOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
  __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_0)) __PYX_ERR(0, 923, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_2)) __PYX_ERR(0, 923, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_t_8) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_range_end, __pyx_int_100) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":916
 *                 ),
 *                 tooltip_opts=opts.TooltipOpts(trigger="axis", axis_pointer_type="line"),
 *                 datazoom_opts=[             # <<<<<<<<<<<<<<
 *                     opts.DataZoomOpts(
 *                         is_show=False, type_="inside", xaxis_index=[0, 0], range_end=100
 */
  __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_8)) __PYX_ERR(0, 916, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_datazoom_opts, __pyx_t_9) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":900
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 title_opts=opts.TitleOpts(title=f"{stock_code}_Kline", pos_left="0"),
 *                 xaxis_opts=opts.AxisOpts(
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_kline = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":935
 * 
 *         kline_line = (
 *             Line()             # <<<<<<<<<<<<<<
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":936
 *         kline_line = (
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])             # <<<<<<<<<<<<<<
 *             .add_yaxis(
 *                 series_name="MA5",
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_data, __pyx_t_3) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":937
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA5",
 *                 y_axis=data["ma_5"],
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":938
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 *                 series_name="MA5",             # <<<<<<<<<<<<<<
 *                 y_axis=data["ma_5"],
 *                 is_smooth=True,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_series_name, __pyx_n_s_MA5) < 0) __PYX_ERR(0, 938, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":939
 *             .add_yaxis(
 *                 series_name="MA5",
 *                 y_axis=data["ma_5"],             # <<<<<<<<<<<<<<
 *                 is_smooth=True,
 *                 symbol="none",
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ma_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_y_axis, __pyx_t_5) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":940
 *                 series_name="MA5",
 *                 y_axis=data["ma_5"],
 *                 is_smooth=True,             # <<<<<<<<<<<<<<
 *                 symbol="none",
 *                 # symbol_size=2,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_smooth, Py_True) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 938, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":943
 *                 symbol="none",
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),             # <<<<<<<<<<<<<<
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_LineStyleOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_opacity, __pyx_float_0_5) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_linestyle_opts, __pyx_t_1) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":944
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_label_opts, __pyx_t_8) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":937
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA5",
 *                 y_axis=data["ma_5"],
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":946
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA10",
 *                 y_axis=data["ma_10"],
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":947
 *             )
 *             .add_yaxis(
 *                 series_name="MA10",             # <<<<<<<<<<<<<<
 *                 y_axis=data["ma_10"],
 *                 is_smooth=True,
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_series_name, __pyx_n_s_MA10) < 0) __PYX_ERR(0, 947, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":948
 *             .add_yaxis(
 *                 series_name="MA10",
 *                 y_axis=data["ma_10"],             # <<<<<<<<<<<<<<
 *                 is_smooth=True,
 *                 symbol="none",
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ma_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_y_axis, __pyx_t_9) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":949
 *                 series_name="MA10",
 *                 y_axis=data["ma_10"],
 *                 is_smooth=True,             # <<<<<<<<<<<<<<
 *                 symbol="none",
 *                 # symbol_size=2,
 */
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_is_smooth, Py_True) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 947, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":952
 *                 symbol="none",
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),             # <<<<<<<<<<<<<<
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_LineStyleOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_opacity, __pyx_float_0_5) < 0) __PYX_ERR(0, 952, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_linestyle_opts, __pyx_t_5) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":953
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 953, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_label_opts, __pyx_t_1) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":946
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA10",
 *                 y_axis=data["ma_10"],
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":955
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA20",
 *                 y_axis=data["ma_20"],
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":956
 *             )
 *             .add_yaxis(
 *                 series_name="MA20",             # <<<<<<<<<<<<<<
 *                 y_axis=data["ma_20"],
 *                 is_smooth=True,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_series_name, __pyx_n_s_MA20) < 0) __PYX_ERR(0, 956, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":957
 *             .add_yaxis(
 *                 series_name="MA20",
 *                 y_axis=data["ma_20"],             # <<<<<<<<<<<<<<
 *                 is_smooth=True,
 *                 symbol="none",
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ma_20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_y_axis, __pyx_t_3) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":958
 *                 series_name="MA20",
 *                 y_axis=data["ma_20"],
 *                 is_smooth=True,             # <<<<<<<<<<<<<<
 *                 symbol="none",
 *                 # symbol_size=2,
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_smooth, Py_True) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 956, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":961
 *                 symbol="none",
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),             # <<<<<<<<<<<<<<
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LineStyleOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_opacity, __pyx_float_0_5) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_linestyle_opts, __pyx_t_9) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":962
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 962, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_label_opts, __pyx_t_5) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":955
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA20",
 *                 y_axis=data["ma_20"],
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":964
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA30",
 *                 y_axis=data["ma_30"],
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":965
 *             )
 *             .add_yaxis(
 *                 series_name="MA30",             # <<<<<<<<<<<<<<
 *                 y_axis=data["ma_30"],
 *                 is_smooth=True,
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_series_name, __pyx_n_s_MA30) < 0) __PYX_ERR(0, 965, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":966
 *             .add_yaxis(
 *                 series_name="MA30",
 *                 y_axis=data["ma_30"],             # <<<<<<<<<<<<<<
 *                 is_smooth=True,
 *                 symbol="none",
 */
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ma_30); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_y_axis, __pyx_t_8) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":967
 *                 series_name="MA30",
 *                 y_axis=data["ma_30"],
 *                 is_smooth=True,             # <<<<<<<<<<<<<<
 *                 symbol="none",
 *                 # symbol_size=2,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_is_smooth, Py_True) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 965, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":970
 *                 symbol="none",
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),             # <<<<<<<<<<<<<<
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_LineStyleOpts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_opacity, __pyx_float_0_5) < 0) __PYX_ERR(0, 970, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_linestyle_opts, __pyx_t_3) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":971
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_label_opts, __pyx_t_9) < 0) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":964
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA30",
 *                 y_axis=data["ma_30"],
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":973
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA60",
 *                 y_axis=data["ma_60"],
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":974
 *             )
 *             .add_yaxis(
 *                 series_name="MA60",             # <<<<<<<<<<<<<<
 *                 y_axis=data["ma_60"],
 *                 is_smooth=True,
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_series_name, __pyx_n_s_MA60) < 0) __PYX_ERR(0, 974, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":975
 *             .add_yaxis(
 *                 series_name="MA60",
 *                 y_axis=data["ma_60"],             # <<<<<<<<<<<<<<
 *                 is_smooth=True,
 *                 symbol="none",
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_ma_60); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y_axis, __pyx_t_1) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":976
 *                 series_name="MA60",
 *                 y_axis=data["ma_60"],
 *                 is_smooth=True,             # <<<<<<<<<<<<<<
 *                 symbol="none",
 *                 # symbol_size=2,
 */
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_smooth, Py_True) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 974, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":979
 *                 symbol="none",
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),             # <<<<<<<<<<<<<<
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LineStyleOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_opacity, __pyx_float_0_5) < 0) __PYX_ERR(0, 979, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_linestyle_opts, __pyx_t_8) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":980
 *                 # symbol_size=2,
 *                 linestyle_opts=opts.LineStyleOpts(opacity=0.5),
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .set_global_opts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_label_opts, __pyx_t_3) < 0) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":973
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MA60",
 *                 y_axis=data["ma_60"],
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":982
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":983
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=1,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":984
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",             # <<<<<<<<<<<<<<
 *                     grid_index=1,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_s_category) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_grid_index, __pyx_int_1) < 0) __PYX_ERR(0, 984, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":986
 *                     type_="category",
 *                     grid_index=1,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_axislabel_opts, __pyx_t_6) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":983
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=1,
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_xaxis_opts, __pyx_t_6) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":988
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     grid_index=1,
 *                     split_number=3,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":989
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 *                     grid_index=1,             # <<<<<<<<<<<<<<
 *                     split_number=3,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_grid_index, __pyx_int_1) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_split_number, __pyx_int_3) < 0) __PYX_ERR(0, 989, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":991
 *                     grid_index=1,
 *                     split_number=3,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),             # <<<<<<<<<<<<<<
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_AxisLineOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_is_on_zero, Py_False) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axisline_opts, __pyx_t_2) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":992
 *                     split_number=3,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                     axislabel_opts=opts.LabelOpts(is_show=True),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AxisTickOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axistick_opts, __pyx_t_1) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":993
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     axislabel_opts=opts.LabelOpts(is_show=True),
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 993, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_splitline_opts, __pyx_t_8) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":994
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                     axislabel_opts=opts.LabelOpts(is_show=True),             # <<<<<<<<<<<<<<
 *                 ),
 *             )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_is_show, Py_True) < 0) __PYX_ERR(0, 994, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axislabel_opts, __pyx_t_2) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":988
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     grid_index=1,
 *                     split_number=3,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_yaxis_opts, __pyx_t_2) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":982
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_kline_line = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":999
 *         )
 *         # Overlap Kline + Line
 *         overlap_kline_line = kline.overlap(kline_line)             # <<<<<<<<<<<<<<
 * 
 *         # Bar-1
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_kline, __pyx_n_s_overlap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_kline_line};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_overlap_kline_line = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1003
 *         # Bar-1
 *         bar_1 = (
 *             Bar()             # <<<<<<<<<<<<<<
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Bar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1004
 *         bar_1 = (
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])             # <<<<<<<<<<<<<<
 *             .add_yaxis(
 *                 series_name="Volumn",
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_times); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xaxis_data, __pyx_t_9) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1005
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="Volumn",
 *                 y_axis=data["vols"],
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1006
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 *                 series_name="Volumn",             # <<<<<<<<<<<<<<
 *                 y_axis=data["vols"],
 *                 xaxis_index=1,
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_series_name, __pyx_n_s_Volumn) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1007
 *             .add_yaxis(
 *                 series_name="Volumn",
 *                 y_axis=data["vols"],             # <<<<<<<<<<<<<<
 *                 xaxis_index=1,
 *                 yaxis_index=1,
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_vols); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y_axis, __pyx_t_3) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_int_1) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_yaxis_index, __pyx_int_1) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1010
 *                 xaxis_index=1,
 *                 yaxis_index=1,
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 #  echarts demo
 *                 # itemstyle_opts=opts.ItemStyleOpts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_label_opts, __pyx_t_5) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1026
 *                 # )
 *                 #  grid  add_js_funcs
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color=JsCode(
 *                         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ItemStyleOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1027
 *                 #  grid  add_js_funcs
 *                 itemstyle_opts=opts.ItemStyleOpts(
 *                     color=JsCode(             # <<<<<<<<<<<<<<
 *                         """
 *                         function(params) {
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_JsCode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_function_params_var_colorList_i};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_color, __pyx_t_6) < 0) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1026
 *                 # )
 *                 #  grid  add_js_funcs
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color=JsCode(
 *                         """
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_itemstyle_opts, __pyx_t_6) < 0) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1005
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="Volumn",
 *                 y_axis=data["vols"],
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1042
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1043
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=1,
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1044
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",             # <<<<<<<<<<<<<<
 *                     grid_index=1,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_type, __pyx_n_s_category) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_grid_index, __pyx_int_1) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1046
 *                     type_="category",
 *                     grid_index=1,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 ),
 *                 legend_opts=opts.LegendOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axislabel_opts, __pyx_t_1) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1043
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=1,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_xaxis_opts, __pyx_t_1) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1048
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 *                 ),
 *                 legend_opts=opts.LegendOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LegendOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1048, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_legend_opts, __pyx_t_5) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1042
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_bar_1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1054
 *         # Bar-2 (Overlap Bar + Line)
 *         bar_2 = (
 *             Bar()             # <<<<<<<<<<<<<<
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Bar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1055
 *         bar_2 = (
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])             # <<<<<<<<<<<<<<
 *             .add_yaxis(
 *                 series_name="MACD",
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_times); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_xaxis_data, __pyx_t_9) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1056
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MACD",
 *                 y_axis=data["macds"],
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1057
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 *                 series_name="MACD",             # <<<<<<<<<<<<<<
 *                 y_axis=data["macds"],
 *                 xaxis_index=2,
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_series_name, __pyx_n_s_MACD) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1058
 *             .add_yaxis(
 *                 series_name="MACD",
 *                 y_axis=data["macds"],             # <<<<<<<<<<<<<<
 *                 xaxis_index=2,
 *                 yaxis_index=2,
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_macds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y_axis, __pyx_t_6) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_yaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1061
 *                 xaxis_index=2,
 *                 yaxis_index=2,
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 itemstyle_opts=opts.ItemStyleOpts(
 *                     color=JsCode(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_label_opts, __pyx_t_2) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1062
 *                 yaxis_index=2,
 *                 label_opts=opts.LabelOpts(is_show=False),
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color=JsCode(
 *                         """
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ItemStyleOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1063
 *                 label_opts=opts.LabelOpts(is_show=False),
 *                 itemstyle_opts=opts.ItemStyleOpts(
 *                     color=JsCode(             # <<<<<<<<<<<<<<
 *                         """
 *                         function(params) {
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_JsCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_s_function_params_var_colorList_i_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color, __pyx_t_1) < 0) __PYX_ERR(0, 1063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1062
 *                 yaxis_index=2,
 *                 label_opts=opts.LabelOpts(is_show=False),
 *                 itemstyle_opts=opts.ItemStyleOpts(             # <<<<<<<<<<<<<<
 *                     color=JsCode(
 *                         """
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_itemstyle_opts, __pyx_t_1) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1056
 *             Bar()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="MACD",
 *                 y_axis=data["macds"],
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1078
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1079
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=2,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1080
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",             # <<<<<<<<<<<<<<
 *                     grid_index=2,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_type, __pyx_n_s_category) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_grid_index, __pyx_int_2) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1082
 *                     type_="category",
 *                     grid_index=2,
 *                     axislabel_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1082, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_axislabel_opts, __pyx_t_8) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1079
 *             )
 *             .set_global_opts(
 *                 xaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     type_="category",
 *                     grid_index=2,
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xaxis_opts, __pyx_t_8) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1084
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     grid_index=2,
 *                     split_number=4,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_AxisOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1085
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(
 *                     grid_index=2,             # <<<<<<<<<<<<<<
 *                     split_number=4,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_grid_index, __pyx_int_2) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_split_number, __pyx_int_4) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1087
 *                     grid_index=2,
 *                     split_number=4,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),             # <<<<<<<<<<<<<<
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AxisLineOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_on_zero, Py_False) < 0) __PYX_ERR(0, 1087, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axisline_opts, __pyx_t_3) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1088
 *                     split_number=4,
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                     axislabel_opts=opts.LabelOpts(is_show=True),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_AxisTickOpts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axistick_opts, __pyx_t_6) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1089
 *                     axisline_opts=opts.AxisLineOpts(is_on_zero=False),
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),             # <<<<<<<<<<<<<<
 *                     axislabel_opts=opts.LabelOpts(is_show=True),
 *                 ),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_opts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_SplitLineOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1089, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_splitline_opts, __pyx_t_2) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1090
 *                     axistick_opts=opts.AxisTickOpts(is_show=False),
 *                     splitline_opts=opts.SplitLineOpts(is_show=False),
 *                     axislabel_opts=opts.LabelOpts(is_show=True),             # <<<<<<<<<<<<<<
 *                 ),
 *                 legend_opts=opts.LegendOpts(is_show=False),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_show, Py_True) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axislabel_opts, __pyx_t_3) < 0) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1084
 *                     axislabel_opts=opts.LabelOpts(is_show=False),
 *                 ),
 *                 yaxis_opts=opts.AxisOpts(             # <<<<<<<<<<<<<<
 *                     grid_index=2,
 *                     split_number=4,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_yaxis_opts, __pyx_t_3) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1092
 *                     axislabel_opts=opts.LabelOpts(is_show=True),
 *                 ),
 *                 legend_opts=opts.LegendOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *         )
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_LegendOpts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_legend_opts, __pyx_t_5) < 0) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1078
 *                 ),
 *             )
 *             .set_global_opts(             # <<<<<<<<<<<<<<
 *                 xaxis_opts=opts.AxisOpts(
 *                     type_="category",
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_bar_2 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1097
 * 
 *         line_2 = (
 *             Line()             # <<<<<<<<<<<<<<
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1098
 *         line_2 = (
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])             # <<<<<<<<<<<<<<
 *             .add_yaxis(
 *                 series_name="DIF",
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_add_xaxis); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_times); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_xaxis_data, __pyx_t_9) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1099
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="DIF",
 *                 y_axis=data["difs"],
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1100
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(
 *                 series_name="DIF",             # <<<<<<<<<<<<<<
 *                 y_axis=data["difs"],
 *                 xaxis_index=2,
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_series_name, __pyx_n_s_DIF) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1101
 *             .add_yaxis(
 *                 series_name="DIF",
 *                 y_axis=data["difs"],             # <<<<<<<<<<<<<<
 *                 xaxis_index=2,
 *                 yaxis_index=2,
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_difs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y_axis, __pyx_t_1) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_yaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1105
 *                 yaxis_index=2,
 *                 symbol="none",
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .add_yaxis(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1105, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_label_opts, __pyx_t_8) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1099
 *             Line()
 *             .add_xaxis(xaxis_data=data["times"])
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="DIF",
 *                 y_axis=data["difs"],
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1107
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="DEA",
 *                 y_axis=data["deas"],
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_add_yaxis); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1108
 *             )
 *             .add_yaxis(
 *                 series_name="DEA",             # <<<<<<<<<<<<<<
 *                 y_axis=data["deas"],
 *                 xaxis_index=2,
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_series_name, __pyx_n_s_DEA) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1109
 *             .add_yaxis(
 *                 series_name="DEA",
 *                 y_axis=data["deas"],             # <<<<<<<<<<<<<<
 *                 xaxis_index=2,
 *                 yaxis_index=2,
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_deas); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_y_axis, __pyx_t_5) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_xaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_yaxis_index, __pyx_int_2) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_symbol, __pyx_n_s_none) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1113
 *                 yaxis_index=2,
 *                 symbol="none",
 *                 label_opts=opts.LabelOpts(is_show=False),             # <<<<<<<<<<<<<<
 *             )
 *             .set_global_opts(legend_opts=opts.LegendOpts(is_show=False))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_LabelOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_label_opts, __pyx_t_3) < 0) __PYX_ERR(0, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1107
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .add_yaxis(             # <<<<<<<<<<<<<<
 *                 series_name="DEA",
 *                 y_axis=data["deas"],
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1115
 *                 label_opts=opts.LabelOpts(is_show=False),
 *             )
 *             .set_global_opts(legend_opts=opts.LegendOpts(is_show=False))             # <<<<<<<<<<<<<<
 *         )
 *         #
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_global_opts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_LegendOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_is_show, Py_False) < 0) __PYX_ERR(0, 1115, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_legend_opts, __pyx_t_1) < 0) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_line_2 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1118
 *         )
 *         #
 *         overlap_bar_line = bar_2.overlap(line_2)             # <<<<<<<<<<<<<<
 * 
 *         #  Grid
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bar_2, __pyx_n_s_overlap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_line_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_overlap_bar_line = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1121
 * 
 *         #  Grid
 *         grid_chart = Grid()             # <<<<<<<<<<<<<<
 * 
 *         #  data.datas  html , series
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Grid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_grid_chart = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1125
 *         #  data.datas  html , series
 *         # demo
 *         grid_chart.add_js_funcs("var barData = {}".format(data["datas"]))             # <<<<<<<<<<<<<<
 * 
 *         # K MA5
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grid_chart, __pyx_n_s_add_js_funcs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_var_barData, __pyx_n_s_format); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_datas); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1128
 * 
 *         # K MA5
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             overlap_kline_line,
 *             grid_opts=opts.GridOpts(pos_left="3%", pos_right="1%", height="60%"),
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grid_chart, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1129
 *         # K MA5
 *         grid_chart.add(
 *             overlap_kline_line,             # <<<<<<<<<<<<<<
 *             grid_opts=opts.GridOpts(pos_left="3%", pos_right="1%", height="60%"),
 *         )
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_overlap_kline_line);
  __Pyx_GIVEREF(__pyx_v_overlap_kline_line);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_overlap_kline_line)) __PYX_ERR(0, 1128, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":1130
 *         grid_chart.add(
 *             overlap_kline_line,
 *             grid_opts=opts.GridOpts(pos_left="3%", pos_right="1%", height="60%"),             # <<<<<<<<<<<<<<
 *         )
 *         # Volumn
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_opts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_GridOpts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pos_left, __pyx_kp_s_3) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_pos_right, __pyx_kp_s_1_2) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_height, __pyx_kp_s_60) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_grid_opts, __pyx_t_2) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1128
 * 
 *         # K MA5
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             overlap_kline_line,
 *             grid_opts=opts.GridOpts(pos_left="3%", pos_right="1%", height="60%"),
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1133
 *         )
 *         # Volumn
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             bar_1,
 *             grid_opts=opts.GridOpts(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_grid_chart, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "tbstock/tradeStrategy/stockStrategy.py":1134
 *         # Volumn
 *         grid_chart.add(
 *             bar_1,             # <<<<<<<<<<<<<<
 *             grid_opts=opts.GridOpts(
 *                 pos_left="3%", pos_right="1%", pos_top="71%", height="10%"
 */
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_v_bar_1);
  __Pyx_GIVEREF(__pyx_v_bar_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_bar_1)) __PYX_ERR(0, 1133, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":1135
 *         grid_chart.add(
 *             bar_1,
 *             grid_opts=opts.GridOpts(             # <<<<<<<<<<<<<<
 *                 pos_left="3%", pos_right="1%", pos_top="71%", height="10%"
 *             ),
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_opts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_GridOpts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1136
 *             bar_1,
 *             grid_opts=opts.GridOpts(
 *                 pos_left="3%", pos_right="1%", pos_top="71%", height="10%"             # <<<<<<<<<<<<<<
 *             ),
 *         )
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos_left, __pyx_kp_s_3) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos_right, __pyx_kp_s_1_2) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pos_top, __pyx_kp_s_71) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_height, __pyx_kp_s_10) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1135
 *         grid_chart.add(
 *             bar_1,
 *             grid_opts=opts.GridOpts(             # <<<<<<<<<<<<<<
 *                 pos_left="3%", pos_right="1%", pos_top="71%", height="10%"
 *             ),
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_grid_opts, __pyx_t_5) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1133
 *         )
 *         # Volumn
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             bar_1,
 *             grid_opts=opts.GridOpts(
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1140
 *         )
 *         # MACD DIFS DEAS
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             overlap_bar_line,
 *             grid_opts=opts.GridOpts(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_grid_chart, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "tbstock/tradeStrategy/stockStrategy.py":1141
 *         # MACD DIFS DEAS
 *         grid_chart.add(
 *             overlap_bar_line,             # <<<<<<<<<<<<<<
 *             grid_opts=opts.GridOpts(
 *                 pos_left="3%", pos_right="1%", pos_top="82%", height="14%"
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_overlap_bar_line);
  __Pyx_GIVEREF(__pyx_v_overlap_bar_line);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_overlap_bar_line)) __PYX_ERR(0, 1140, __pyx_L1_error);

  /* "tbstock/tradeStrategy/stockStrategy.py":1142
 *         grid_chart.add(
 *             overlap_bar_line,
 *             grid_opts=opts.GridOpts(             # <<<<<<<<<<<<<<
 *                 pos_left="3%", pos_right="1%", pos_top="82%", height="14%"
 *             ),
 */
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GridOpts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1143
 *             overlap_bar_line,
 *             grid_opts=opts.GridOpts(
 *                 pos_left="3%", pos_right="1%", pos_top="82%", height="14%"             # <<<<<<<<<<<<<<
 *             ),
 *         )
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pos_left, __pyx_kp_s_3) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pos_right, __pyx_kp_s_1_2) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pos_top, __pyx_kp_s_82) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_height, __pyx_kp_s_14) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1142
 *         grid_chart.add(
 *             overlap_bar_line,
 *             grid_opts=opts.GridOpts(             # <<<<<<<<<<<<<<
 *                 pos_left="3%", pos_right="1%", pos_top="82%", height="14%"
 *             ),
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_grid_opts, __pyx_t_9) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1140
 *         )
 *         # MACD DIFS DEAS
 *         grid_chart.add(             # <<<<<<<<<<<<<<
 *             overlap_bar_line,
 *             grid_opts=opts.GridOpts(
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1146
 *             ),
 *         )
 *         grid_chart.render(f"{stock_code}_kline.html")             # <<<<<<<<<<<<<<
 *         # make_snapshot(fun_driver, file_name=f"{stock_code}_kline.html", output_name=f"{stock_code}_kline.png", driver=self.driver)
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grid_chart, __pyx_n_s_render); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_kp_u_kline_html); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":880
 *         }
 * 
 *     def drawKlineChart(self, data, stock_code):             # <<<<<<<<<<<<<<
 *         kline = (
 *             Kline()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.drawKlineChart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kline);
  __Pyx_XDECREF(__pyx_v_kline_line);
  __Pyx_XDECREF(__pyx_v_overlap_kline_line);
  __Pyx_XDECREF(__pyx_v_bar_1);
  __Pyx_XDECREF(__pyx_v_bar_2);
  __Pyx_XDECREF(__pyx_v_line_2);
  __Pyx_XDECREF(__pyx_v_overlap_bar_line);
  __Pyx_XDECREF(__pyx_v_grid_chart);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1149
 *         # make_snapshot(fun_driver, file_name=f"{stock_code}_kline.html", output_name=f"{stock_code}_kline.png", driver=self.driver)
 * 
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_53plotKline(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_53plotKline = {"plotKline", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_53plotKline, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_53plotKline(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotKline (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_601360)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20240101)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20240625)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotKline") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotKline", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1149, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotKline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_52plotKline(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_52plotKline(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date) {
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_tech_index = NULL;
  PyObject *__pyx_v_macd_df = NULL;
  PyObject *__pyx_v_ema_df = NULL;
  PyObject *__pyx_v_all_data = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotKline", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1150
 * 
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)             # <<<<<<<<<<<<<<
 *         tech_index = stockTechInd(stock_data)
 *         macd_df = tech_index.MACD()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_my_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1150, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1150, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_stock_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1151
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)             # <<<<<<<<<<<<<<
 *         macd_df = tech_index.MACD()
 *         ema_df = tech_index.EMA()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stockTechInd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stock_data};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_tech_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1152
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)
 *         macd_df = tech_index.MACD()             # <<<<<<<<<<<<<<
 *         ema_df = tech_index.EMA()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tech_index, __pyx_n_s_MACD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_macd_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1153
 *         tech_index = stockTechInd(stock_data)
 *         macd_df = tech_index.MACD()
 *         ema_df = tech_index.EMA()             # <<<<<<<<<<<<<<
 * 
 *         all_data = pd.concat([stock_data, macd_df[['macd', 'macdsignal', 'macdhist']], ema_df[['ema_5', 'ema_10', 'ema_20', 'ema_30', 'ema_60']]],
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tech_index, __pyx_n_s_EMA); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_ema_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1155
 *         ema_df = tech_index.EMA()
 * 
 *         all_data = pd.concat([stock_data, macd_df[['macd', 'macdsignal', 'macdhist']], ema_df[['ema_5', 'ema_10', 'ema_20', 'ema_30', 'ema_60']]],             # <<<<<<<<<<<<<<
 *                              axis=1)
 *         all_data[['high', 'close']] = all_data[['close', 'high']]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_macd);
  __Pyx_GIVEREF(__pyx_n_s_macd);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_macd)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_macdsignal);
  __Pyx_GIVEREF(__pyx_n_s_macdsignal);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_macdsignal)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_macdhist);
  __Pyx_GIVEREF(__pyx_n_s_macdhist);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_macdhist)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_macd_df, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_ema_5);
  __Pyx_GIVEREF(__pyx_n_s_ema_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ema_5)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ema_10);
  __Pyx_GIVEREF(__pyx_n_s_ema_10);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_ema_10)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ema_20);
  __Pyx_GIVEREF(__pyx_n_s_ema_20);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_ema_20)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ema_30);
  __Pyx_GIVEREF(__pyx_n_s_ema_30);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_ema_30)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ema_60);
  __Pyx_GIVEREF(__pyx_n_s_ema_60);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_ema_60)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_ema_df, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_stock_data);
  __Pyx_GIVEREF(__pyx_v_stock_data);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_stock_data)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1156
 * 
 *         all_data = pd.concat([stock_data, macd_df[['macd', 'macdsignal', 'macdhist']], ema_df[['ema_5', 'ema_10', 'ema_20', 'ema_30', 'ema_60']]],
 *                              axis=1)             # <<<<<<<<<<<<<<
 *         all_data[['high', 'close']] = all_data[['close', 'high']]
 *         all_data['date'] = pd.to_datetime(all_data['date']).dt.date
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1156, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1155
 *         ema_df = tech_index.EMA()
 * 
 *         all_data = pd.concat([stock_data, macd_df[['macd', 'macdsignal', 'macdhist']], ema_df[['ema_5', 'ema_10', 'ema_20', 'ema_30', 'ema_60']]],             # <<<<<<<<<<<<<<
 *                              axis=1)
 *         all_data[['high', 'close']] = all_data[['close', 'high']]
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_all_data = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1157
 *         all_data = pd.concat([stock_data, macd_df[['macd', 'macdsignal', 'macdhist']], ema_df[['ema_5', 'ema_10', 'ema_20', 'ema_30', 'ema_60']]],
 *                              axis=1)
 *         all_data[['high', 'close']] = all_data[['close', 'high']]             # <<<<<<<<<<<<<<
 *         all_data['date'] = pd.to_datetime(all_data['date']).dt.date
 * 
 */
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_close)) __PYX_ERR(0, 1157, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_high)) __PYX_ERR(0, 1157, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_all_data, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_high)) __PYX_ERR(0, 1157, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1157, __pyx_L1_error);
  if (unlikely((PyObject_SetItem(__pyx_v_all_data, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1158
 *                              axis=1)
 *         all_data[['high', 'close']] = all_data[['close', 'high']]
 *         all_data['date'] = pd.to_datetime(all_data['date']).dt.date             # <<<<<<<<<<<<<<
 * 
 *         data = self.splitStockData(all_data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_data, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_all_data, __pyx_n_s_date, __pyx_t_1) < 0))) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1160
 *         all_data['date'] = pd.to_datetime(all_data['date']).dt.date
 * 
 *         data = self.splitStockData(all_data)             # <<<<<<<<<<<<<<
 *         self.drawKlineChart(data, stock_code)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_splitStockData); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_all_data};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1161
 * 
 *         data = self.splitStockData(all_data)
 *         self.drawKlineChart(data, stock_code)             # <<<<<<<<<<<<<<
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_drawKlineChart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_data, __pyx_v_stock_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1149
 *         # make_snapshot(fun_driver, file_name=f"{stock_code}_kline.html", output_name=f"{stock_code}_kline.png", driver=self.driver)
 * 
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotKline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_tech_index);
  __Pyx_XDECREF(__pyx_v_macd_df);
  __Pyx_XDECREF(__pyx_v_ema_df);
  __Pyx_XDECREF(__pyx_v_all_data);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1163
 *         self.drawKlineChart(data, stock_code)
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_55plotKlineMpl(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_55plotKlineMpl = {"plotKlineMpl", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_55plotKlineMpl, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_55plotKlineMpl(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("plotKlineMpl (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_601360)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20240101)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20240813)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plotKlineMpl") < 0)) __PYX_ERR(0, 1163, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plotKlineMpl", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1163, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotKlineMpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_54plotKlineMpl(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_54plotKlineMpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_figure_save_name = NULL;
  PyObject *__pyx_v_fig = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_axes = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plotKlineMpl", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1164
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)             # <<<<<<<<<<<<<<
 *         if not res:
 *             return
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_my_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1164, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1164, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1164, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_stock_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1165
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 *         df = stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1165, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_7);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1166
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:
 *             return             # <<<<<<<<<<<<<<
 *         df = stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1165
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 *         df = stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1167
 *         if not res:
 *             return
 *         df = stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_open)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_high)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_low)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_close)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1167, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_data, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1170
 * 
 *         # mplfinanceK
 *         df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_date)) __PYX_ERR(0, 1170, __pyx_L1_error);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1171
 *         # mplfinanceK
 *         df.set_index(['date'], inplace=True)
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_tuple__76); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_figure_title = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1172
 *         df.set_index(['date'], inplace=True)
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"             # <<<<<<<<<<<<<<
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),
 *                              returnfig=True)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__76); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_kp_u_Kline_png); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_figure_save_name = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1173
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),             # <<<<<<<<<<<<<<
 *                              returnfig=True)
 *         # tight_layout = True,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_mpf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_df);
  __Pyx_GIVEREF(__pyx_v_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_df)) __PYX_ERR(0, 1173, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_volume, Py_True) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1174
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),
 *                              returnfig=True)             # <<<<<<<<<<<<<<
 *         # tight_layout = True,
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_returnfig, Py_True) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1173
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),             # <<<<<<<<<<<<<<
 *                              returnfig=True)
 *         # tight_layout = True,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1173, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_5 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1173, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1173, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }
  __pyx_v_fig = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_axes = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1178
 * 
 *         # Figuredpi
 *         fig.set_dpi(500)             # <<<<<<<<<<<<<<
 *         fig.set_figwidth(14)
 *         fig.set_figheight(8)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_set_dpi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_500};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1179
 *         # Figuredpi
 *         fig.set_dpi(500)
 *         fig.set_figwidth(14)             # <<<<<<<<<<<<<<
 *         fig.set_figheight(8)
 *         # fig.savefig(figure_save_name)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_set_figwidth); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_14};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1180
 *         fig.set_dpi(500)
 *         fig.set_figwidth(14)
 *         fig.set_figheight(8)             # <<<<<<<<<<<<<<
 *         # fig.savefig(figure_save_name)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fig, __pyx_n_s_set_figheight); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1184
 * 
 *         #
 *         plt.show()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_plt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_show); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1163
 *         self.drawKlineChart(data, stock_code)
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.visualStock.plotKlineMpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XDECREF(__pyx_v_figure_save_name);
  __Pyx_XDECREF(__pyx_v_fig);
  __Pyx_XDECREF(__pyx_v_axes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1188
 * 
 * class stockTechInd(object):
 *     def __init__(self, stock_data, figure=False):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_data,code,date,open,high,low,close,volume,amount,turn_over
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd___init__, "\n        stock_data\344\270\200\350\210\254\345\214\205\345\220\253\345\210\227,code,date,open,high,low,close,volume,amount,turn_over\n        \345\205\266\344\270\255open,high,low,close\346\240\271\346\215\256\350\256\241\347\256\227\351\234\200\346\261\202\345\217\257\344\273\245\344\274\240\345\205\245\344\270\215\345\244\215\346\235\203\357\274\214\345\211\215\345\244\215\346\235\203\357\274\214\345\220\216\345\244\215\346\235\203\344\273\267\346\240\274\n        :param stock_data:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd___init__};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_data = 0;
  PyObject *__pyx_v_figure = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_data,&__pyx_n_s_figure,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1188, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_figure);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1188, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_data = values[1];
    __pyx_v_figure = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1188, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd___init__(__pyx_self, __pyx_v_self, __pyx_v_stock_data, __pyx_v_figure);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_data, PyObject *__pyx_v_figure) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1194
 *         :param stock_data:
 *         '''
 *         self.stock_data = stock_data             # <<<<<<<<<<<<<<
 *         self.show_figure = figure
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stock_data, __pyx_v_stock_data) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1195
 *         '''
 *         self.stock_data = stock_data
 *         self.show_figure = figure             # <<<<<<<<<<<<<<
 * 
 *     def setStockDataDf(self, stock_data_df):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_show_figure, __pyx_v_figure) < 0) __PYX_ERR(0, 1195, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1188
 * 
 * class stockTechInd(object):
 *     def __init__(self, stock_data, figure=False):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_data,code,date,open,high,low,close,volume,amount,turn_over
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1197
 *         self.show_figure = figure
 * 
 *     def setStockDataDf(self, stock_data_df):             # <<<<<<<<<<<<<<
 *         self.stock_data = stock_data_df
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_3setStockDataDf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_3setStockDataDf = {"setStockDataDf", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_3setStockDataDf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_3setStockDataDf(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_data_df = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setStockDataDf (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_data_df,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_data_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("setStockDataDf", 1, 2, 2, 1); __PYX_ERR(0, 1197, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setStockDataDf") < 0)) __PYX_ERR(0, 1197, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_data_df = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setStockDataDf", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1197, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.setStockDataDf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_2setStockDataDf(__pyx_self, __pyx_v_self, __pyx_v_stock_data_df);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_2setStockDataDf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_data_df) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setStockDataDf", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1198
 * 
 *     def setStockDataDf(self, stock_data_df):
 *         self.stock_data = stock_data_df             # <<<<<<<<<<<<<<
 * 
 *     def setFigureShow(self, figure):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stock_data, __pyx_v_stock_data_df) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1197
 *         self.show_figure = figure
 * 
 *     def setStockDataDf(self, stock_data_df):             # <<<<<<<<<<<<<<
 *         self.stock_data = stock_data_df
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.setStockDataDf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1200
 *         self.stock_data = stock_data_df
 * 
 *     def setFigureShow(self, figure):             # <<<<<<<<<<<<<<
 *         self.show_figure = figure
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_5setFigureShow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_5setFigureShow = {"setFigureShow", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_5setFigureShow, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_5setFigureShow(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_figure = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFigureShow (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_figure,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_figure)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("setFigureShow", 1, 2, 2, 1); __PYX_ERR(0, 1200, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setFigureShow") < 0)) __PYX_ERR(0, 1200, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_figure = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFigureShow", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1200, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.setFigureShow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_4setFigureShow(__pyx_self, __pyx_v_self, __pyx_v_figure);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_4setFigureShow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_figure) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setFigureShow", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1201
 * 
 *     def setFigureShow(self, figure):
 *         self.show_figure = figure             # <<<<<<<<<<<<<<
 * 
 *     # MA
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_show_figure, __pyx_v_figure) < 0) __PYX_ERR(0, 1201, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1200
 *         self.stock_data = stock_data_df
 * 
 *     def setFigureShow(self, figure):             # <<<<<<<<<<<<<<
 *         self.show_figure = figure
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.setFigureShow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1204
 * 
 *     # MA
 *     def MaAll(self):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_7MaAll(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_6MaAll, "\n\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_7MaAll = {"MaAll", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_7MaAll, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_6MaAll};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_7MaAll(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MaAll (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "MaAll") < 0)) __PYX_ERR(0, 1204, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MaAll", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1204, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MaAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_6MaAll(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_6MaAll(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df_ma = NULL;
  PyObject *__pyx_v_types = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MaAll", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1209
 *         :return:
 *         '''
 *         df_ma = self.stock_data[['date', 'close']].copy()             # <<<<<<<<<<<<<<
 *         types = ['SMA', 'EMA', 'WMA', 'DEMA', 'TEMA', 'TRIMA', 'KAMA', 'MAMA', 'T3']
 *         for i in range(len(types)):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1209, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1209, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df_ma = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1210
 *         '''
 *         df_ma = self.stock_data[['date', 'close']].copy()
 *         types = ['SMA', 'EMA', 'WMA', 'DEMA', 'TEMA', 'TRIMA', 'KAMA', 'MAMA', 'T3']             # <<<<<<<<<<<<<<
 *         for i in range(len(types)):
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 */
  __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_SMA);
  __Pyx_GIVEREF(__pyx_n_s_SMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_EMA);
  __Pyx_GIVEREF(__pyx_n_s_EMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_EMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_WMA);
  __Pyx_GIVEREF(__pyx_n_s_WMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_WMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_DEMA);
  __Pyx_GIVEREF(__pyx_n_s_DEMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_DEMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_TEMA);
  __Pyx_GIVEREF(__pyx_n_s_TEMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_TEMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_TRIMA);
  __Pyx_GIVEREF(__pyx_n_s_TRIMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_TRIMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_KAMA);
  __Pyx_GIVEREF(__pyx_n_s_KAMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_KAMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_MAMA);
  __Pyx_GIVEREF(__pyx_n_s_MAMA);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_s_MAMA)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_T3);
  __Pyx_GIVEREF(__pyx_n_s_T3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_T3)) __PYX_ERR(0, 1210, __pyx_L1_error);
  __pyx_v_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1211
 *         df_ma = self.stock_data[['date', 'close']].copy()
 *         types = ['SMA', 'EMA', 'WMA', 'DEMA', 'TEMA', 'TRIMA', 'KAMA', 'MAMA', 'T3']
 *         for i in range(len(types)):             # <<<<<<<<<<<<<<
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 *         if self.show_figure:
 */
  __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_types); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1211, __pyx_L1_error)
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "tbstock/tradeStrategy/stockStrategy.py":1212
 *         types = ['SMA', 'EMA', 'WMA', 'DEMA', 'TEMA', 'TRIMA', 'KAMA', 'MAMA', 'T3']
 *         for i in range(len(types)):
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)             # <<<<<<<<<<<<<<
 *         if self.show_figure:
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_ma, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timeperiod, __pyx_int_5) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_matype, __pyx_t_2) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_types, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyObject_SetItem(__pyx_v_df_ma, __pyx_t_1, __pyx_t_2) < 0))) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1213
 *         for i in range(len(types)):
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1214
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 *         if self.show_figure:
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df_ma
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_ma, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_title, __pyx_kp_s_Moving_average_MA_lines) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1214, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1215
 *         if self.show_figure:
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df_ma
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_plt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1213
 *         for i in range(len(types)):
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1216
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')
 *             plt.show()
 *         return df_ma             # <<<<<<<<<<<<<<
 * 
 *     def MA(self, ma_column='close', ma_time=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df_ma);
  __pyx_r = __pyx_v_df_ma;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1204
 * 
 *     # MA
 *     def MaAll(self):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MaAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df_ma);
  __Pyx_XDECREF(__pyx_v_types);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1218
 *         return df_ma
 * 
 *     def MA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_9MA(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_8MA, "\n        \347\256\227\346\225\260\345\271\263\345\235\207\345\200\274\n        SMA = SUM_{t-N}^N(Price_i) / N  N\350\241\250\347\244\272\346\227\266\351\227\264\351\225\277\345\272\246\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_9MA = {"MA", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_9MA, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_8MA};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_9MA(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_ma_column = 0;
  PyObject *__pyx_v_ma_time = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MA (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ma_column,&__pyx_n_s_ma_time,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_close)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1218, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ma_column);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1218, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ma_time);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1218, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "MA") < 0)) __PYX_ERR(0, 1218, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_ma_column = values[1];
    __pyx_v_ma_time = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MA", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1218, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_8MA(__pyx_self, __pyx_v_self, __pyx_v_ma_column, __pyx_v_ma_time);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_8MA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ma_column, PyObject *__pyx_v_ma_time) {
  PyObject *__pyx_v_ma_name = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_time = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MA", 0);
  __Pyx_INCREF(__pyx_v_ma_time);

  /* "tbstock/tradeStrategy/stockStrategy.py":1224
 *         :return:
 *         '''
 *         if ma_time is None:             # <<<<<<<<<<<<<<
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 */
  __pyx_t_1 = (__pyx_v_ma_time == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1225
 *         '''
 *         if ma_time is None:
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]             # <<<<<<<<<<<<<<
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 */
    __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_5);
    __Pyx_GIVEREF(__pyx_int_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_5)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_10);
    __Pyx_GIVEREF(__pyx_int_10);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_10)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_20);
    __Pyx_GIVEREF(__pyx_int_20);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_20)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_30);
    __Pyx_GIVEREF(__pyx_int_30);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_30)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_60);
    __Pyx_GIVEREF(__pyx_int_60);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_60)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_120);
    __Pyx_GIVEREF(__pyx_int_120);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_120)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_250);
    __Pyx_GIVEREF(__pyx_int_250);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_int_250)) __PYX_ERR(0, 1225, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_ma_time, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1224
 *         :return:
 *         '''
 *         if ma_time is None:             # <<<<<<<<<<<<<<
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1226
 *         if ma_time is None:
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ma_' + str(time) for time in ma_time]             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1226, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_ma_time)) || PyTuple_CheckExact(__pyx_v_ma_time)) {
      __pyx_t_3 = __pyx_v_ma_time; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ma_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1226, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1226, __pyx_L6_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1226, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1226, __pyx_L6_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1226, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1226, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_time, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Str(__pyx_8genexpr5__pyx_v_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyNumber_Add(__pyx_n_s_ma, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1226, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1226, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_time); __pyx_8genexpr5__pyx_v_time = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_time); __pyx_8genexpr5__pyx_v_time = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_v_ma_name = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1227
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()             # <<<<<<<<<<<<<<
 *         for i in ma_time:
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_date)) __PYX_ERR(0, 1227, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ma_column);
  __Pyx_GIVEREF(__pyx_v_ma_column);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_v_ma_column)) __PYX_ERR(0, 1227, __pyx_L1_error);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1228
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:             # <<<<<<<<<<<<<<
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 */
  if (likely(PyList_CheckExact(__pyx_v_ma_time)) || PyTuple_CheckExact(__pyx_v_ma_time)) {
    __pyx_t_2 = __pyx_v_ma_time; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ma_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1228, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1229
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)             # <<<<<<<<<<<<<<
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_talib); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_MA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_v_ma_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_timeperiod, __pyx_v_i) < 0) __PYX_ERR(0, 1229, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Str(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyNumber_Add(__pyx_n_s_ma, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_t_7, __pyx_t_9) < 0))) __PYX_ERR(0, 1229, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1228
 *         ma_name = ['ma_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:             # <<<<<<<<<<<<<<
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1230
 *         for i in ma_time:
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1231
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',             # <<<<<<<<<<<<<<
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_title, __pyx_kp_s_Exponential_Moving_Average_EMA_l) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1232
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_ma_column);
    __Pyx_GIVEREF(__pyx_v_ma_column);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_ma_column)) __PYX_ERR(0, 1232, __pyx_L1_error);
    __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_ma_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y, __pyx_t_3) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ylabel, __pyx_v_ma_column) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1231
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',             # <<<<<<<<<<<<<<
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1233
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_plt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1230
 *         for i in ma_time:
 *             df['ma_' + str(i)] = talib.MA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1234
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # EMA
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1218
 *         return df_ma
 * 
 *     def MA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ma_name);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_ma_time);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1237
 * 
 *     # EMA
 *     def EMA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_11EMA(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_10EMA, "\n        \346\214\207\346\225\260\345\271\263\345\235\207\345\200\274\n        alpha = 1/(N+1)\n        EMA_t = alpha * Price_t + (1 - alpha) * EMA_{t-1}\n        \346\234\200\350\277\221\347\232\204\346\225\260\346\215\256\347\202\271\346\235\203\351\207\215\350\276\203\345\244\247\357\274\214\345\233\240\346\255\244\345\257\271\346\234\200\346\226\260\347\232\204\344\273\267\346\240\274\345\217\230\345\214\226\345\217\215\346\230\240\346\257\224\350\276\203\345\277\253\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_11EMA = {"EMA", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_11EMA, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_10EMA};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_11EMA(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_ma_column = 0;
  PyObject *__pyx_v_ma_time = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("EMA (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ma_column,&__pyx_n_s_ma_time,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_close)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ma_column);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ma_time);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "EMA") < 0)) __PYX_ERR(0, 1237, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_ma_column = values[1];
    __pyx_v_ma_time = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("EMA", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1237, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.EMA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_10EMA(__pyx_self, __pyx_v_self, __pyx_v_ma_column, __pyx_v_ma_time);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_10EMA(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ma_column, PyObject *__pyx_v_ma_time) {
  PyObject *__pyx_v_ma_name = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_time = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("EMA", 0);
  __Pyx_INCREF(__pyx_v_ma_time);

  /* "tbstock/tradeStrategy/stockStrategy.py":1245
 *         :return:
 *         '''
 *         if ma_time is None:             # <<<<<<<<<<<<<<
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 */
  __pyx_t_1 = (__pyx_v_ma_time == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1246
 *         '''
 *         if ma_time is None:
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]             # <<<<<<<<<<<<<<
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 */
    __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_5);
    __Pyx_GIVEREF(__pyx_int_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_5)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_10);
    __Pyx_GIVEREF(__pyx_int_10);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_10)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_20);
    __Pyx_GIVEREF(__pyx_int_20);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_20)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_30);
    __Pyx_GIVEREF(__pyx_int_30);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_30)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_60);
    __Pyx_GIVEREF(__pyx_int_60);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_60)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_120);
    __Pyx_GIVEREF(__pyx_int_120);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_120)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_250);
    __Pyx_GIVEREF(__pyx_int_250);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_int_250)) __PYX_ERR(0, 1246, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_ma_time, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1245
 *         :return:
 *         '''
 *         if ma_time is None:             # <<<<<<<<<<<<<<
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1247
 *         if ma_time is None:
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ema_' + str(time) for time in ma_time]             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_ma_time)) || PyTuple_CheckExact(__pyx_v_ma_time)) {
      __pyx_t_3 = __pyx_v_ma_time; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ma_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1247, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1247, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1247, __pyx_L6_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1247, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1247, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1247, __pyx_L6_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1247, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1247, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1247, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_time, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Str(__pyx_8genexpr6__pyx_v_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1247, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyNumber_Add(__pyx_n_s_ema, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1247, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_time); __pyx_8genexpr6__pyx_v_time = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_time); __pyx_8genexpr6__pyx_v_time = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_v_ma_name = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1248
 *             ma_time = [5, 10, 20, 30, 60, 120, 250]
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()             # <<<<<<<<<<<<<<
 *         for i in ma_time:
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_date)) __PYX_ERR(0, 1248, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ma_column);
  __Pyx_GIVEREF(__pyx_v_ma_column);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_v_ma_column)) __PYX_ERR(0, 1248, __pyx_L1_error);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1249
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:             # <<<<<<<<<<<<<<
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 */
  if (likely(PyList_CheckExact(__pyx_v_ma_time)) || PyTuple_CheckExact(__pyx_v_ma_time)) {
    __pyx_t_2 = __pyx_v_ma_time; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ma_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1249, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1250
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)             # <<<<<<<<<<<<<<
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_talib); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_EMA); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_v_ma_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_timeperiod, __pyx_v_i) < 0) __PYX_ERR(0, 1250, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Str(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = PyNumber_Add(__pyx_n_s_ema, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_t_7, __pyx_t_9) < 0))) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1249
 *         ma_name = ['ema_' + str(time) for time in ma_time]
 *         df = self.stock_data[['date', ma_column]].copy()
 *         for i in ma_time:             # <<<<<<<<<<<<<<
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1251
 *         for i in ma_time:
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1252
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',             # <<<<<<<<<<<<<<
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_title, __pyx_kp_s_Exponential_Moving_Average_EMA_l) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1253
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_ma_column);
    __Pyx_GIVEREF(__pyx_v_ma_column);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_ma_column)) __PYX_ERR(0, 1253, __pyx_L1_error);
    __pyx_t_3 = PyNumber_Add(__pyx_t_7, __pyx_v_ma_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_y, __pyx_t_3) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ylabel, __pyx_v_ma_column) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1252
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',             # <<<<<<<<<<<<<<
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1254
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_plt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1251
 *         for i in ma_time:
 *             df['ema_' + str(i)] = talib.EMA(df[ma_column].values, timeperiod=i)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Exponential Moving Average(EMA) lines', x='date',
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1255
 *                     y=[ma_column] + ma_name, xlabel='date', ylabel=ma_column)
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # MACD
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1237
 * 
 *     # EMA
 *     def EMA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.EMA", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ma_name);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_time);
  __Pyx_XDECREF(__pyx_v_ma_time);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1258
 * 
 *     # MACD
 *     def MACD(self):             # <<<<<<<<<<<<<<
 *         '''
 *         difDIFEMA-EMADEADIF9EMA
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_13MACD(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_12MACD, "\n        dif\357\274\232\357\274\214\350\277\231\346\230\257DIF\345\200\274\357\274\214\344\270\200\350\210\254\347\224\250\347\237\255\346\234\237EMA-\351\225\277\346\234\237EMA\357\274\214DEA\346\230\257DIF\347\232\2049\346\227\245EMA\343\200\202\n        signal\357\274\232\350\277\231\346\230\257DEA\347\232\204\345\200\274\357\274\214\344\270\200\350\210\254\350\241\250\347\244\272dif\347\232\2049\346\227\245EMA\343\200\202\n        hist\357\274\232\347\233\264\346\226\271\345\233\276\357\274\210Histogram\357\274\211\357\274\214\345\256\203\346\230\257DIF\345\222\214DEA\347\232\204\345\267\256\345\200\274\357\274\214\350\241\250\347\244\272\344\270\272dif - signal\343\200\202\n        macd\344\270\200\350\210\254\350\241\250\347\244\272dif\357\274\214\346\234\211\346\227\266\345\200\231\344\271\237\345\217\257\344\273\245\350\241\250\347\244\272hist\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_13MACD = {"MACD", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_13MACD, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_12MACD};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_13MACD(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("MACD (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "MACD") < 0)) __PYX_ERR(0, 1258, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("MACD", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1258, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MACD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_12MACD(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_12MACD(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("MACD", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1266
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'close']].copy()             # <<<<<<<<<<<<<<
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)
 *         if self.show_figure:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1266, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1266, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1267
 *         '''
 *         df = self.stock_data[['date', 'close']].copy()
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)             # <<<<<<<<<<<<<<
 *         if self.show_figure:
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MACD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_fastperiod, __pyx_int_12) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_slowperiod, __pyx_int_26) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_signalperiod, __pyx_int_9) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1267, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 1267, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1267, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_macd, __pyx_t_1) < 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_macdsignal, __pyx_t_4) < 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_macdhist, __pyx_t_3) < 0))) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1268
 *         df = self.stock_data[['date', 'close']].copy()
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1269
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_figsize, __pyx_tuple__79) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_n_s_MACD) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_close)) __PYX_ERR(0, 1269, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_macd);
    __Pyx_GIVEREF(__pyx_n_s_macd);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_macd)) __PYX_ERR(0, 1269, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_macdsignal);
    __Pyx_GIVEREF(__pyx_n_s_macdsignal);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_macdsignal)) __PYX_ERR(0, 1269, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_macdhist);
    __Pyx_GIVEREF(__pyx_n_s_macdhist);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_macdhist)) __PYX_ERR(0, 1269, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_y, __pyx_t_4) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1269, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1270
 *         if self.show_figure:
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1268
 *         df = self.stock_data[['date', 'close']].copy()
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1271
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # RSI
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1258
 * 
 *     # MACD
 *     def MACD(self):             # <<<<<<<<<<<<<<
 *         '''
 *         difDIFEMA-EMADEADIF9EMA
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.MACD", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1274
 * 
 *     # RSI
 *     def RSI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_15RSI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_15RSI = {"RSI", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_15RSI, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_15RSI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("RSI (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1274, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "RSI") < 0)) __PYX_ERR(0, 1274, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("RSI", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1274, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.RSI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_14RSI(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_14RSI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_ax = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("RSI", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1275
 *     # RSI
 *     def RSI(self):
 *         df = self.stock_data[['date', 'close']].copy()             # <<<<<<<<<<<<<<
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 *         if self.show_figure:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1275, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1275, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1276
 *     def RSI(self):
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)             # <<<<<<<<<<<<<<
 *         if self.show_figure:
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_RSI); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_rsi, __pyx_t_2) < 0))) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1277
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1278
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 *         if self.show_figure:
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')
 *             ax.right_ax.plot(df.index, [20] * len(df), '-', color='r')
 */
    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_close)) __PYX_ERR(0, 1278, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_rsi);
    __Pyx_GIVEREF(__pyx_n_s_rsi);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_rsi)) __PYX_ERR(0, 1278, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_rsi);
    __Pyx_GIVEREF(__pyx_n_s_rsi);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_rsi)) __PYX_ERR(0, 1278, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_secondary_y, __pyx_t_4) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_figsize, __pyx_tuple__79) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_title, __pyx_n_s_RSI) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1278, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ax = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1279
 *         if self.show_figure:
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')             # <<<<<<<<<<<<<<
 *             ax.right_ax.plot(df.index, [20] * len(df), '-', color='r')
 *             ax.right_ax.set_ylabel('%')
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_right_ax); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_plot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyObject_Length(__pyx_v_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1279, __pyx_L1_error)
    __pyx_t_2 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) {
        __Pyx_INCREF(__pyx_int_80);
        __Pyx_GIVEREF(__pyx_int_80);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_80)) __PYX_ERR(0, 1279, __pyx_L1_error);
      }
    }
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__11);
    __Pyx_GIVEREF(__pyx_kp_s__11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_s__11)) __PYX_ERR(0, 1279, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_color, __pyx_n_s_r) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1280
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')
 *             ax.right_ax.plot(df.index, [20] * len(df), '-', color='r')             # <<<<<<<<<<<<<<
 *             ax.right_ax.set_ylabel('%')
 *         return df
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_right_ax); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyObject_Length(__pyx_v_df); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1280, __pyx_L1_error)
    __pyx_t_3 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) {
        __Pyx_INCREF(__pyx_int_20);
        __Pyx_GIVEREF(__pyx_int_20);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_int_20)) __PYX_ERR(0, 1280, __pyx_L1_error);
      }
    }
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__11);
    __Pyx_GIVEREF(__pyx_kp_s__11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s__11)) __PYX_ERR(0, 1280, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_color, __pyx_n_s_r) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1281
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')
 *             ax.right_ax.plot(df.index, [20] * len(df), '-', color='r')
 *             ax.right_ax.set_ylabel('%')             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ax, __pyx_n_s_right_ax); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_ylabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s__80};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1277
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             ax = df[["close", "rsi"]].plot(secondary_y=['rsi'], figsize=(16, 8), title='RSI', xlabel='date', ylabel='price')
 *             ax.right_ax.plot(df.index, [80] * len(df), '-', color='r')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1282
 *             ax.right_ax.plot(df.index, [20] * len(df), '-', color='r')
 *             ax.right_ax.set_ylabel('%')
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # BOLL
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1274
 * 
 *     # RSI
 *     def RSI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.RSI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_ax);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1285
 * 
 *     # BOLL
 *     def BOLL(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_17BOLL(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_17BOLL = {"BOLL", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_17BOLL, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_17BOLL(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("BOLL (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1285, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "BOLL") < 0)) __PYX_ERR(0, 1285, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("BOLL", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1285, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.BOLL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_16BOLL(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_16BOLL(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_H_line = NULL;
  PyObject *__pyx_v_M_line = NULL;
  PyObject *__pyx_v_L_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("BOLL", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1286
 *     # BOLL
 *     def BOLL(self):
 *         df = self.stock_data[['date', 'close']].copy()             # <<<<<<<<<<<<<<
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 *         df['H_line'] = H_line
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1286, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1286, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1287
 *     def BOLL(self):
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)             # <<<<<<<<<<<<<<
 *         df['H_line'] = H_line
 *         df['M_line'] = M_line
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BBANDS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timeperiod, __pyx_int_20) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nbdevup, __pyx_int_2) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nbdevdn, __pyx_int_2) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_matype, __pyx_int_0) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1287, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1287, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_H_line = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_M_line = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_L_line = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1288
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 *         df['H_line'] = H_line             # <<<<<<<<<<<<<<
 *         df['M_line'] = M_line
 *         df['L_line'] = L_line
 */
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_H_line, __pyx_v_H_line) < 0))) __PYX_ERR(0, 1288, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1289
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 *         df['H_line'] = H_line
 *         df['M_line'] = M_line             # <<<<<<<<<<<<<<
 *         df['L_line'] = L_line
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_M_line, __pyx_v_M_line) < 0))) __PYX_ERR(0, 1289, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1290
 *         df['H_line'] = H_line
 *         df['M_line'] = M_line
 *         df['L_line'] = L_line             # <<<<<<<<<<<<<<
 * 
 *         if self.show_figure:
 */
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_L_line, __pyx_v_L_line) < 0))) __PYX_ERR(0, 1290, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1292
 *         df['L_line'] = L_line
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Bollinger Bands', x='date', y=['close', 'H_line', 'M_line', 'L_line'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1293
 * 
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Bollinger Bands', x='date', y=['close', 'H_line', 'M_line', 'L_line'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_kp_s_Bollinger_Bands) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_close)) __PYX_ERR(0, 1293, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_H_line);
    __Pyx_GIVEREF(__pyx_n_s_H_line);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_H_line)) __PYX_ERR(0, 1293, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_M_line);
    __Pyx_GIVEREF(__pyx_n_s_M_line);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_M_line)) __PYX_ERR(0, 1293, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_L_line);
    __Pyx_GIVEREF(__pyx_n_s_L_line);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_L_line)) __PYX_ERR(0, 1293, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_y, __pyx_t_4) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1294
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='Bollinger Bands', x='date', y=['close', 'H_line', 'M_line', 'L_line'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1292
 *         df['L_line'] = L_line
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='Bollinger Bands', x='date', y=['close', 'H_line', 'M_line', 'L_line'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1295
 *             df.plot(figsize=(16, 6), title='Bollinger Bands', x='date', y=['close', 'H_line', 'M_line', 'L_line'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # KDJ
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1285
 * 
 *     # BOLL
 *     def BOLL(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.BOLL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_H_line);
  __Pyx_XDECREF(__pyx_v_M_line);
  __Pyx_XDECREF(__pyx_v_L_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1298
 * 
 *     # KDJ
 *     def KDJ(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_19KDJ(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_19KDJ = {"KDJ", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_19KDJ, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_19KDJ(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("KDJ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1298, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "KDJ") < 0)) __PYX_ERR(0, 1298, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("KDJ", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1298, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.KDJ", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_18KDJ(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_18KDJ(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("KDJ", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1299
 *     # KDJ
 *     def KDJ(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()             # <<<<<<<<<<<<<<
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 *                                        slowk_matype=0, slowd_period=3, slowd_matype=0)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1299, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_high)) __PYX_ERR(0, 1299, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_low)) __PYX_ERR(0, 1299, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_close)) __PYX_ERR(0, 1299, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1300
 *     def KDJ(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,             # <<<<<<<<<<<<<<
 *                                        slowk_matype=0, slowd_period=3, slowd_matype=0)
 *         df['K'] = df['K'].fillna(0)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_STOCH); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fastk_period, __pyx_int_9) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_slowk_period, __pyx_int_3) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_slowk_matype, __pyx_int_0) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_slowd_period, __pyx_int_3) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_slowd_matype, __pyx_int_0) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1300, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1300, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_K, __pyx_t_2) < 0))) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_D, __pyx_t_6) < 0))) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1302
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 *                                        slowk_matype=0, slowd_period=3, slowd_matype=0)
 *         df['K'] = df['K'].fillna(0)             # <<<<<<<<<<<<<<
 *         df['D'] = df['D'].fillna(0)
 *         df['J'] = 3 * df['K'] - 2 * df['D']
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_K); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fillna); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_0};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_K, __pyx_t_4) < 0))) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1303
 *                                        slowk_matype=0, slowd_period=3, slowd_matype=0)
 *         df['K'] = df['K'].fillna(0)
 *         df['D'] = df['D'].fillna(0)             # <<<<<<<<<<<<<<
 *         df['J'] = 3 * df['K'] - 2 * df['D']
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fillna); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_0};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_D, __pyx_t_4) < 0))) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1304
 *         df['K'] = df['K'].fillna(0)
 *         df['D'] = df['D'].fillna(0)
 *         df['J'] = 3 * df['K'] - 2 * df['D']             # <<<<<<<<<<<<<<
 * 
 *         if self.show_figure:
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_K); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_t_4, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_D); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_t_4, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_J, __pyx_t_4) < 0))) __PYX_ERR(0, 1304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1306
 *         df['J'] = 3 * df['K'] - 2 * df['D']
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='KDJ', x='date', y=['close', 'K', 'D', 'J'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1307
 * 
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='KDJ', x='date', y=['close', 'K', 'D', 'J'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_title, __pyx_n_s_KDJ) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_close)) __PYX_ERR(0, 1307, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_K);
    __Pyx_GIVEREF(__pyx_n_s_K);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_K)) __PYX_ERR(0, 1307, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_D);
    __Pyx_GIVEREF(__pyx_n_s_D);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_D)) __PYX_ERR(0, 1307, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_J);
    __Pyx_GIVEREF(__pyx_n_s_J);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_J)) __PYX_ERR(0, 1307, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1307, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1308
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='KDJ', x='date', y=['close', 'K', 'D', 'J'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_show); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1306
 *         df['J'] = 3 * df['K'] - 2 * df['D']
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='KDJ', x='date', y=['close', 'K', 'D', 'J'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1309
 *             df.plot(figsize=(16, 6), title='KDJ', x='date', y=['close', 'K', 'D', 'J'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # W&M
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1298
 * 
 *     # KDJ
 *     def KDJ(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.KDJ", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1312
 * 
 *     # W&M
 *     def WILLR(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_21WILLR(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_21WILLR = {"WILLR", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_21WILLR, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_21WILLR(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("WILLR (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "WILLR") < 0)) __PYX_ERR(0, 1312, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("WILLR", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1312, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.WILLR", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_20WILLR(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_20WILLR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("WILLR", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1313
 *     # W&M
 *     def WILLR(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()             # <<<<<<<<<<<<<<
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1313, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_high)) __PYX_ERR(0, 1313, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_low)) __PYX_ERR(0, 1313, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_close)) __PYX_ERR(0, 1313, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1314
 *     def WILLR(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)             # <<<<<<<<<<<<<<
 * 
 *         if self.show_figure:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_WILLR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1314, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_WR, __pyx_t_2) < 0))) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1316
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='WILLR', x='date', y=['close', 'WR'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1317
 * 
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='WILLR', x='date', y=['close', 'WR'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_title, __pyx_n_s_WILLR) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_close)) __PYX_ERR(0, 1317, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_WR);
    __Pyx_GIVEREF(__pyx_n_s_WR);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_WR)) __PYX_ERR(0, 1317, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_y, __pyx_t_1) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1318
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='WILLR', x='date', y=['close', 'WR'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_plt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_show); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1316
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='WILLR', x='date', y=['close', 'WR'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1319
 *             df.plot(figsize=(16, 6), title='WILLR', x='date', y=['close', 'WR'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # DMI
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1312
 * 
 *     # W&M
 *     def WILLR(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.WILLR", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1322
 * 
 *     # DMI
 *     def DMI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_23DMI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_23DMI = {"DMI", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_23DMI, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_23DMI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DMI (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "DMI") < 0)) __PYX_ERR(0, 1322, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("DMI", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1322, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.DMI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_22DMI(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_22DMI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DMI", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1323
 *     # DMI
 *     def DMI(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()             # <<<<<<<<<<<<<<
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['ADXR'] = talib.ADXR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_high)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_low)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_close)) __PYX_ERR(0, 1323, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1324
 *     def DMI(self):
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)             # <<<<<<<<<<<<<<
 *         df['ADXR'] = talib.ADXR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['+DI'] = talib.PLUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_talib); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ADX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1324, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_ADX, __pyx_t_2) < 0))) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1325
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['ADXR'] = talib.ADXR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)             # <<<<<<<<<<<<<<
 *         df['+DI'] = talib.PLUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['-DI'] = talib.MINUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_talib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ADXR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1325, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_ADXR, __pyx_t_3) < 0))) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1326
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['ADXR'] = talib.ADXR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['+DI'] = talib.PLUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)             # <<<<<<<<<<<<<<
 *         df['-DI'] = talib.MINUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PLUS_DI); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(0, 1326, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1326, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_kp_s_DI, __pyx_t_6) < 0))) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1327
 *         df['ADXR'] = talib.ADXR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['+DI'] = talib.PLUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 *         df['-DI'] = talib.MINUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)             # <<<<<<<<<<<<<<
 * 
 *         if self.show_figure:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_talib); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_MINUS_DI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_timeperiod, __pyx_int_14) < 0) __PYX_ERR(0, 1327, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_kp_s_DI_2, __pyx_t_4) < 0))) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1329
 *         df['-DI'] = talib.MINUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='DMI', x='date', y=['close', 'ADX', 'ADXR', '+DI', '-DI'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1330
 * 
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='DMI', x='date', y=['close', 'ADX', 'ADXR', '+DI', '-DI'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_title, __pyx_n_s_DMI) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    __pyx_t_6 = PyList_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_close)) __PYX_ERR(0, 1330, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_ADX);
    __Pyx_GIVEREF(__pyx_n_s_ADX);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_ADX)) __PYX_ERR(0, 1330, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_ADXR);
    __Pyx_GIVEREF(__pyx_n_s_ADXR);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_ADXR)) __PYX_ERR(0, 1330, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_DI);
    __Pyx_GIVEREF(__pyx_kp_s_DI);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_kp_s_DI)) __PYX_ERR(0, 1330, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s_DI_2);
    __Pyx_GIVEREF(__pyx_kp_s_DI_2);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_kp_s_DI_2)) __PYX_ERR(0, 1330, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1331
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='DMI', x='date', y=['close', 'ADX', 'ADXR', '+DI', '-DI'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_show); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1329
 *         df['-DI'] = talib.MINUS_DI(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='DMI', x='date', y=['close', 'ADX', 'ADXR', '+DI', '-DI'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1332
 *             df.plot(figsize=(16, 6), title='DMI', x='date', y=['close', 'ADX', 'ADXR', '+DI', '-DI'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     # OBV
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1322
 * 
 *     # DMI
 *     def DMI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.DMI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1335
 * 
 *     # OBV
 *     def OBV(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close', 'volume']].copy()
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_25OBV(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_25OBV = {"OBV", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_25OBV, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_25OBV(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OBV (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "OBV") < 0)) __PYX_ERR(0, 1335, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("OBV", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1335, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.OBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_24OBV(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_24OBV(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("OBV", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1336
 *     # OBV
 *     def OBV(self):
 *         df = self.stock_data[['date', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1336, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_close)) __PYX_ERR(0, 1336, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_volume)) __PYX_ERR(0, 1336, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1337
 *     def OBV(self):
 *         df = self.stock_data[['date', 'close', 'volume']].copy()
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)             # <<<<<<<<<<<<<<
 * 
 *         if self.show_figure:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OBV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_volume); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_2, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_OBV, __pyx_t_1) < 0))) __PYX_ERR(0, 1337, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1339
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='OBV', x='date', y=['close', 'OBV'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1340
 * 
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='OBV', x='date', y=['close', 'OBV'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_plot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_figsize, __pyx_tuple__78) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_title, __pyx_n_s_OBV) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_x_2, __pyx_n_s_date) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_close)) __PYX_ERR(0, 1340, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_OBV);
    __Pyx_GIVEREF(__pyx_n_s_OBV);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_OBV)) __PYX_ERR(0, 1340, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_y, __pyx_t_6) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_xlabel, __pyx_n_s_date) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ylabel, __pyx_n_s_price) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1341
 *         if self.show_figure:
 *             df.plot(figsize=(16, 6), title='OBV', x='date', y=['close', 'OBV'], xlabel='date', ylabel='price')
 *             plt.show()             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_plt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_show); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1339
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 * 
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.plot(figsize=(16, 6), title='OBV', x='date', y=['close', 'OBV'], xlabel='date', ylabel='price')
 *             plt.show()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1342
 *             df.plot(figsize=(16, 6), title='OBV', x='date', y=['close', 'OBV'], xlabel='date', ylabel='price')
 *             plt.show()
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDL2CROWS(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1335
 * 
 *     # OBV
 *     def OBV(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close', 'volume']].copy()
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.OBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1344
 *         return df
 * 
 *     def CDL2CROWS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL2CROWS
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_27CDL2CROWS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_26CDL2CROWS, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDL2CROWS\n        \345\220\215\347\247\260\357\274\232Two Crows \344\270\244\345\217\252\344\271\214\351\270\246\n        \347\256\200\344\273\213\357\274\232\344\270\211\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\347\254\254\344\270\200\345\244\251\351\225\277\351\230\263\357\274\214\347\254\254\344\272\214\345\244\251\351\253\230\345\274\200\346\224\266\351\230\264\357\274\214\347\254\254\344\270\211\345\244\251\345\206\215\346\254\241\351\253\230\345\274\200\347\273\247\347\273\255\346\224\266\351\230\264\357\274\214 \346\224\266\347\233\230\346\257\224\345\211\215\344\270\200\346\227\245\346\224\266\347\233\230\344\273\267\344\275\216\357\274\214\351\242\204\347\244\272\350\202\241\344\273\267\344\270\213\350\267\214\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_27CDL2CROWS = {"CDL2CROWS", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_27CDL2CROWS, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_26CDL2CROWS};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_27CDL2CROWS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDL2CROWS (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDL2CROWS") < 0)) __PYX_ERR(0, 1344, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDL2CROWS", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1344, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL2CROWS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_26CDL2CROWS(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_26CDL2CROWS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDL2CROWS", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1351
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDL2CROWS'] = talib.CDL2CROWS(df.open, df.high, df.low, df.close)
 *         # mplfinanceK
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1352
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDL2CROWS'] = talib.CDL2CROWS(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 *         # mplfinanceK
 *         if self.show_figure:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDL2CROWS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDL2CROWS, __pyx_t_1) < 0))) __PYX_ERR(0, 1352, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1354
 *         df['CDL2CROWS'] = talib.CDL2CROWS(df.open, df.high, df.low, df.close)
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1355
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1355, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1355, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1355, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1356
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1357
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1357, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1354
 *         df['CDL2CROWS'] = talib.CDL2CROWS(df.open, df.high, df.low, df.close)
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1358
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDL3WHITESOLDIERS(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1344
 *         return df
 * 
 *     def CDL2CROWS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL2CROWS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL2CROWS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1360
 *         return df
 * 
 *     def CDL3WHITESOLDIERS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3WHITESOLDIERS
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_29CDL3WHITESOLDIERS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_28CDL3WHITESOLDIERS, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDL3WHITESOLDIERS\n        \345\220\215\347\247\260\357\274\232Three Advancing White Soldiers \344\270\211\344\270\252\347\231\275\345\205\265\n        \347\256\200\344\273\213\357\274\232\344\270\211\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\344\270\211\346\227\245K\347\272\277\347\232\206\351\230\263\357\274\214 \346\257\217\346\227\245\346\224\266\347\233\230\344\273\267\345\217\230\351\253\230\344\270\224\346\216\245\350\277\221\346\234\200\351\253\230\344\273\267\357\274\214\345\274\200\347\233\230\344\273\267\345\234\250\345\211\215\344\270\200\346\227\245\345\256\236\344\275\223\344\270\212\345\215\212\351\203\250\357\274\214\351\242\204\347\244\272\350\202\241\344\273\267\344\270\212\345\215\207\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_29CDL3WHITESOLDIERS = {"CDL3WHITESOLDIERS", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_29CDL3WHITESOLDIERS, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_28CDL3WHITESOLDIERS};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_29CDL3WHITESOLDIERS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDL3WHITESOLDIERS (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1360, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDL3WHITESOLDIERS") < 0)) __PYX_ERR(0, 1360, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDL3WHITESOLDIERS", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1360, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3WHITESOLDIERS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_28CDL3WHITESOLDIERS(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_28CDL3WHITESOLDIERS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDL3WHITESOLDIERS", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1367
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDL3WHITESOLDIERS'] = talib.CDL3WHITESOLDIERS(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1367, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1368
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDL3WHITESOLDIERS'] = talib.CDL3WHITESOLDIERS(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDL3WHITESOLDIERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDL3WHITESOLDIERS, __pyx_t_1) < 0))) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1371
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1372
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1372, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1373
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1374
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1374, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1371
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1375
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDL3STARSINSOUTH(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1360
 *         return df
 * 
 *     def CDL3WHITESOLDIERS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3WHITESOLDIERS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3WHITESOLDIERS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1377
 *         return df
 * 
 *     def CDL3STARSINSOUTH(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3STARSINSOUTH
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_31CDL3STARSINSOUTH(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_30CDL3STARSINSOUTH, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDL3STARSINSOUTH\n        \345\220\215\347\247\260\357\274\232Three Stars In The South \345\215\227\346\226\271\344\270\211\346\230\237\n        \347\256\200\344\273\213\357\274\232\344\270\211\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\344\270\216\345\244\247\346\225\214\345\275\223\345\211\215\347\233\270\345\217\215\357\274\214\344\270\211\346\227\245K\347\272\277\347\232\206\351\230\264\357\274\214\347\254\254\344\270\200\346\227\245\346\234\211\351\225\277\344\270\213\345\275\261\347\272\277\357\274\214 \347\254\254\344\272\214\346\227\245\344\270\216\347\254\254\344\270\200\346\227\245\347\261\273\344\274\274\357\274\214K\347\272\277\346\225\264\344\275\223\345\260\217\344\272\216\347\254\254\344\270\200\346\227\245\357\274\214\347\254\254\344\270\211\346\227\245\346\227\240\344\270\213\345\275\261\347\272\277\345\256\236\344\275\223\344\277\241\345\217\267\357\274\214 \346\210\220\344\272\244\344\273\267\346\240\274\351\203\275\345\234\250\347\254\254\344\270\200\346\227\245\346\214\257\345\271\205\344\271\213\345\206\205\357\274\214\351\242\204\347\244\272\344\270\213\350\267\214\350\266\213\345\212\277\345\217\215\350\275\254\357\274\214\350\202\241\344\273\267\344\270\212\345\215\207\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_31CDL3STARSINSOUTH = {"CDL3STARSINSOUTH", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_31CDL3STARSINSOUTH, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_30CDL3STARSINSOUTH};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_31CDL3STARSINSOUTH(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDL3STARSINSOUTH (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDL3STARSINSOUTH") < 0)) __PYX_ERR(0, 1377, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDL3STARSINSOUTH", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1377, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3STARSINSOUTH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_30CDL3STARSINSOUTH(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_30CDL3STARSINSOUTH(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDL3STARSINSOUTH", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1384
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDL3STARSINSOUTH'] = talib.CDL3STARSINSOUTH(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1384, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1385
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDL3STARSINSOUTH'] = talib.CDL3STARSINSOUTH(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDL3STARSINSOUTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDL3STARSINSOUTH, __pyx_t_1) < 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1388
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1389
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1389, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1389, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1390
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1391
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1391, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1388
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1392
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLHARAMI(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1377
 *         return df
 * 
 *     def CDL3STARSINSOUTH(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3STARSINSOUTH
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3STARSINSOUTH", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1394
 *         return df
 * 
 *     def CDLHARAMI(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHARAMI
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_33CDLHARAMI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_32CDLHARAMI, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLHARAMI\n        \345\220\215\347\247\260\357\274\232Harami Pattern \346\257\215\345\255\220\347\272\277\n        \347\256\200\344\273\213\357\274\232\344\272\214\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\345\210\206\345\244\232\345\244\264\346\257\215\345\255\220\344\270\216\347\251\272\345\244\264\346\257\215\345\255\220\357\274\214\344\270\244\350\200\205\347\233\270\345\217\215\357\274\214\344\273\245\345\244\232\345\244\264\346\257\215\345\255\220\344\270\272\344\276\213\357\274\214\345\234\250\344\270\213\350\267\214\350\266\213\345\212\277\344\270\255\357\274\214\347\254\254\344\270\200\346\227\245K\347\272\277\351\225\277\351\230\264\357\274\214 \347\254\254\344\272\214\346\227\245\345\274\200\347\233\230\344\273\267\346\224\266\347\233\230\344\273\267\345\234\250\347\254\254\344\270\200\346\227\245\344\273\267\346\240\274\346\214\257\345\271\205\344\271\213\345\206\205\357\274\214\344\270\272\351\230\263\347\272\277\357\274\214\351\242\204\347\244\272\350\266\213\345\212\277\345\217\215\350\275\254\357\274\214\350\202\241\344\273\267\344\270\212\345\215\207\343\200\202:return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_33CDLHARAMI = {"CDLHARAMI", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_33CDLHARAMI, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_32CDLHARAMI};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_33CDLHARAMI(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLHARAMI (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1394, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLHARAMI") < 0)) __PYX_ERR(0, 1394, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLHARAMI", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1394, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLHARAMI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_32CDLHARAMI(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_32CDLHARAMI(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLHARAMI", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1400
 *         KK :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLHARAMI'] = talib.CDLHARAMI(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1400, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1401
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLHARAMI'] = talib.CDLHARAMI(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLHARAMI); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLHARAMI, __pyx_t_1) < 0))) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1404
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1405
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1405, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1405, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1406
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1407
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1407, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1407, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1404
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1408
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLRISEFALL3METHODS(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1394
 *         return df
 * 
 *     def CDLHARAMI(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHARAMI
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLHARAMI", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1410
 *         return df
 * 
 *     def CDLRISEFALL3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLRISEFALL3METHODS
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_35CDLRISEFALL3METHODS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_34CDLRISEFALL3METHODS, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLRISEFALL3METHODS\n        \345\220\215\347\247\260\357\274\232Rising/Falling Three Methods \344\270\212\345\215\207/\344\270\213\351\231\215\344\270\211\346\263\225\n        \347\256\200\344\273\213\357\274\232 \344\272\224\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\344\273\245\344\270\212\345\215\207\344\270\211\346\263\225\344\270\272\344\276\213\357\274\214\344\270\212\346\266\250\350\266\213\345\212\277\344\270\255\357\274\214 \347\254\254\344\270\200\346\227\245\351\225\277\351\230\263\347\272\277\357\274\214\344\270\255\351\227\264\344\270\211\346\227\245\344\273\267\346\240\274\345\234\250\347\254\254\344\270\200\346\227\245\350\214\203\345\233\264\345\206\205\345\260\217\345\271\205\351\234\207\350\215\241\357\274\214 \347\254\254\344\272\224\346\227\245\351\225\277\351\230\263\347\272\277\357\274\214\346\224\266\347\233\230\344\273\267\351\253\230\344\272\216\347\254\254\344\270\200\346\227\245\346\224\266\347\233\230\344\273\267\357\274\214\351\242\204\347\244\272\350\202\241\344\273\267\344\270\212\345\215\207\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_35CDLRISEFALL3METHODS = {"CDLRISEFALL3METHODS", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_35CDLRISEFALL3METHODS, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_34CDLRISEFALL3METHODS};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_35CDLRISEFALL3METHODS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLRISEFALL3METHODS (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLRISEFALL3METHODS") < 0)) __PYX_ERR(0, 1410, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLRISEFALL3METHODS", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1410, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLRISEFALL3METHODS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_34CDLRISEFALL3METHODS(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_34CDLRISEFALL3METHODS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLRISEFALL3METHODS", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1417
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLRISEFALL3METHODS'] = talib.CDLRISEFALL3METHODS(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1417, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1418
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLRISEFALL3METHODS'] = talib.CDLRISEFALL3METHODS(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLRISEFALL3METHODS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLRISEFALL3METHODS, __pyx_t_1) < 0))) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1421
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1422
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1422, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1422, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1423
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1424
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1424, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1421
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1425
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLXSIDEGAP3METHODS(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1410
 *         return df
 * 
 *     def CDLRISEFALL3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLRISEFALL3METHODS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLRISEFALL3METHODS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1427
 *         return df
 * 
 *     def CDLXSIDEGAP3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLXSIDEGAP3METHODS
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_37CDLXSIDEGAP3METHODS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_36CDLXSIDEGAP3METHODS, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLXSIDEGAP3METHODS\n        \345\220\215\347\247\260\357\274\232Upside/Downside Gap Three Methods \344\270\212\345\215\207/\344\270\213\351\231\215\350\267\263\347\251\272\344\270\211\346\263\225\n        \347\256\200\344\273\213\357\274\232\344\272\224\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\344\273\245\344\270\212\345\215\207\350\267\263\347\251\272\344\270\211\346\263\225\344\270\272\344\276\213\357\274\214\344\270\212\346\266\250\350\266\213\345\212\277\344\270\255\357\274\214\347\254\254\344\270\200\346\227\245\351\225\277\351\230\263\347\272\277\357\274\214\347\254\254\344\272\214\346\227\245\347\237\255\351\230\263\347\272\277\357\274\214\347\254\254\344\270\211\346\227\245\350\267\263\347\251\272\351\230\263\347\272\277\357\274\214\347\254\254\345\233\233\346\227\245\351\230\264\347\272\277\357\274\214\345\274\200\347\233\230\344\273\267\344\270\216\346\224\266\347\233\230\344\273\267\344\272\216\345\211\215\344\270\244\346\227\245\345\256\236\344\275\223\345\206\205\357\274\214 \347\254\254\344\272\224\346\227\245\351\225\277\351\230\263\347\272\277\357\274\214\346\224\266\347\233\230\344\273\267\351\253\230\344\272\216\347\254\254\344\270\200\346\227\245\346\224\266\347\233\230\344\273\267\357\274\214\351\242\204\347\244\272\350\202\241\344\273\267\344\270\212\345\215\207\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_37CDLXSIDEGAP3METHODS = {"CDLXSIDEGAP3METHODS", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_37CDLXSIDEGAP3METHODS, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_36CDLXSIDEGAP3METHODS};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_37CDLXSIDEGAP3METHODS(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLXSIDEGAP3METHODS (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLXSIDEGAP3METHODS") < 0)) __PYX_ERR(0, 1427, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLXSIDEGAP3METHODS", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1427, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLXSIDEGAP3METHODS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_36CDLXSIDEGAP3METHODS(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_36CDLXSIDEGAP3METHODS(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLXSIDEGAP3METHODS", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1434
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLXSIDEGAP3METHODS'] = talib.CDLXSIDEGAP3METHODS(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1434, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1435
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLXSIDEGAP3METHODS'] = talib.CDLXSIDEGAP3METHODS(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLXSIDEGAP3METHODS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLXSIDEGAP3METHODS, __pyx_t_1) < 0))) __PYX_ERR(0, 1435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1438
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1439
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1439, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1439, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1440
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1441
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1441, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1438
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1442
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDL3INSIDE(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1427
 *         return df
 * 
 *     def CDLXSIDEGAP3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLXSIDEGAP3METHODS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLXSIDEGAP3METHODS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1444
 *         return df
 * 
 *     def CDL3INSIDE(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3INSIDE
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_39CDL3INSIDE(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_38CDL3INSIDE, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDL3INSIDE\n        \345\220\215\347\247\260\357\274\232 Three Inside Up/Down \344\270\211\345\206\205\351\203\250\344\270\212\346\266\250\345\222\214\344\270\213\350\267\214\n        \347\256\200\344\273\213\357\274\232\344\270\211\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\346\257\215\345\255\220\344\277\241\345\217\267+\351\225\277K\347\272\277\357\274\214\344\273\245\344\270\211\345\206\205\351\203\250\344\270\212\346\266\250\344\270\272\344\276\213\357\274\214K\347\272\277\344\270\272\351\230\264\351\230\263\351\230\263\357\274\214 \347\254\254\344\270\211\345\244\251\346\224\266\347\233\230\344\273\267\351\253\230\344\272\216\347\254\254\344\270\200\345\244\251\345\274\200\347\233\230\344\273\267\357\274\214\347\254\254\344\272\214\345\244\251K\347\272\277\345\234\250\347\254\254\344\270\200\345\244\251K\347\272\277\345\206\205\351\203\250\357\274\214\351\242\204\347\244\272\347\235\200\350\202\241\344\273\267\344\270\212\346\266\250\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_39CDL3INSIDE = {"CDL3INSIDE", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_39CDL3INSIDE, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_38CDL3INSIDE};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_39CDL3INSIDE(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDL3INSIDE (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1444, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDL3INSIDE") < 0)) __PYX_ERR(0, 1444, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDL3INSIDE", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1444, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3INSIDE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_38CDL3INSIDE(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_38CDL3INSIDE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDL3INSIDE", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1451
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDL3INSIDE'] = talib.CDL3INSIDE(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1451, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1452
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDL3INSIDE'] = talib.CDL3INSIDE(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDL3INSIDE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDL3INSIDE, __pyx_t_1) < 0))) __PYX_ERR(0, 1452, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1455
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1456
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1456, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1456, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1457
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1458
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1458, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1458, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1455
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1459
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLPIERCING(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1444
 *         return df
 * 
 *     def CDL3INSIDE(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3INSIDE
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDL3INSIDE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1461
 *         return df
 * 
 *     def CDLPIERCING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLPIERCING
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_41CDLPIERCING(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_40CDLPIERCING, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLPIERCING\n        \345\220\215\347\247\260\357\274\232Piercing Pattern \345\210\272\351\200\217\345\275\242\346\200\201\n        \347\256\200\344\273\213\357\274\232\347\224\261\344\270\244\346\240\271K\347\272\277\347\273\204\346\210\220\343\200\202\347\254\254\344\270\200\346\240\271\346\230\257\351\225\277\351\230\264\347\272\277\357\274\214\347\254\254\344\272\214\346\240\271\346\230\257\351\230\263\347\272\277\357\274\214\351\230\263\347\272\277\347\232\204\346\224\266\347\233\230\344\273\267\350\207\263\345\260\221\350\266\205\350\277\207\345\211\215\344\270\200\346\240\271\351\230\264\347\272\277\347\232\204\345\256\236\344\275\223\344\270\255\347\202\271\357\274\214\351\242\204\347\244\272\347\235\200\345\217\257\350\203\275\347\232\204\345\217\215\350\275\254\345\220\221\344\270\212\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_41CDLPIERCING = {"CDLPIERCING", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_41CDLPIERCING, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_40CDLPIERCING};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_41CDLPIERCING(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLPIERCING (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1461, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLPIERCING") < 0)) __PYX_ERR(0, 1461, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLPIERCING", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1461, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLPIERCING", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_40CDLPIERCING(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_40CDLPIERCING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLPIERCING", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1468
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLPIERCING'] = talib.CDLPIERCING(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1468, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1469
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLPIERCING'] = talib.CDLPIERCING(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLPIERCING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLPIERCING, __pyx_t_1) < 0))) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1472
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1473
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1473, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1473, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1473, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1474
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1475
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1475, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1475, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1472
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1476
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLHAMMER(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1461
 *         return df
 * 
 *     def CDLPIERCING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLPIERCING
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLPIERCING", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1478
 *         return df
 * 
 *     def CDLHAMMER(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHAMMER
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_43CDLHAMMER(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_42CDLHAMMER, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLHAMMER\n        \345\220\215\347\247\260\357\274\232Hammer \351\224\244\345\244\264\n        \347\256\200\344\273\213\357\274\232\344\270\200\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\345\256\236\344\275\223\350\276\203\347\237\255\357\274\214\346\227\240\344\270\212\345\275\261\347\272\277\357\274\214 \344\270\213\345\275\261\347\272\277\345\244\247\344\272\216\345\256\236\344\275\223\351\225\277\345\272\246\344\270\244\345\200\215\357\274\214\345\244\204\344\272\216\344\270\213\350\267\214\350\266\213\345\212\277\345\272\225\351\203\250\357\274\214\351\242\204\347\244\272\345\217\215\350\275\254\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_43CDLHAMMER = {"CDLHAMMER", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_43CDLHAMMER, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_42CDLHAMMER};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_43CDLHAMMER(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLHAMMER (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLHAMMER") < 0)) __PYX_ERR(0, 1478, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLHAMMER", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1478, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLHAMMER", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_42CDLHAMMER(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_42CDLHAMMER(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLHAMMER", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1485
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLHAMMER'] = talib.CDLHAMMER(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1485, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1486
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLHAMMER'] = talib.CDLHAMMER(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLHAMMER); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLHAMMER, __pyx_t_1) < 0))) __PYX_ERR(0, 1486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1489
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1490
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1490, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1490, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1490, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1491
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1492
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1492, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1492, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1489
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1493
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLMORNINGSTAR(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1478
 *         return df
 * 
 *     def CDLHAMMER(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHAMMER
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLHAMMER", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1495
 *         return df
 * 
 *     def CDLMORNINGSTAR(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLMORNINGSTAR
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_45CDLMORNINGSTAR(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_44CDLMORNINGSTAR, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLMORNINGSTAR\n        \345\220\215\347\247\260\357\274\232Morning Star \346\231\250\346\230\237\n        \347\256\200\344\273\213\357\274\232\344\270\211\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\344\270\213\350\267\214\350\266\213\345\212\277\357\274\214\347\254\254\344\270\200\346\227\245\351\230\264\347\272\277\357\274\214 \347\254\254\344\272\214\346\227\245\344\273\267\346\240\274\346\214\257\345\271\205\350\276\203\345\260\217\357\274\214\347\254\254\344\270\211\345\244\251\351\230\263\347\272\277\357\274\214\351\242\204\347\244\272\345\272\225\351\203\250\345\217\215\350\275\254\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_45CDLMORNINGSTAR = {"CDLMORNINGSTAR", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_45CDLMORNINGSTAR, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_44CDLMORNINGSTAR};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_45CDLMORNINGSTAR(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLMORNINGSTAR (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLMORNINGSTAR") < 0)) __PYX_ERR(0, 1495, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLMORNINGSTAR", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1495, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLMORNINGSTAR", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_44CDLMORNINGSTAR(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_44CDLMORNINGSTAR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLMORNINGSTAR", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1502
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLMORNINGSTAR'] = talib.CDLMORNINGSTAR(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1502, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1503
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLMORNINGSTAR'] = talib.CDLMORNINGSTAR(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLMORNINGSTAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLMORNINGSTAR, __pyx_t_1) < 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1506
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1507
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1507, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1507, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1508
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1509
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1509, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1506
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1510
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 *     def CDLENGULFING(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1495
 *         return df
 * 
 *     def CDLMORNINGSTAR(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLMORNINGSTAR
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLMORNINGSTAR", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1512
 *         return df
 * 
 *     def CDLENGULFING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLENGULFING
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_47CDLENGULFING(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_46CDLENGULFING, "\n        \345\207\275\346\225\260\345\220\215\357\274\232CDLENGULFING\n        \345\220\215\347\247\260\357\274\232Engulfing Pattern \345\220\236\345\231\254\346\250\241\345\274\217\n        \347\256\200\344\273\213\357\274\232\344\270\244\346\227\245K\347\272\277\346\250\241\345\274\217\357\274\214\345\210\206\345\244\232\345\244\264\345\220\236\345\231\254\345\222\214\347\251\272\345\244\264\345\220\236\345\231\254\357\274\214\344\273\245\345\244\232\345\244\264\345\220\236\345\231\254\344\270\272\344\276\213\357\274\214\347\254\254\344\270\200\346\227\245\344\270\272\351\230\264\347\272\277\357\274\214 \347\254\254\344\272\214\346\227\245\351\230\263\347\272\277\357\274\214\347\254\254\344\270\200\346\227\245\347\232\204\345\274\200\347\233\230\344\273\267\345\222\214\346\224\266\347\233\230\344\273\267\345\234\250\347\254\254\344\272\214\346\227\245\345\274\200\347\233\230\344\273\267\346\224\266\347\233\230\344\273\267\344\271\213\345\206\205\357\274\214\344\275\206\344\270\215\350\203\275\345\256\214\345\205\250\347\233\270\345\220\214\343\200\202\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_47CDLENGULFING = {"CDLENGULFING", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_47CDLENGULFING, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_46CDLENGULFING};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_47CDLENGULFING(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("CDLENGULFING (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "CDLENGULFING") < 0)) __PYX_ERR(0, 1512, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("CDLENGULFING", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1512, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLENGULFING", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_46CDLENGULFING(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_46CDLENGULFING(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_figure_title = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("CDLENGULFING", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1519
 *         :return:
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()             # <<<<<<<<<<<<<<
 *         df['CDLENGULFING'] = talib.CDLENGULFING(df.open, df.high, df.low, df.close)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_open);
  __Pyx_GIVEREF(__pyx_n_s_open);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_open)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_high);
  __Pyx_GIVEREF(__pyx_n_s_high);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_high)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_low);
  __Pyx_GIVEREF(__pyx_n_s_low);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_low)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_close)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_volume);
  __Pyx_GIVEREF(__pyx_n_s_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_volume)) __PYX_ERR(0, 1519, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1520
 *         '''
 *         df = self.stock_data[['date', 'open', 'high', 'low', 'close', 'volume']].copy()
 *         df['CDLENGULFING'] = talib.CDLENGULFING(df.open, df.high, df.low, df.close)             # <<<<<<<<<<<<<<
 * 
 *         # mplfinanceK
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_talib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_CDLENGULFING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_high); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_2, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_CDLENGULFING, __pyx_t_1) < 0))) __PYX_ERR(0, 1520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1523
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_show_figure); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1523, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1524
 *         # mplfinanceK
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)             # <<<<<<<<<<<<<<
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1524, __pyx_L1_error);
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1524, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1525
 *         if self.show_figure:
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_Candle_Chart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_figure_title = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1526
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_mpf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_plot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_df);
    __Pyx_GIVEREF(__pyx_v_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_df)) __PYX_ERR(0, 1526, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_type_2, __pyx_n_s_candle) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_my_style); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_style, __pyx_t_1) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_title, __pyx_v_figure_title) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_volume, Py_False) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_mav, __pyx_tuple__77) < 0) __PYX_ERR(0, 1526, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1523
 * 
 *         # mplfinanceK
 *         if self.show_figure:             # <<<<<<<<<<<<<<
 *             df.set_index(['date'], inplace=True)
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1527
 *             figure_title = f"{self.stock_data.loc[0, 'code']} Candle Chart"
 *             mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=False, mav=(5, 10))
 *         return df             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1512
 *         return df
 * 
 *     def CDLENGULFING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLENGULFING
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.stockTechInd.CDLENGULFING", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_figure_title);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1531
 * 
 * class baseStrategy(object):
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):             # <<<<<<<<<<<<<<
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_True));
  __Pyx_GIVEREF(((PyObject *)Py_True));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_True))) __PYX_ERR(0, 1531, __pyx_L1_error);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_strategy_date);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_strategy_date);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_strategy_date)) __PYX_ERR(0, 1531, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 1531, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  PyObject *__pyx_v_strategy_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,&__pyx_n_s_strategy_date,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_strategy_date);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_strategy_date);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1531, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
    __pyx_v_strategy_date = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1531, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strategy_date), (&PyString_Type), 0, "strategy_date", 1))) __PYX_ERR(0, 1531, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json, __pyx_v_strategy_date);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json, PyObject *__pyx_v_strategy_date) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1532
 * class baseStrategy(object):
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):
 *         self.dataproc = dataproc.dataPreprocess()             # <<<<<<<<<<<<<<
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 *         self.stock_code_name_all = self.dataproc.getStockSimpleInfo(mode='all')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dataPreprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataproc, __pyx_t_1) < 0) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1533
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         self.stock_code_name_all = self.dataproc.getStockSimpleInfo(mode='all')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stock_code_name, __pyx_t_1) < 0) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1534
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 *         self.stock_code_name_all = self.dataproc.getStockSimpleInfo(mode='all')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_n_s_all) < 0) __PYX_ERR(0, 1534, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stock_code_name_all, __pyx_t_3) < 0) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1537
 * 
 *         #
 *         self.use_date = strategy_date  #             # <<<<<<<<<<<<<<
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')  # datetime
 *         self.save_json = save_json  # json
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_use_date, __pyx_v_strategy_date) < 0) __PYX_ERR(0, 1537, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1538
 *         #
 *         self.use_date = strategy_date  #
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')  # datetime             # <<<<<<<<<<<<<<
 *         self.save_json = save_json  # json
 *         self.use_st_stock = False  # st
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strptime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_1, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_use_datetime, __pyx_t_3) < 0) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1539
 *         self.use_date = strategy_date  #
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')  # datetime
 *         self.save_json = save_json  # json             # <<<<<<<<<<<<<<
 *         self.use_st_stock = False  # st
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 1539, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1540
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')  # datetime
 *         self.save_json = save_json  # json
 *         self.use_st_stock = False  # st             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_use_st_stock, Py_False) < 0) __PYX_ERR(0, 1540, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1543
 * 
 *         #
 *         self.exclude_concepts = {'BK1050': '_', 'BK0815': '', 'BK1051': '_', 'BK0816': '',             # <<<<<<<<<<<<<<
 *                                  'BK0817': ''}
 *         #
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_BK1050, __pyx_kp_s__81) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_BK0815, __pyx_kp_s__82) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_BK1051, __pyx_kp_s__83) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_BK0816, __pyx_kp_s__84) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_BK0817, __pyx_kp_s__85) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exclude_concepts, __pyx_t_3) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1546
 *                                  'BK0817': ''}
 *         #
 *         self.exclude_indexes = {'1.000003': '', '1.000012': '', '1.000013': '', '0.399003': ''}             # <<<<<<<<<<<<<<
 *         #
 *         self.new_stock_dict = self.getAllNewStock(new_thr=60)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_1_000003, __pyx_kp_s__86) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_1_000012, __pyx_kp_s__87) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_1_000013, __pyx_kp_s__88) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_0_399003, __pyx_kp_s__89) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exclude_indexes, __pyx_t_3) < 0) __PYX_ERR(0, 1546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1548
 *         self.exclude_indexes = {'1.000003': '', '1.000012': '', '1.000013': '', '0.399003': ''}
 *         #
 *         self.new_stock_dict = self.getAllNewStock(new_thr=60)             # <<<<<<<<<<<<<<
 *         # st
 *         self.st_stock_dict = self.getAllStStock()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAllNewStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_new_thr, __pyx_int_60) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1548, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1550
 *         self.new_stock_dict = self.getAllNewStock(new_thr=60)
 *         # st
 *         self.st_stock_dict = self.getAllStStock()             # <<<<<<<<<<<<<<
 *         #
 *         self.delist_stock_dict = self.getAllDelistStock()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAllStStock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1552
 *         self.st_stock_dict = self.getAllStStock()
 *         #
 *         self.delist_stock_dict = self.getAllDelistStock()             # <<<<<<<<<<<<<<
 *         #
 *         self.suspended_stock_list = utils.getSuspendedStocks()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAllDelistStock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1554
 *         self.delist_stock_dict = self.getAllDelistStock()
 *         #
 *         self.suspended_stock_list = utils.getSuspendedStocks()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getSuspendedStocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list, __pyx_t_1) < 0) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1557
 * 
 *         # json
 *         self.strategy_json = {}             # <<<<<<<<<<<<<<
 *         self.has_strategy_file = False
 *         if self.save_json:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_1) < 0) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1558
 *         # json
 *         self.strategy_json = {}
 *         self.has_strategy_file = False             # <<<<<<<<<<<<<<
 *         if self.save_json:
 *             self.json_file_name = self.use_date + '_strategylog.json'
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, Py_False) < 0) __PYX_ERR(0, 1558, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1559
 *         self.strategy_json = {}
 *         self.has_strategy_file = False
 *         if self.save_json:             # <<<<<<<<<<<<<<
 *             self.json_file_name = self.use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_save_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1560
 *         self.has_strategy_file = False
 *         if self.save_json:
 *             self.json_file_name = self.use_date + '_strategylog.json'             # <<<<<<<<<<<<<<
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name, __pyx_t_3) < 0) __PYX_ERR(0, 1560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1561
 *         if self.save_json:
 *             self.json_file_name = self.use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name             # <<<<<<<<<<<<<<
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *             if 'updated' not in self.strategy_json:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file, __pyx_t_2) < 0) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1562
 *             self.json_file_name = self.use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)             # <<<<<<<<<<<<<<
 *             if 'updated' not in self.strategy_json:
 *                 self.strategy_json['updated'] = False
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1562, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1562, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, __pyx_t_1) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_5) < 0) __PYX_ERR(0, 1562, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1563
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *             if 'updated' not in self.strategy_json:             # <<<<<<<<<<<<<<
 *                 self.strategy_json['updated'] = False
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_updated, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1563, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1564
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *             if 'updated' not in self.strategy_json:
 *                 self.strategy_json['updated'] = False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 1564, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":1563
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *             if 'updated' not in self.strategy_json:             # <<<<<<<<<<<<<<
 *                 self.strategy_json['updated'] = False
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1559
 *         self.strategy_json = {}
 *         self.has_strategy_file = False
 *         if self.save_json:             # <<<<<<<<<<<<<<
 *             self.json_file_name = self.use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1567
 * 
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)             # <<<<<<<<<<<<<<
 *         if self.non_serializable_attrs:
 *             print("baseStrategy :", self.non_serializable_attrs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_check_serializability); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs, __pyx_t_2) < 0) __PYX_ERR(0, 1567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1568
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("baseStrategy :", self.non_serializable_attrs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1569
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:
 *             print("baseStrategy :", self.non_serializable_attrs)             # <<<<<<<<<<<<<<
 * 
 *         print("baseStrategy.__init__")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_baseStrategy);
    __Pyx_GIVEREF(__pyx_kp_s_baseStrategy);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_baseStrategy)) __PYX_ERR(0, 1569, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1568
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("baseStrategy :", self.non_serializable_attrs)
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1571
 *             print("baseStrategy :", self.non_serializable_attrs)
 * 
 *         print("baseStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1531
 * 
 * class baseStrategy(object):
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):             # <<<<<<<<<<<<<<
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1573
 *         print("baseStrategy.__init__")
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         #
 *         state = self.__dict__.copy()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_3__getstate__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_3__getstate__ = {"__getstate__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_3__getstate__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_3__getstate__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1573, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__getstate__") < 0)) __PYX_ERR(0, 1573, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getstate__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1573, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_2__getstate__(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getstate__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1575
 *     def __getstate__(self):
 *         #
 *         state = self.__dict__.copy()             # <<<<<<<<<<<<<<
 *         #
 *         # state.pop('non_serializable_attribute', None)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_state = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1578
 *         #
 *         # state.pop('non_serializable_attribute', None)
 *         return state             # <<<<<<<<<<<<<<
 * 
 *     def __setstate__(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_state);
  __pyx_r = __pyx_v_state;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1573
 *         print("baseStrategy.__init__")
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         #
 *         state = self.__dict__.copy()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1580
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         #
 *         self.__dict__.update(state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_5__setstate__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_5__setstate__ = {"__setstate__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_5__setstate__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_5__setstate__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_state,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1580, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_state)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1580, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); __PYX_ERR(0, 1580, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate__") < 0)) __PYX_ERR(0, 1580, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_state = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1580, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_4__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_4__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1582
 *     def __setstate__(self, state):
 *         #
 *         self.__dict__.update(state)             # <<<<<<<<<<<<<<
 *         #
 *         # self.non_serializable_attribute = None  #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_state};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1580
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         #
 *         self.__dict__.update(state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1586
 *         # self.non_serializable_attribute = None  #
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_7reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_7reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_7reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_7reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_use_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_use_date,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1586, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1586, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("reset", 1, 2, 2, 1); __PYX_ERR(0, 1586, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reset") < 0)) __PYX_ERR(0, 1586, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_use_date = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reset", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1586, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_6reset(__pyx_self, __pyx_v_self, __pyx_v_use_date);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_6reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_date) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1587
 * 
 *     def reset(self, use_date):
 *         self.use_date = use_date             # <<<<<<<<<<<<<<
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         self.strategy_json = {}
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_use_date, __pyx_v_use_date) < 0) __PYX_ERR(0, 1587, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1588
 *     def reset(self, use_date):
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         self.strategy_json = {}
 *         self.has_strategy_file = False
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_use_datetime, __pyx_t_1) < 0) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1589
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         self.strategy_json = {}             # <<<<<<<<<<<<<<
 *         self.has_strategy_file = False
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_1) < 0) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1590
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         self.strategy_json = {}
 *         self.has_strategy_file = False             # <<<<<<<<<<<<<<
 * 
 *         if self.save_json:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, Py_False) < 0) __PYX_ERR(0, 1590, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1592
 *         self.has_strategy_file = False
 * 
 *         if self.save_json:             # <<<<<<<<<<<<<<
 *             self.json_file_name = use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_save_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1593
 * 
 *         if self.save_json:
 *             self.json_file_name = use_date + '_strategylog.json'             # <<<<<<<<<<<<<<
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_use_date, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name, __pyx_t_1) < 0) __PYX_ERR(0, 1593, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1594
 *         if self.save_json:
 *             self.json_file_name = use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name             # <<<<<<<<<<<<<<
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file, __pyx_t_2) < 0) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1595
 *             self.json_file_name = use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)             # <<<<<<<<<<<<<<
 * 
 *     def checkDatabaseTableUpdate(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_1, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1595, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1595, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file, __pyx_t_3) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json, __pyx_t_4) < 0) __PYX_ERR(0, 1595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1592
 *         self.has_strategy_file = False
 * 
 *         if self.save_json:             # <<<<<<<<<<<<<<
 *             self.json_file_name = use_date + '_strategylog.json'
 *             self.load_json_file = utils.update_strategy_logs_dir + self.json_file_name
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1586
 *         # self.non_serializable_attribute = None  #
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1597
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 * 
 *     def checkDatabaseTableUpdate(self):             # <<<<<<<<<<<<<<
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_9checkDatabaseTableUpdate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_9checkDatabaseTableUpdate = {"checkDatabaseTableUpdate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_9checkDatabaseTableUpdate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_9checkDatabaseTableUpdate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checkDatabaseTableUpdate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "checkDatabaseTableUpdate") < 0)) __PYX_ERR(0, 1597, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("checkDatabaseTableUpdate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1597, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.checkDatabaseTableUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_8checkDatabaseTableUpdate(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_8checkDatabaseTableUpdate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  int __pyx_v_updated_database_file;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("checkDatabaseTableUpdate", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1598
 * 
 *     def checkDatabaseTableUpdate(self):
 *         json_file_name = self.use_date + '_updatelog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_updatelog_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_json_file_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1599
 *     def checkDatabaseTableUpdate(self):
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)
 *         if self.has_update_file and self.update_json['updated']:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update_db_logs_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_json_file_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_load_json_file = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1600
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 *         if self.has_update_file and self.update_json['updated']:
 *             updated_database_file = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1600, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1600, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1600, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file, __pyx_t_3) < 0) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_update_json, __pyx_t_1) < 0) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1601
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)
 *         if self.has_update_file and self.update_json['updated']:             # <<<<<<<<<<<<<<
 *             updated_database_file = True
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1602
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)
 *         if self.has_update_file and self.update_json['updated']:
 *             updated_database_file = True             # <<<<<<<<<<<<<<
 *         else:
 *             updated_database_file = False
 */
    __pyx_v_updated_database_file = 1;

    /* "tbstock/tradeStrategy/stockStrategy.py":1601
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 *         self.has_update_file, self.update_json = utils.loadJsonData(load_json_file, json_file_name)
 *         if self.has_update_file and self.update_json['updated']:             # <<<<<<<<<<<<<<
 *             updated_database_file = True
 *         else:
 */
    goto __pyx_L5;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1604
 *             updated_database_file = True
 *         else:
 *             updated_database_file = False             # <<<<<<<<<<<<<<
 * 
 *         if not updated_database_file:
 */
  /*else*/ {
    __pyx_v_updated_database_file = 0;
  }
  __pyx_L5:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1606
 *             updated_database_file = False
 * 
 *         if not updated_database_file:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 */
  __pyx_t_7 = (!__pyx_v_updated_database_file);
  if (unlikely(__pyx_t_7)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1607
 * 
 *         if not updated_database_file:
 *             raise RuntimeError(f"{self.use_date}Mysql.")             # <<<<<<<<<<<<<<
 * 
 *     def dumpJsonToFile(self):
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_n_u__91);
    __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
    __pyx_t_9 += 5;
    __Pyx_GIVEREF(__pyx_n_u__91);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u__91);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_Mysql);
    __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
    __pyx_t_9 += 12;
    __Pyx_GIVEREF(__pyx_kp_u_Mysql);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Mysql);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1607, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1606
 *             updated_database_file = False
 * 
 *         if not updated_database_file:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1597
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 * 
 *     def checkDatabaseTableUpdate(self):             # <<<<<<<<<<<<<<
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.checkDatabaseTableUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1609
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_11dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_11dumpJsonToFile = {"dumpJsonToFile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_11dumpJsonToFile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_11dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dumpJsonToFile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dumpJsonToFile") < 0)) __PYX_ERR(0, 1609, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dumpJsonToFile", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1609, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_10dumpJsonToFile(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_10dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dumpJsonToFile", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1611
 *     def dumpJsonToFile(self):
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)             # <<<<<<<<<<<<<<
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1609
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1613
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:             # <<<<<<<<<<<<<<
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_13getStockNameByCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_13getStockNameByCode = {"getStockNameByCode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_13getStockNameByCode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_13getStockNameByCode(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockNameByCode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getStockNameByCode", 1, 2, 2, 1); __PYX_ERR(0, 1613, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockNameByCode") < 0)) __PYX_ERR(0, 1613, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockNameByCode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1613, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getStockNameByCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_code), (&PyString_Type), 0, "stock_code", 1))) __PYX_ERR(0, 1613, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_12getStockNameByCode(__pyx_self, __pyx_v_self, __pyx_v_stock_code);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_12getStockNameByCode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code) {
  PyObject *__pyx_v_name_list = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  unsigned int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockNameByCode", 0);
  __Pyx_INCREF(__pyx_v_stock_code);

  /* "tbstock/tradeStrategy/stockStrategy.py":1614
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:
 *         if not isinstance(stock_code, str):             # <<<<<<<<<<<<<<
 *             stock_code = str(stock_code)
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 */
  __pyx_t_1 = PyString_Check(__pyx_v_stock_code); 
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1615
 *     def getStockNameByCode(self, stock_code: str) -> str:
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)             # <<<<<<<<<<<<<<
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 *         if not name_list:
 */
    if (!(likely(PyString_CheckExact(__pyx_v_stock_code)) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_stock_code))) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_stock_code);
    __Pyx_DECREF_SET(__pyx_v_stock_code, ((PyObject*)__pyx_v_stock_code));

    /* "tbstock/tradeStrategy/stockStrategy.py":1614
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:
 *         if not isinstance(stock_code, str):             # <<<<<<<<<<<<<<
 *             stock_code = str(stock_code)
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1616
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values             # <<<<<<<<<<<<<<
 *         if not name_list:
 *             utils.logger.error(f'cant get stock name for {stock_code}.')
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_code_name_all); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_code_name_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_name_list = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1617
 *             stock_code = str(stock_code)
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 *         if not name_list:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'cant get stock name for {stock_code}.')
 *             return stock_code
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_name_list); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1617, __pyx_L1_error)
  __pyx_t_1 = (!__pyx_t_2);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1618
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 *         if not name_list:
 *             utils.logger.error(f'cant get stock name for {stock_code}.')             # <<<<<<<<<<<<<<
 *             return stock_code
 *         name = name_list[0]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_cant_get_stock_name_for);
    __pyx_t_6 += 24;
    __Pyx_GIVEREF(__pyx_kp_u_cant_get_stock_name_for);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_cant_get_stock_name_for);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u__92);
    __pyx_t_6 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__92);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__92);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1619
 *         if not name_list:
 *             utils.logger.error(f'cant get stock name for {stock_code}.')
 *             return stock_code             # <<<<<<<<<<<<<<
 *         name = name_list[0]
 *         return name
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_stock_code);
    __pyx_r = __pyx_v_stock_code;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1617
 *             stock_code = str(stock_code)
 *         name_list = self.stock_code_name_all[self.stock_code_name_all['code'] == stock_code]['name'].values
 *         if not name_list:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'cant get stock name for {stock_code}.')
 *             return stock_code
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1620
 *             utils.logger.error(f'cant get stock name for {stock_code}.')
 *             return stock_code
 *         name = name_list[0]             # <<<<<<<<<<<<<<
 *         return name
 * 
 */
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_name_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_name = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1621
 *             return stock_code
 *         name = name_list[0]
 *         return name             # <<<<<<<<<<<<<<
 * 
 *     def getAllDelistStock(self) -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyString_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_name))) __PYX_ERR(0, 1621, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_name);
  __pyx_r = ((PyObject*)__pyx_v_name);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1613
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:             # <<<<<<<<<<<<<<
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getStockNameByCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name_list);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1623
 *         return name
 * 
 *     def getAllDelistStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_15getAllDelistStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_15getAllDelistStock = {"getAllDelistStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_15getAllDelistStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_15getAllDelistStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAllDelistStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getAllDelistStock") < 0)) __PYX_ERR(0, 1623, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAllDelistStock", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1623, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllDelistStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_14getAllDelistStock(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_14getAllDelistStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_delist_stock_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAllDelistStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1624
 * 
 *     def getAllDelistStock(self) -> dict:
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')             # <<<<<<<<<<<<<<
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_delist']]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_simple_info};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1625
 *     def getAllDelistStock(self) -> dict:
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_delist']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_delist', axis=1)
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isDelistStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_is_delist, __pyx_t_1) < 0))) __PYX_ERR(0, 1625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1626
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_delist']]             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = all_stock_simple_info.drop('is_delist', axis=1)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_is_delist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_all_stock_simple_info, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_all_stock_simple_info, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1627
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_delist']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_delist', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         delist_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_drop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1627, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__93, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_all_stock_simple_info, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1629
 *         all_stock_simple_info = all_stock_simple_info.drop('is_delist', axis=1)
 * 
 *         delist_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()             # <<<<<<<<<<<<<<
 *         return delist_stock_dict
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_set_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_s_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1629, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_delist_stock_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1630
 * 
 *         delist_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 *         return delist_stock_dict             # <<<<<<<<<<<<<<
 * 
 *     def getAllStStock(self) -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyDict_CheckExact(__pyx_v_delist_stock_dict))||((__pyx_v_delist_stock_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_delist_stock_dict))) __PYX_ERR(0, 1630, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_delist_stock_dict);
  __pyx_r = ((PyObject*)__pyx_v_delist_stock_dict);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1623
 *         return name
 * 
 *     def getAllDelistStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllDelistStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_delist_stock_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1632
 *         return delist_stock_dict
 * 
 *     def getAllStStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_17getAllStStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_17getAllStStock = {"getAllStStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_17getAllStStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_17getAllStStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAllStStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1632, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getAllStStock") < 0)) __PYX_ERR(0, 1632, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAllStStock", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1632, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllStStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_16getAllStStock(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_16getAllStStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_st_stock_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAllStStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1633
 * 
 *     def getAllStStock(self) -> dict:
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')             # <<<<<<<<<<<<<<
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_st']]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_simple_info};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1634
 *     def getAllStStock(self) -> dict:
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_st']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_st', axis=1)
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isStStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_is_st, __pyx_t_1) < 0))) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1635
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_st']]             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = all_stock_simple_info.drop('is_st', axis=1)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_is_st); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_all_stock_simple_info, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_all_stock_simple_info, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1636
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_st']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_st', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         st_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_drop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1636, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__94, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_all_stock_simple_info, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1638
 *         all_stock_simple_info = all_stock_simple_info.drop('is_st', axis=1)
 * 
 *         st_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()             # <<<<<<<<<<<<<<
 *         return st_stock_dict
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_set_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_s_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_st_stock_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1639
 * 
 *         st_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 *         return st_stock_dict             # <<<<<<<<<<<<<<
 * 
 *     def getAllNewStock(self, new_thr: int = 90) -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyDict_CheckExact(__pyx_v_st_stock_dict))||((__pyx_v_st_stock_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_st_stock_dict))) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_st_stock_dict);
  __pyx_r = ((PyObject*)__pyx_v_st_stock_dict);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1632
 *         return delist_stock_dict
 * 
 *     def getAllStStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllStStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_st_stock_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1641
 *         return st_stock_dict
 * 
 *     def getAllNewStock(self, new_thr: int = 90) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_new_thr);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_new_thr);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_new_thr)) __PYX_ERR(0, 1641, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 1641, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_19getAllNewStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_18getAllNewStock, "\n        \350\216\267\345\217\226\346\211\200\346\234\211\344\270\212\345\270\202\346\226\260\350\202\241\344\273\243\347\240\201\n        \344\270\212\345\270\202\346\227\245\346\234\237\350\267\235\347\246\273\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\345\260\217\344\272\216new_thr\344\270\252\344\272\244\346\230\223\346\227\245\347\232\204\350\202\241\347\245\250\n        :param new_thr: \345\210\244\346\226\255\346\230\257\345\220\246\344\270\272\346\226\260\350\202\241\347\232\204\351\230\210\345\200\274\357\274\214\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_19getAllNewStock = {"getAllNewStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_19getAllNewStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_18getAllNewStock};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_19getAllNewStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_new_thr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAllNewStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_thr,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_new_thr);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_thr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getAllNewStock") < 0)) __PYX_ERR(0, 1641, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_new_thr = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAllNewStock", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1641, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllNewStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_thr), (&PyInt_Type), 0, "new_thr", 1))) __PYX_ERR(0, 1641, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_18getAllNewStock(__pyx_self, __pyx_v_self, __pyx_v_new_thr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_18getAllNewStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_thr) {
  PyObject *__pyx_v_now_datetime = NULL;
  PyObject *__pyx_v_new_stock_thr_date = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_new_stock_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAllNewStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1648
 *         :return:
 *         '''
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         new_stock_thr_date = utils.sh_calendar.session_offset(self.use_date, -(new_thr - 1))  # new_thr
 *         data = self.dataproc.loadTableContentByDate('stock_basic_info', new_stock_thr_date, now_datetime)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_now_datetime = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1649
 *         '''
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         new_stock_thr_date = utils.sh_calendar.session_offset(self.use_date, -(new_thr - 1))  # new_thr             # <<<<<<<<<<<<<<
 *         data = self.dataproc.loadTableContentByDate('stock_basic_info', new_stock_thr_date, now_datetime)
 *         new_stock_dict = data.set_index('code')['name'].to_dict()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Subtract(__pyx_v_new_thr, __pyx_int_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_new_stock_thr_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1650
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         new_stock_thr_date = utils.sh_calendar.session_offset(self.use_date, -(new_thr - 1))  # new_thr
 *         data = self.dataproc.loadTableContentByDate('stock_basic_info', new_stock_thr_date, now_datetime)             # <<<<<<<<<<<<<<
 *         new_stock_dict = data.set_index('code')['name'].to_dict()
 *         return new_stock_dict
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadTableContentByDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_n_s_stock_basic_info, __pyx_v_new_stock_thr_date, __pyx_v_now_datetime};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1651
 *         new_stock_thr_date = utils.sh_calendar.session_offset(self.use_date, -(new_thr - 1))  # new_thr
 *         data = self.dataproc.loadTableContentByDate('stock_basic_info', new_stock_thr_date, now_datetime)
 *         new_stock_dict = data.set_index('code')['name'].to_dict()             # <<<<<<<<<<<<<<
 *         return new_stock_dict
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_set_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_code};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_new_stock_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1652
 *         data = self.dataproc.loadTableContentByDate('stock_basic_info', new_stock_thr_date, now_datetime)
 *         new_stock_dict = data.set_index('code')['name'].to_dict()
 *         return new_stock_dict             # <<<<<<<<<<<<<<
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyDict_CheckExact(__pyx_v_new_stock_dict))||((__pyx_v_new_stock_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_new_stock_dict))) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_new_stock_dict);
  __pyx_r = ((PyObject*)__pyx_v_new_stock_dict);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1641
 *         return st_stock_dict
 * 
 *     def getAllNewStock(self, new_thr: int = 90) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.getAllNewStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_now_datetime);
  __Pyx_XDECREF(__pyx_v_new_stock_thr_date);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_new_stock_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1654
 *         return new_stock_dict
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):             # <<<<<<<<<<<<<<
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_new_thr);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_new_thr);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_new_thr)) __PYX_ERR(0, 1654, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 1654, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_21isNewStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_21isNewStock = {"isNewStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_21isNewStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_21isNewStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_new_thr = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isNewStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_new_thr,0};
    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
    values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_new_thr);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isNewStock", 0, 2, 3, 1); __PYX_ERR(0, 1654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_thr);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isNewStock") < 0)) __PYX_ERR(0, 1654, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = ((PyObject*)values[1]);
    __pyx_v_new_thr = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isNewStock", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1654, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isNewStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_code), (&PyString_Type), 0, "stock_code", 1))) __PYX_ERR(0, 1654, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_thr), (&PyInt_Type), 0, "new_thr", 1))) __PYX_ERR(0, 1654, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_20isNewStock(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_new_thr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_20isNewStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_new_thr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isNewStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1655
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):
 *         if not self.new_stock_dict:             # <<<<<<<<<<<<<<
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 *         if stock_code in self.new_stock_dict:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1656
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)             # <<<<<<<<<<<<<<
 *         if stock_code in self.new_stock_dict:
 *             return True
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAllNewStock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_new_thr};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict, __pyx_t_1) < 0) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1655
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):
 *         if not self.new_stock_dict:             # <<<<<<<<<<<<<<
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 *         if stock_code in self.new_stock_dict:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1657
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 *         if stock_code in self.new_stock_dict:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1658
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 *         if stock_code in self.new_stock_dict:
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1657
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 *         if stock_code in self.new_stock_dict:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1660
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def isDelistStock(self, stock_tag: str):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1654
 *         return new_stock_dict
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):             # <<<<<<<<<<<<<<
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isNewStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1662
 *             return False
 * 
 *     def isDelistStock(self, stock_tag: str):             # <<<<<<<<<<<<<<
 *         '''
 *         ""
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_23isDelistStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_22isDelistStock, "\n        \345\210\244\346\226\255\346\230\257\345\220\246\344\270\272\345\244\204\344\272\216\351\200\200\345\270\202\350\202\241\347\245\250\357\274\214\350\202\241\347\245\250\345\220\215\347\247\260\344\270\255\346\234\211\"\351\200\200\345\270\202\"\344\270\244\344\270\252\345\255\227\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_23isDelistStock = {"isDelistStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_23isDelistStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_22isDelistStock};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_23isDelistStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_tag = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isDelistStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_tag,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1662, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_tag)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1662, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isDelistStock", 1, 2, 2, 1); __PYX_ERR(0, 1662, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isDelistStock") < 0)) __PYX_ERR(0, 1662, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_tag = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isDelistStock", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1662, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isDelistStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_tag), (&PyString_Type), 0, "stock_tag", 1))) __PYX_ERR(0, 1662, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_22isDelistStock(__pyx_self, __pyx_v_self, __pyx_v_stock_tag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_22isDelistStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_tag) {
  PyObject *__pyx_v_is_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isDelistStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1666
 *         ""
 *         '''
 *         is_code = utils.startWithDigit(stock_tag)             # <<<<<<<<<<<<<<
 *         if is_code:
 *             stock_name = self.getStockNameByCode(stock_tag)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_startWithDigit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_tag};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_is_code = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1667
 *         '''
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_is_code); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1667, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1668
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 *             stock_name = self.getStockNameByCode(stock_tag)             # <<<<<<<<<<<<<<
 *         else:
 *             stock_name = stock_tag
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_tag};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_stock_name = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1667
 *         '''
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1670
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 *             stock_name = stock_tag             # <<<<<<<<<<<<<<
 *         if '' in stock_name or '' in stock_name:
 *             return True
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_stock_tag);
    __pyx_v_stock_name = __pyx_v_stock_tag;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1671
 *         else:
 *             stock_name = stock_tag
 *         if '' in stock_name or '' in stock_name:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__95, __pyx_v_stock_name, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1671, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__96, __pyx_v_stock_name, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1671, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1672
 *             stock_name = stock_tag
 *         if '' in stock_name or '' in stock_name:
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1671
 *         else:
 *             stock_name = stock_tag
 *         if '' in stock_name or '' in stock_name:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1674
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def isStStock(self, stock_tag):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1662
 *             return False
 * 
 *     def isDelistStock(self, stock_tag: str):             # <<<<<<<<<<<<<<
 *         '''
 *         ""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isDelistStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_is_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1676
 *             return False
 * 
 *     def isStStock(self, stock_tag):             # <<<<<<<<<<<<<<
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_25isStStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_25isStStock = {"isStStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_25isStStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_25isStStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_tag = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isStStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_tag,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1676, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_tag)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1676, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isStStock", 1, 2, 2, 1); __PYX_ERR(0, 1676, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isStStock") < 0)) __PYX_ERR(0, 1676, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_tag = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isStStock", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1676, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isStStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_24isStStock(__pyx_self, __pyx_v_self, __pyx_v_stock_tag);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_24isStStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_tag) {
  PyObject *__pyx_v_is_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isStStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1677
 * 
 *     def isStStock(self, stock_tag):
 *         is_code = utils.startWithDigit(stock_tag)             # <<<<<<<<<<<<<<
 *         if is_code:
 *             stock_name = self.getStockNameByCode(stock_tag)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_startWithDigit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_tag};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_is_code = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1678
 *     def isStStock(self, stock_tag):
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_is_code); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1678, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1679
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 *             stock_name = self.getStockNameByCode(stock_tag)             # <<<<<<<<<<<<<<
 *         else:
 *             stock_name = stock_tag
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_tag};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_stock_name = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1678
 *     def isStStock(self, stock_tag):
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1681
 *             stock_name = self.getStockNameByCode(stock_tag)
 *         else:
 *             stock_name = stock_tag             # <<<<<<<<<<<<<<
 *         if 'ST' in stock_name:
 *             return True
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_stock_tag);
    __pyx_v_stock_name = __pyx_v_stock_tag;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1682
 *         else:
 *             stock_name = stock_tag
 *         if 'ST' in stock_name:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_ST, __pyx_v_stock_name, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1682, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1683
 *             stock_name = stock_tag
 *         if 'ST' in stock_name:
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1682
 *         else:
 *             stock_name = stock_tag
 *         if 'ST' in stock_name:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1685
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1676
 *             return False
 * 
 *     def isStStock(self, stock_tag):             # <<<<<<<<<<<<<<
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isStStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_is_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1687
 *             return False
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_27isUpLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_27isUpLimit = {"isUpLimit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_27isUpLimit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_27isUpLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_close = 0;
  PyObject *__pyx_v_pre_close = 0;
  PyObject *__pyx_v_stock_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isUpLimit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_close,&__pyx_n_s_pre_close,&__pyx_n_s_stock_name,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_0)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isUpLimit", 0, 4, 5, 1); __PYX_ERR(0, 1687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_close)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isUpLimit", 0, 4, 5, 2); __PYX_ERR(0, 1687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pre_close)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isUpLimit", 0, 4, 5, 3); __PYX_ERR(0, 1687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isUpLimit") < 0)) __PYX_ERR(0, 1687, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_close = values[2];
    __pyx_v_pre_close = values[3];
    __pyx_v_stock_name = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isUpLimit", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1687, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isUpLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_26isUpLimit(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_close, __pyx_v_pre_close, __pyx_v_stock_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_26isUpLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_close, PyObject *__pyx_v_pre_close, PyObject *__pyx_v_stock_name) {
  PyObject *__pyx_v_ratio_limit = NULL;
  PyObject *__pyx_v_is_up_limit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isUpLimit", 0);
  __Pyx_INCREF(__pyx_v_stock_name);

  /* "tbstock/tradeStrategy/stockStrategy.py":1688
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_stock_name, __pyx_kp_s_0, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1688, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1689
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)             # <<<<<<<<<<<<<<
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 *         #
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_stock_code};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_stock_name, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1688
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1690
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)             # <<<<<<<<<<<<<<
 *         #
 *         is_up_limit = abs(round(close, 2) - round(pre_close * (1 + ratio_limit), 2)) <= 0.01
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockLimitUp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stock_code, __pyx_v_stock_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_ratio_limit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1692
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 *         #
 *         is_up_limit = abs(round(close, 2) - round(pre_close * (1 + ratio_limit), 2)) <= 0.01             # <<<<<<<<<<<<<<
 *         return is_up_limit
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_close);
  __Pyx_GIVEREF(__pyx_v_close);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_close)) __PYX_ERR(0, 1692, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1692, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_v_ratio_limit, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_pre_close, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1692, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_01, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_is_up_limit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1693
 *         #
 *         is_up_limit = abs(round(close, 2) - round(pre_close * (1 + ratio_limit), 2)) <= 0.01
 *         return is_up_limit             # <<<<<<<<<<<<<<
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_is_up_limit);
  __pyx_r = __pyx_v_is_up_limit;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1687
 *             return False
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isUpLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ratio_limit);
  __Pyx_XDECREF(__pyx_v_is_up_limit);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1695
 *         return is_up_limit
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_29isDownLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_29isDownLimit = {"isDownLimit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_29isDownLimit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_29isDownLimit(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_close = 0;
  PyObject *__pyx_v_pre_close = 0;
  PyObject *__pyx_v_stock_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isDownLimit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_close,&__pyx_n_s_pre_close,&__pyx_n_s_stock_name,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_0)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isDownLimit", 0, 4, 5, 1); __PYX_ERR(0, 1695, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_close)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isDownLimit", 0, 4, 5, 2); __PYX_ERR(0, 1695, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pre_close)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isDownLimit", 0, 4, 5, 3); __PYX_ERR(0, 1695, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isDownLimit") < 0)) __PYX_ERR(0, 1695, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_close = values[2];
    __pyx_v_pre_close = values[3];
    __pyx_v_stock_name = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isDownLimit", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1695, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isDownLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_28isDownLimit(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_close, __pyx_v_pre_close, __pyx_v_stock_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_28isDownLimit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_close, PyObject *__pyx_v_pre_close, PyObject *__pyx_v_stock_name) {
  PyObject *__pyx_v_ratio_limit = NULL;
  PyObject *__pyx_v_is_down_limit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isDownLimit", 0);
  __Pyx_INCREF(__pyx_v_stock_name);

  /* "tbstock/tradeStrategy/stockStrategy.py":1696
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_stock_name, __pyx_kp_s_0, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1696, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1697
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)             # <<<<<<<<<<<<<<
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 *         is_down_limit = abs(round(close, 2) - round(pre_close * (1 - ratio_limit), 2)) <= 0.01
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_stock_code};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_stock_name, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1696
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:
 *         if stock_name == '0':             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1698
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)             # <<<<<<<<<<<<<<
 *         is_down_limit = abs(round(close, 2) - round(pre_close * (1 - ratio_limit), 2)) <= 0.01
 *         return is_down_limit
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockLimitUp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stock_code, __pyx_v_stock_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_ratio_limit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1699
 *             stock_name = self.getStockNameByCode(stock_code)
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 *         is_down_limit = abs(round(close, 2) - round(pre_close * (1 - ratio_limit), 2)) <= 0.01             # <<<<<<<<<<<<<<
 *         return is_down_limit
 * 
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_close);
  __Pyx_GIVEREF(__pyx_v_close);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_close)) __PYX_ERR(0, 1699, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1699, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_v_ratio_limit, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_pre_close, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1699, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_01, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_is_down_limit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1700
 *         ratio_limit = utils.getStockLimitUp(stock_code, stock_name)
 *         is_down_limit = abs(round(close, 2) - round(pre_close * (1 - ratio_limit), 2)) <= 0.01
 *         return is_down_limit             # <<<<<<<<<<<<<<
 * 
 *     def listIntersection(self, data_list: Union[List, None] = None, *args) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_is_down_limit);
  __pyx_r = __pyx_v_is_down_limit;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1695
 *         return is_up_limit
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.isDownLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ratio_limit);
  __Pyx_XDECREF(__pyx_v_is_down_limit);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1702
 *         return is_down_limit
 * 
 *     def listIntersection(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         use example:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_31listIntersection(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_30listIntersection, "\n        use example:\n        list1 = ['1', '2', '3']\n        list2 = ['2', '3', '4', '5']\n        list3 = ['2', '5', '7', '10']\n        intersec_list = listIntersection(list1, list2, list3)\n        print(intersec_list)\n        all_list = [list1, list2, list3]\n        intersec_list = listIntersection(all_list)\n        print(intersec_list)\n        :param args:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_31listIntersection = {"listIntersection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_31listIntersection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_30listIntersection};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_31listIntersection(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data_list = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("listIntersection (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1702, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1702, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "listIntersection") < 0)) __PYX_ERR(0, 1702, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        default:
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        case  0:
        goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_data_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("listIntersection", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1702, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.listIntersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_30listIntersection(__pyx_self, __pyx_v_self, __pyx_v_data_list, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_30listIntersection(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data_list, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_intersection_list = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("listIntersection", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1716
 *         :return:
 *         '''
 *         if not isinstance(data_list[0], list):             # <<<<<<<<<<<<<<
 *             data = list(args)
 *             data.append(data_list)
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_data_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_Check(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1717
 *         '''
 *         if not isinstance(data_list[0], list):
 *             data = list(args)             # <<<<<<<<<<<<<<
 *             data.append(data_list)
 *         else:
 */
    __pyx_t_1 = PySequence_List(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_data = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1718
 *         if not isinstance(data_list[0], list):
 *             data = list(args)
 *             data.append(data_list)             # <<<<<<<<<<<<<<
 *         else:
 *             data = data_list
 */
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_data, __pyx_v_data_list); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1718, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1716
 *         :return:
 *         '''
 *         if not isinstance(data_list[0], list):             # <<<<<<<<<<<<<<
 *             data = list(args)
 *             data.append(data_list)
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1720
 *             data.append(data_list)
 *         else:
 *             data = data_list             # <<<<<<<<<<<<<<
 * 
 *         intersection_list = data[0]
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_data_list);
    __pyx_v_data = __pyx_v_data_list;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1722
 *             data = data_list
 * 
 *         intersection_list = data[0]             # <<<<<<<<<<<<<<
 *         for arg in data:
 *             intersection_list = list(set(intersection_list) & set(arg))
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_intersection_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1723
 * 
 *         intersection_list = data[0]
 *         for arg in data:             # <<<<<<<<<<<<<<
 *             intersection_list = list(set(intersection_list) & set(arg))
 *         return intersection_list
 */
  if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) {
    __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1723, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1723, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1723, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1723, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1723, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1723, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1723, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1723, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1724
 *         intersection_list = data[0]
 *         for arg in data:
 *             intersection_list = list(set(intersection_list) & set(arg))             # <<<<<<<<<<<<<<
 *         return intersection_list
 * 
 */
    __pyx_t_7 = PySet_New(__pyx_v_intersection_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySet_New(__pyx_v_arg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyNumber_And(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PySequence_List(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_intersection_list, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1723
 * 
 *         intersection_list = data[0]
 *         for arg in data:             # <<<<<<<<<<<<<<
 *             intersection_list = list(set(intersection_list) & set(arg))
 *         return intersection_list
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1725
 *         for arg in data:
 *             intersection_list = list(set(intersection_list) & set(arg))
 *         return intersection_list             # <<<<<<<<<<<<<<
 * 
 *     def listUnion(self, data_list: Union[List, None] = None, *args) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyList_CheckExact(__pyx_v_intersection_list))||((__pyx_v_intersection_list) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_intersection_list))) __PYX_ERR(0, 1725, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_intersection_list);
  __pyx_r = ((PyObject*)__pyx_v_intersection_list);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1702
 *         return is_down_limit
 * 
 *     def listIntersection(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         use example:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.listIntersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_intersection_list);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1727
 *         return intersection_list
 * 
 *     def listUnion(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_33listUnion(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_32listUnion, "\n        list \346\261\202\345\271\266\351\233\206\n        use example:\n        list1 = ['1', '2', '3']\n        list2 = ['2', '3', '4', '5']\n        list3 = ['2', '5', '7', '10']\n        union_list = listUnion(list1, list2, list3)\n        print(union_list)\n        all_list = [list1, list2, list3]\n        union_list = listUnion(all_list)\n        print(union_list)\n        :param args:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_33listUnion = {"listUnion", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_33listUnion, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_32listUnion};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_33listUnion(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data_list = 0;
  PyObject *__pyx_v_args = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("listUnion (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "listUnion") < 0)) __PYX_ERR(0, 1727, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        default:
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        case  0:
        goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_data_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("listUnion", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1727, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.listUnion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_32listUnion(__pyx_self, __pyx_v_self, __pyx_v_data_list, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_32listUnion(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data_list, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_union_list = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("listUnion", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1742
 *         :return:
 *         '''
 *         if not isinstance(data_list[0], list):             # <<<<<<<<<<<<<<
 *             data = list(args)
 *             data.append(data_list)
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_data_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_Check(__pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1743
 *         '''
 *         if not isinstance(data_list[0], list):
 *             data = list(args)             # <<<<<<<<<<<<<<
 *             data.append(data_list)
 *         else:
 */
    __pyx_t_1 = PySequence_List(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_data = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1744
 *         if not isinstance(data_list[0], list):
 *             data = list(args)
 *             data.append(data_list)             # <<<<<<<<<<<<<<
 *         else:
 *             data = data_list
 */
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_data, __pyx_v_data_list); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1744, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1742
 *         :return:
 *         '''
 *         if not isinstance(data_list[0], list):             # <<<<<<<<<<<<<<
 *             data = list(args)
 *             data.append(data_list)
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1746
 *             data.append(data_list)
 *         else:
 *             data = data_list             # <<<<<<<<<<<<<<
 * 
 *         union_list = []
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_data_list);
    __pyx_v_data = __pyx_v_data_list;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1748
 *             data = data_list
 * 
 *         union_list = []             # <<<<<<<<<<<<<<
 *         for arg in data:
 *             union_list = list(set(union_list) | set(arg))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_union_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1749
 * 
 *         union_list = []
 *         for arg in data:             # <<<<<<<<<<<<<<
 *             union_list = list(set(union_list) | set(arg))
 *         return union_list
 */
  if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) {
    __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1749, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1749, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1749, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1749, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1749, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_7)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1749, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1750
 *         union_list = []
 *         for arg in data:
 *             union_list = list(set(union_list) | set(arg))             # <<<<<<<<<<<<<<
 *         return union_list
 * 
 */
    __pyx_t_7 = PySet_New(__pyx_v_union_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PySet_New(__pyx_v_arg); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyNumber_Or(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PySequence_List(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_union_list, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1749
 * 
 *         union_list = []
 *         for arg in data:             # <<<<<<<<<<<<<<
 *             union_list = list(set(union_list) | set(arg))
 *         return union_list
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1751
 *         for arg in data:
 *             union_list = list(set(union_list) | set(arg))
 *         return union_list             # <<<<<<<<<<<<<<
 * 
 *     def strategyCount(self, data: Union[Dict, None] = None, **kwargs) -> pd.DataFrame():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_union_list);
  __pyx_r = __pyx_v_union_list;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1727
 *         return intersection_list
 * 
 *     def listUnion(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.listUnion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_union_list);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1753
 *         return union_list
 * 
 *     def strategyCount(self, data: Union[Dict, None] = None, **kwargs) -> pd.DataFrame():             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_35strategyCount(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_34strategyCount, "\n        \345\244\232\344\270\252list\357\274\214\347\273\237\350\256\241\351\242\221\346\254\241\n        use example:\n        list1 = ['1', '2', '3']\n        list2 = ['2', '3', '4', '5']\n        list3 = ['2', '5', '7', '10']\n        df = strategyCount(a=list1, b=list2, c=list3)\n        temp = {'a': list1, 'b': list2, 'c': list3}\n        df = strategyCount(temp)\n        print(df)\n        :param kwargs:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_35strategyCount = {"strategyCount", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_35strategyCount, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_34strategyCount};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_35strategyCount(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strategyCount (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1753, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1753, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "strategyCount") < 0)) __PYX_ERR(0, 1753, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("strategyCount", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1753, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.strategyCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_34strategyCount(__pyx_self, __pyx_v_self, __pyx_v_data, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_kwargs);
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_34strategyCount(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_all_list = NULL;
  PyObject *__pyx_v_strategy_name = NULL;
  PyObject *__pyx_v_strategy_code_list = NULL;
  PyObject *__pyx_v_count = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_list_2_dict = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  unsigned int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strategyCount", 0);
  __Pyx_INCREF(__pyx_v_data);

  /* "tbstock/tradeStrategy/stockStrategy.py":1767
 *         :return:
 *         '''
 *         if data is None:             # <<<<<<<<<<<<<<
 *             data = kwargs
 *         elif not isinstance(data, dict):
 */
  __pyx_t_1 = (__pyx_v_data == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1768
 *         '''
 *         if data is None:
 *             data = kwargs             # <<<<<<<<<<<<<<
 *         elif not isinstance(data, dict):
 *             raise ValueError("data must be a dictionary")
 */
    __Pyx_INCREF(__pyx_v_kwargs);
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_v_kwargs);

    /* "tbstock/tradeStrategy/stockStrategy.py":1767
 *         :return:
 *         '''
 *         if data is None:             # <<<<<<<<<<<<<<
 *             data = kwargs
 *         elif not isinstance(data, dict):
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1769
 *         if data is None:
 *             data = kwargs
 *         elif not isinstance(data, dict):             # <<<<<<<<<<<<<<
 *             raise ValueError("data must be a dictionary")
 * 
 */
  __pyx_t_1 = PyDict_Check(__pyx_v_data); 
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1770
 *             data = kwargs
 *         elif not isinstance(data, dict):
 *             raise ValueError("data must be a dictionary")             # <<<<<<<<<<<<<<
 * 
 *         all_list = []
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1770, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":1769
 *         if data is None:
 *             data = kwargs
 *         elif not isinstance(data, dict):             # <<<<<<<<<<<<<<
 *             raise ValueError("data must be a dictionary")
 * 
 */
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1772
 *             raise ValueError("data must be a dictionary")
 * 
 *         all_list = []             # <<<<<<<<<<<<<<
 *         for strategy_name, strategy_code_list in data.items():
 *             all_list = all_list + strategy_code_list
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_all_list = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1773
 * 
 *         all_list = []
 *         for strategy_name, strategy_code_list in data.items():             # <<<<<<<<<<<<<<
 *             all_list = all_list + strategy_code_list
 * 
 */
  __pyx_t_4 = 0;
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 1773, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_data, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_7;
  __pyx_t_7 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_strategy_name, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_strategy_code_list, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1774
 *         all_list = []
 *         for strategy_name, strategy_code_list in data.items():
 *             all_list = all_list + strategy_code_list             # <<<<<<<<<<<<<<
 * 
 *         count = Counter(all_list)
 */
    __pyx_t_8 = PyNumber_Add(__pyx_v_all_list, __pyx_v_strategy_code_list); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_all_list, __pyx_t_8);
    __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1776
 *             all_list = all_list + strategy_code_list
 * 
 *         count = Counter(all_list)             # <<<<<<<<<<<<<<
 *         df = pd.DataFrame(index=list(count.keys()))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Counter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_all_list};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_v_count = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1777
 * 
 *         count = Counter(all_list)
 *         df = pd.DataFrame(index=list(count.keys()))             # <<<<<<<<<<<<<<
 * 
 *         for strategy_name, strategy_code_list in data.items():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_count, __pyx_n_s_keys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, __pyx_t_11) < 0) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_df = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1779
 *         df = pd.DataFrame(index=list(count.keys()))
 * 
 *         for strategy_name, strategy_code_list in data.items():             # <<<<<<<<<<<<<<
 *             list_2_dict = {key: 1 for key in strategy_code_list}
 *             df[strategy_name] = df.index.map(list_2_dict)
 */
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 1779, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_data, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __pyx_t_11 = __pyx_t_3;
  __pyx_t_3 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_11, __pyx_t_4, &__pyx_t_5, &__pyx_t_3, &__pyx_t_8, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF_SET(__pyx_v_strategy_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_strategy_code_list, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1780
 * 
 *         for strategy_name, strategy_code_list in data.items():
 *             list_2_dict = {key: 1 for key in strategy_code_list}             # <<<<<<<<<<<<<<
 *             df[strategy_name] = df.index.map(list_2_dict)
 *         df['sum'] = df.index.map(count)
 */
    { /* enter inner scope */
      __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1780, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (likely(PyList_CheckExact(__pyx_v_strategy_code_list)) || PyTuple_CheckExact(__pyx_v_strategy_code_list)) {
        __pyx_t_3 = __pyx_v_strategy_code_list; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_strategy_code_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1780, __pyx_L10_error)
      }
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1780, __pyx_L10_error)
              #endif
              if (__pyx_t_13 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 1780, __pyx_L10_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1780, __pyx_L10_error)
              #endif
              if (__pyx_t_13 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(0, 1780, __pyx_L10_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_14(__pyx_t_3);
          if (unlikely(!__pyx_t_7)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1780, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_key, __pyx_t_7);
        __pyx_t_7 = 0;
        if (unlikely(PyDict_SetItem(__pyx_t_8, (PyObject*)__pyx_8genexpr7__pyx_v_key, (PyObject*)__pyx_int_1))) __PYX_ERR(0, 1780, __pyx_L10_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key); __pyx_8genexpr7__pyx_v_key = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key); __pyx_8genexpr7__pyx_v_key = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_list_2_dict, ((PyObject*)__pyx_t_8));
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1781
 *         for strategy_name, strategy_code_list in data.items():
 *             list_2_dict = {key: 1 for key in strategy_code_list}
 *             df[strategy_name] = df.index.map(list_2_dict)             # <<<<<<<<<<<<<<
 *         df['sum'] = df.index.map(count)
 *         df.fillna(0, inplace=True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_map); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_list_2_dict};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_v_strategy_name, __pyx_t_8) < 0))) __PYX_ERR(0, 1781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1782
 *             list_2_dict = {key: 1 for key in strategy_code_list}
 *             df[strategy_name] = df.index.map(list_2_dict)
 *         df['sum'] = df.index.map(count)             # <<<<<<<<<<<<<<
 *         df.fillna(0, inplace=True)
 *         df.sort_values('sum', ascending=False, inplace=True)
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_map); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_count};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df, __pyx_n_s_sum, __pyx_t_11) < 0))) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1783
 *             df[strategy_name] = df.index.map(list_2_dict)
 *         df['sum'] = df.index.map(count)
 *         df.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 *         df.sort_values('sum', ascending=False, inplace=True)
 *         return df
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_fillna); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1783, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__98, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1784
 *         df['sum'] = df.index.map(count)
 *         df.fillna(0, inplace=True)
 *         df.sort_values('sum', ascending=False, inplace=True)             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 1784, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1784, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__99, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1785
 *         df.fillna(0, inplace=True)
 *         df.sort_values('sum', ascending=False, inplace=True)
 *         return df             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_df);
  __pyx_r = __pyx_v_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1753
 *         return union_list
 * 
 *     def strategyCount(self, data: Union[Dict, None] = None, **kwargs) -> pd.DataFrame():             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.baseStrategy.strategyCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_all_list);
  __Pyx_XDECREF(__pyx_v_strategy_name);
  __Pyx_XDECREF(__pyx_v_strategy_code_list);
  __Pyx_XDECREF(__pyx_v_count);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_list_2_dict);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1803
 *     """
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1803, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1803, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1803, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1804
 * 
 *     def __init__(self, save_json=False):
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         print("fundamentalStockStrategy.__init__")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fundamentalStockStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 1804, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 1804, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1805
 *     def __init__(self, save_json=False):
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1803
 *     """
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_3selectByMarketCap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_2selectByMarketCap, "\n         \346\240\271\346\215\256\350\202\241\347\245\250\345\275\223\345\211\215\346\265\201\351\200\232\345\270\202\345\200\274\351\200\211\350\202\241\n        :param cal_min_th: \346\265\201\351\200\232\345\270\202\345\200\274\346\234\200\345\260\217\345\200\274\357\274\214\344\272\277\345\205\203\n        :param cal_max_th: \346\265\201\351\200\232\345\270\202\345\200\274\346\234\200\345\244\247\345\200\274\357\274\214\344\272\277\345\205\203\n        :param use_st_stock:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_3selectByMarketCap = {"selectByMarketCap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_3selectByMarketCap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_2selectByMarketCap};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_3selectByMarketCap(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_cal_min_th = 0;
  PyObject *__pyx_v_cal_max_th = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByMarketCap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_cal_min_th,&__pyx_n_s_cal_max_th,&__pyx_n_s_use_st_stock,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1807, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cal_min_th);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1807, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cal_max_th);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1807, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1807, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByMarketCap") < 0)) __PYX_ERR(0, 1807, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_cal_min_th = values[1];
    __pyx_v_cal_max_th = values[2];
    __pyx_v_use_st_stock = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByMarketCap", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1807, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarketCap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_2selectByMarketCap(__pyx_self, __pyx_v_self, __pyx_v_cal_min_th, __pyx_v_cal_max_th, __pyx_v_use_st_stock);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1840
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['market_cap'] / 10 ** 8
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]
 *         select_market_cap_df.sort_values(by='market_cap', ascending=False, ignore_index=True, inplace=True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByMarketCap_lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByMarketCap_lambda = {"lambda", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByMarketCap_lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByMarketCap_lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1840, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda") < 0)) __PYX_ERR(0, 1840, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1840, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarketCap.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1840, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarketCap.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_2selectByMarketCap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cal_min_th, PyObject *__pyx_v_cal_max_th, PyObject *__pyx_v_use_st_stock) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *__pyx_cur_scope;
  PyObject *__pyx_v_select_market_cap_stock_list = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_trade_day_df = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_select_market_cap_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByMarketCap", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1807, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_INCREF(__pyx_v_cal_min_th);
  __Pyx_INCREF(__pyx_v_cal_max_th);
  __Pyx_INCREF(__pyx_v_use_st_stock);

  /* "tbstock/tradeStrategy/stockStrategy.py":1815
 *         :return:
 *         '''
 *         if cal_min_th == None:             # <<<<<<<<<<<<<<
 *             cal_min_th = 0
 *         if cal_max_th == None:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_cal_min_th, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1816
 *         '''
 *         if cal_min_th == None:
 *             cal_min_th = 0             # <<<<<<<<<<<<<<
 *         if cal_max_th == None:
 *             cal_max_th = utils.positive_infinity
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_cal_min_th, __pyx_int_0);

    /* "tbstock/tradeStrategy/stockStrategy.py":1815
 *         :return:
 *         '''
 *         if cal_min_th == None:             # <<<<<<<<<<<<<<
 *             cal_min_th = 0
 *         if cal_max_th == None:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1817
 *         if cal_min_th == None:
 *             cal_min_th = 0
 *         if cal_max_th == None:             # <<<<<<<<<<<<<<
 *             cal_max_th = utils.positive_infinity
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_cal_max_th, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1818
 *             cal_min_th = 0
 *         if cal_max_th == None:
 *             cal_max_th = utils.positive_infinity             # <<<<<<<<<<<<<<
 * 
 *         select_market_cap_stock_list = []
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_cal_max_th, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1817
 *         if cal_min_th == None:
 *             cal_min_th = 0
 *         if cal_max_th == None:             # <<<<<<<<<<<<<<
 *             cal_max_th = utils.positive_infinity
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1820
 *             cal_max_th = utils.positive_infinity
 * 
 *         select_market_cap_stock_list = []             # <<<<<<<<<<<<<<
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_select_market_cap_stock_list = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1821
 * 
 *         select_market_cap_stock_list = []
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 * 
 */
  __pyx_t_2 = (__pyx_v_use_st_stock == Py_None);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1822
 *         select_market_cap_stock_list = []
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_st_stock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_use_st_stock, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1821
 * 
 *         select_market_cap_stock_list = []
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1825
 * 
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #             # <<<<<<<<<<<<<<
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_kp_s__23, __pyx_t_1, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1825, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1825, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_stock_trade_day_df = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1826
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_cap_stock_list
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1826, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_2);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1827
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")             # <<<<<<<<<<<<<<
 *             return select_market_cap_stock_list
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_10 += 51;
    __Pyx_GIVEREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_10 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1828
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_cap_stock_list             # <<<<<<<<<<<<<<
 * 
 *         # ST +
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyList_CheckExact(__pyx_v_select_market_cap_stock_list)) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_select_market_cap_stock_list))) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_INCREF(__pyx_v_select_market_cap_stock_list);
    __pyx_r = ((PyObject*)__pyx_v_select_market_cap_stock_list);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1826
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_cap_stock_list
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1831
 * 
 *         # ST +
 *         exclude_codes = self.suspended_stock_list             # <<<<<<<<<<<<<<
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_exclude_codes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1832
 *         # ST +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1832, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_9);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1833
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1833, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1833, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1832
 *         # ST +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1834
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isin); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_exclude_codes};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Invert(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_trade_day_df, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1837
 * 
 *         #
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['close'] * stock_trade_day_df['outstand_share']             # <<<<<<<<<<<<<<
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['market_cap'] / 10 ** 8
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_outstand_share); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_market_cap, __pyx_t_1) < 0))) __PYX_ERR(0, 1837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1838
 *         #
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['close'] * stock_trade_day_df['outstand_share']
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['market_cap'] / 10 ** 8             # <<<<<<<<<<<<<<
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_market_cap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_1, __pyx_int_100000000, 0x5f5e100, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_market_cap, __pyx_t_5) < 0))) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1839
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['close'] * stock_trade_day_df['outstand_share']
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['market_cap'] / 10 ** 8
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]             # <<<<<<<<<<<<<<
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_market_cap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_v_cal_max_th, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_market_cap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_cal_min_th, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_trade_day_df, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1840
 *         stock_trade_day_df['market_cap'] = stock_trade_day_df['market_cap'] / 10 ** 8
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]
 *         select_market_cap_df.sort_values(by='market_cap', ascending=False, ignore_index=True, inplace=True)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_apply); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByMarketCap_lambda, 0, __pyx_n_s_fundamentalStockStrategy_selectB, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1840, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_name, __pyx_t_4) < 0))) __PYX_ERR(0, 1840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1841
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['market_cap'] < cal_max_th) & (stock_trade_day_df['market_cap'] > cal_min_th)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]             # <<<<<<<<<<<<<<
 *         select_market_cap_df.sort_values(by='market_cap', ascending=False, ignore_index=True, inplace=True)
 *         select_market_cap_stock_list = select_market_cap_df['code'].tolist()
 */
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1841, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_code)) __PYX_ERR(0, 1841, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_name)) __PYX_ERR(0, 1841, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_market_cap);
  __Pyx_GIVEREF(__pyx_n_s_market_cap);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_market_cap)) __PYX_ERR(0, 1841, __pyx_L1_error);
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_select_market_cap_df = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1842
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]
 *         select_market_cap_df.sort_values(by='market_cap', ascending=False, ignore_index=True, inplace=True)             # <<<<<<<<<<<<<<
 *         select_market_cap_stock_list = select_market_cap_df['code'].tolist()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_select_market_cap_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_by, __pyx_n_s_market_cap) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1843
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'market_cap']]
 *         select_market_cap_df.sort_values(by='market_cap', ascending=False, ignore_index=True, inplace=True)
 *         select_market_cap_stock_list = select_market_cap_df['code'].tolist()             # <<<<<<<<<<<<<<
 * 
 *         return select_market_cap_stock_list
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_select_market_cap_df, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tolist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_select_market_cap_stock_list, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1845
 *         select_market_cap_stock_list = select_market_cap_df['code'].tolist()
 * 
 *         return select_market_cap_stock_list             # <<<<<<<<<<<<<<
 * 
 *     def selectByKeyProduct(self, product_name) -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyList_CheckExact(__pyx_v_select_market_cap_stock_list))||((__pyx_v_select_market_cap_stock_list) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_select_market_cap_stock_list))) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_select_market_cap_stock_list);
  __pyx_r = ((PyObject*)__pyx_v_select_market_cap_stock_list);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarketCap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_select_market_cap_stock_list);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_trade_day_df);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_select_market_cap_df);
  __Pyx_XDECREF(__pyx_v_cal_min_th);
  __Pyx_XDECREF(__pyx_v_cal_max_th);
  __Pyx_XDECREF(__pyx_v_use_st_stock);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1847
 *         return select_market_cap_stock_list
 * 
 *     def selectByKeyProduct(self, product_name) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_5selectByKeyProduct(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_4selectByKeyProduct, "\n        \346\240\271\346\215\256\344\270\273\350\220\245\344\272\247\345\223\201\351\200\211\350\202\241\n        :param product_name:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_5selectByKeyProduct = {"selectByKeyProduct", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_5selectByKeyProduct, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_4selectByKeyProduct};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_5selectByKeyProduct(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_product_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByKeyProduct (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_product_name,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1847, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_product_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1847, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("selectByKeyProduct", 1, 2, 2, 1); __PYX_ERR(0, 1847, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByKeyProduct") < 0)) __PYX_ERR(0, 1847, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_product_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByKeyProduct", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1847, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByKeyProduct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_4selectByKeyProduct(__pyx_self, __pyx_v_self, __pyx_v_product_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_4selectByKeyProduct(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_product_name) {
  PyObject *__pyx_v_res_names = NULL;
  PyObject *__pyx_v_stock_basic_info_df = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByKeyProduct", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1853
 *         :return:
 *         '''
 *         res_names = {}             # <<<<<<<<<<<<<<
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')
 *         for index, row in stock_basic_info_df.iterrows():
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1854
 *         '''
 *         res_names = {}
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')             # <<<<<<<<<<<<<<
 *         for index, row in stock_basic_info_df.iterrows():
 *             if product_name in row['main_business'] or product_name in row['key_products']:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_basic_info};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_basic_info_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1855
 *         res_names = {}
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')
 *         for index, row in stock_basic_info_df.iterrows():             # <<<<<<<<<<<<<<
 *             if product_name in row['main_business'] or product_name in row['key_products']:
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_basic_info_df, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1855, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1855, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1855, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1855, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1855, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1856
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')
 *         for index, row in stock_basic_info_df.iterrows():
 *             if product_name in row['main_business'] or product_name in row['key_products']:             # <<<<<<<<<<<<<<
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}
 *         return res_names
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_main_business); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_product_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!__pyx_t_11) {
    } else {
      __pyx_t_10 = __pyx_t_11;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_key_products); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_product_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1856, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_t_11;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_10) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1857
 *         for index, row in stock_basic_info_df.iterrows():
 *             if product_name in row['main_business'] or product_name in row['key_products']:
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}             # <<<<<<<<<<<<<<
 *         return res_names
 * 
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_code, __pyx_t_7) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_main_business); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_main_business, __pyx_t_7) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_key_products); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_key_products, __pyx_t_7) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely((PyDict_SetItem(__pyx_v_res_names, __pyx_t_7, __pyx_t_1) < 0))) __PYX_ERR(0, 1857, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":1856
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')
 *         for index, row in stock_basic_info_df.iterrows():
 *             if product_name in row['main_business'] or product_name in row['key_products']:             # <<<<<<<<<<<<<<
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}
 *         return res_names
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1855
 *         res_names = {}
 *         stock_basic_info_df = self.dataproc.loadTable('stock_basic_info')
 *         for index, row in stock_basic_info_df.iterrows():             # <<<<<<<<<<<<<<
 *             if product_name in row['main_business'] or product_name in row['key_products']:
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1858
 *             if product_name in row['main_business'] or product_name in row['key_products']:
 *                 res_names[row['name']] = {'code': row['code'], 'main_business': row['main_business'], 'key_products': row['key_products']}
 *         return res_names             # <<<<<<<<<<<<<<
 * 
 *     def selectByNameWord(self, key_word) -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res_names);
  __pyx_r = __pyx_v_res_names;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1847
 *         return select_market_cap_stock_list
 * 
 *     def selectByKeyProduct(self, product_name) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByKeyProduct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res_names);
  __Pyx_XDECREF(__pyx_v_stock_basic_info_df);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1860
 *         return res_names
 * 
 *     def selectByNameWord(self, key_word) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_7selectByNameWord(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_6selectByNameWord, "\n        \346\240\271\346\215\256\350\202\241\347\245\250\345\220\215\347\247\260\351\200\211\350\202\241\n        :param key_words: \350\202\241\347\245\250\345\220\215\347\247\260\347\255\233\351\200\211\345\205\263\351\224\256\345\255\227\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_7selectByNameWord = {"selectByNameWord", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_7selectByNameWord, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_6selectByNameWord};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_7selectByNameWord(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key_word = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByNameWord (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key_word,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1860, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1860, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("selectByNameWord", 1, 2, 2, 1); __PYX_ERR(0, 1860, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByNameWord") < 0)) __PYX_ERR(0, 1860, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_key_word = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByNameWord", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1860, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByNameWord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_6selectByNameWord(__pyx_self, __pyx_v_self, __pyx_v_key_word);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_6selectByNameWord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_word) {
  PyObject *__pyx_v_res_names = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByNameWord", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1866
 *         :return:
 *         '''
 *         res_names = {}             # <<<<<<<<<<<<<<
 *         for index, row in self.stock_code_name.iterrows():
 *             if key_word in row['name']:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1867
 *         '''
 *         res_names = {}
 *         for index, row in self.stock_code_name.iterrows():             # <<<<<<<<<<<<<<
 *             if key_word in row['name']:
 *                 res_names[row['name']] = row['code']
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stock_code_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1867, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1867, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1867, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1867, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 1867, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1867, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1867, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1867, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1867, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1868
 *         res_names = {}
 *         for index, row in self.stock_code_name.iterrows():
 *             if key_word in row['name']:             # <<<<<<<<<<<<<<
 *                 res_names[row['name']] = row['code']
 *         return res_names
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_key_word, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1868, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_10) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1869
 *         for index, row in self.stock_code_name.iterrows():
 *             if key_word in row['name']:
 *                 res_names[row['name']] = row['code']             # <<<<<<<<<<<<<<
 *         return res_names
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (unlikely((PyDict_SetItem(__pyx_v_res_names, __pyx_t_7, __pyx_t_1) < 0))) __PYX_ERR(0, 1869, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":1868
 *         res_names = {}
 *         for index, row in self.stock_code_name.iterrows():
 *             if key_word in row['name']:             # <<<<<<<<<<<<<<
 *                 res_names[row['name']] = row['code']
 *         return res_names
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1867
 *         '''
 *         res_names = {}
 *         for index, row in self.stock_code_name.iterrows():             # <<<<<<<<<<<<<<
 *             if key_word in row['name']:
 *                 res_names[row['name']] = row['code']
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1870
 *             if key_word in row['name']:
 *                 res_names[row['name']] = row['code']
 *         return res_names             # <<<<<<<<<<<<<<
 * 
 *     def selectByArea(self, area_list=None) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res_names);
  __pyx_r = __pyx_v_res_names;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1860
 *         return res_names
 * 
 *     def selectByNameWord(self, key_word) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByNameWord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res_names);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1872
 *         return res_names
 * 
 *     def selectByArea(self, area_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_9selectByArea(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_8selectByArea, "\n        \346\240\271\346\215\256\345\234\260\345\237\237\351\200\211\350\202\241\n        :param area_list:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_9selectByArea = {"selectByArea", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_9selectByArea, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_8selectByArea};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_9selectByArea(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_area_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByArea (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_area_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1872, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_area_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1872, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByArea") < 0)) __PYX_ERR(0, 1872, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_area_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByArea", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1872, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByArea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_8selectByArea(__pyx_self, __pyx_v_self, __pyx_v_area_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_8selectByArea(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_area_list) {
  PyObject *__pyx_v_stock_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByArea", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1878
 *         :return:
 *         '''
 *         stock_list = self.dataproc.getAreaStockCodes(area_list)             # <<<<<<<<<<<<<<
 *         return stock_list
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getAreaStockCodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_area_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1879
 *         '''
 *         stock_list = self.dataproc.getAreaStockCodes(area_list)
 *         return stock_list             # <<<<<<<<<<<<<<
 * 
 *     def selectByIndustry(self, industry_list=None) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyList_CheckExact(__pyx_v_stock_list))||((__pyx_v_stock_list) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_stock_list))) __PYX_ERR(0, 1879, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_stock_list);
  __pyx_r = ((PyObject*)__pyx_v_stock_list);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1872
 *         return res_names
 * 
 *     def selectByArea(self, area_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByArea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1881
 *         return stock_list
 * 
 *     def selectByIndustry(self, industry_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_11selectByIndustry(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_10selectByIndustry, "\n        \346\240\271\346\215\256\350\241\214\344\270\232\351\200\211\350\202\241\n        :param industry_list:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_11selectByIndustry = {"selectByIndustry", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_11selectByIndustry, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_10selectByIndustry};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_11selectByIndustry(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_industry_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByIndustry (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_industry_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_industry_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByIndustry") < 0)) __PYX_ERR(0, 1881, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_industry_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByIndustry", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1881, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByIndustry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_10selectByIndustry(__pyx_self, __pyx_v_self, __pyx_v_industry_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_10selectByIndustry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_industry_list) {
  PyObject *__pyx_v_stock_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByIndustry", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1887
 *         :return:
 *         '''
 *         stock_list = self.dataproc.getIndustryStockCodes(industry_list)             # <<<<<<<<<<<<<<
 *         return stock_list
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getIndustryStockCodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_industry_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1888
 *         '''
 *         stock_list = self.dataproc.getIndustryStockCodes(industry_list)
 *         return stock_list             # <<<<<<<<<<<<<<
 * 
 *     def selectByConcept(self, concept_list=None) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyList_CheckExact(__pyx_v_stock_list))||((__pyx_v_stock_list) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_stock_list))) __PYX_ERR(0, 1888, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_stock_list);
  __pyx_r = ((PyObject*)__pyx_v_stock_list);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1881
 *         return stock_list
 * 
 *     def selectByIndustry(self, industry_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByIndustry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1890
 *         return stock_list
 * 
 *     def selectByConcept(self, concept_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_13selectByConcept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_12selectByConcept, "\n        \346\240\271\346\215\256\346\246\202\345\277\265\351\200\211\350\202\241\n        :param concept_list:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_13selectByConcept = {"selectByConcept", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_13selectByConcept, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_12selectByConcept};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_13selectByConcept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_concept_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByConcept (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_concept_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1890, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_concept_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1890, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByConcept") < 0)) __PYX_ERR(0, 1890, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_concept_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByConcept", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1890, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_12selectByConcept(__pyx_self, __pyx_v_self, __pyx_v_concept_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_12selectByConcept(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept_list) {
  PyObject *__pyx_v_stock_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByConcept", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":1896
 *         :return:
 *         '''
 *         stock_list = self.dataproc.getConceptStockCodes(concept_list)             # <<<<<<<<<<<<<<
 *         return stock_list
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getConceptStockCodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_concept_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1897
 *         '''
 *         stock_list = self.dataproc.getConceptStockCodes(concept_list)
 *         return stock_list             # <<<<<<<<<<<<<<
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyList_CheckExact(__pyx_v_stock_list))||((__pyx_v_stock_list) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_v_stock_list))) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_stock_list);
  __pyx_r = ((PyObject*)__pyx_v_stock_list);
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1890
 *         return stock_list
 * 
 *     def selectByConcept(self, concept_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_15selectByMarket(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket, "\n        market_type = [\346\262\252\346\267\261\344\270\273\346\235\277, \347\247\221\345\210\233\346\235\277, \345\210\233\344\270\232\346\235\277, \345\214\227\344\272\244\346\211\200]\n        :param market_type:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_15selectByMarket = {"selectByMarket", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_15selectByMarket, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_15selectByMarket(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_market_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByMarket (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_market_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1899, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_market_type);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1899, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByMarket") < 0)) __PYX_ERR(0, 1899, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_market_type = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByMarket", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1899, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_market_type), (&PyList_Type), 1, "market_type", 1))) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket(__pyx_self, __pyx_v_self, __pyx_v_market_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1922
 *                 select_str.append('8')
 * 
 *         def select_code(code):             # <<<<<<<<<<<<<<
 *             if code[0:2] in select_str or code[0] in select_str:
 *                 return True
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_1select_code(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_1select_code = {"select_code", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_1select_code, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_1select_code(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("select_code (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1922, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "select_code") < 0)) __PYX_ERR(0, 1922, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_code = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("select_code", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1922, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarket.select_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_select_code(__pyx_self, __pyx_v_code);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_select_code(PyObject *__pyx_self, PyObject *__pyx_v_code) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("select_code", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/tradeStrategy/stockStrategy.py":1923
 * 
 *         def select_code(code):
 *             if code[0:2] in select_str or code[0] in select_str:             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_code, 0, 2, NULL, NULL, &__pyx_slice__101, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_select_str)) { __Pyx_RaiseClosureNameError("select_str"); __PYX_ERR(0, 1923, __pyx_L1_error) }
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_cur_scope->__pyx_v_select_str, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_code, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_select_str)) { __Pyx_RaiseClosureNameError("select_str"); __PYX_ERR(0, 1923, __pyx_L1_error) }
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_cur_scope->__pyx_v_select_str, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1924
 *         def select_code(code):
 *             if code[0:2] in select_str or code[0] in select_str:
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1923
 * 
 *         def select_code(code):
 *             if code[0:2] in select_str or code[0] in select_str:             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1926
 *                 return True
 *             else:
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         data_simple_info_df = data_simple_info_df[data_simple_info_df['code'].apply(select_code)].reset_index(drop=True)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1922
 *                 select_str.append('8')
 * 
 *         def select_code(code):             # <<<<<<<<<<<<<<
 *             if code[0:2] in select_str or code[0] in select_str:
 *                 return True
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarket.select_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_market_type) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *__pyx_cur_scope;
  PyObject *__pyx_v_data_simple_info_df = NULL;
  PyObject *__pyx_v_market = NULL;
  PyObject *__pyx_v_select_code = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByMarket", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1899, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __Pyx_INCREF(__pyx_v_market_type);

  /* "tbstock/tradeStrategy/stockStrategy.py":1905
 *         :return:
 *         '''
 *         if market_type is None:             # <<<<<<<<<<<<<<
 *             market_type = ['', '']
 * 
 */
  __pyx_t_1 = (__pyx_v_market_type == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1906
 *         '''
 *         if market_type is None:
 *             market_type = ['', '']             # <<<<<<<<<<<<<<
 * 
 *         data_simple_info_df = self.dataproc.getStockSimpleInfo()
 */
    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_kp_s__102);
    __Pyx_GIVEREF(__pyx_kp_s__102);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__102)) __PYX_ERR(0, 1906, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__103);
    __Pyx_GIVEREF(__pyx_kp_s__103);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s__103)) __PYX_ERR(0, 1906, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_market_type, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1905
 *         :return:
 *         '''
 *         if market_type is None:             # <<<<<<<<<<<<<<
 *             market_type = ['', '']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1908
 *             market_type = ['', '']
 * 
 *         data_simple_info_df = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         select_str = []
 *         for market in market_type:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1908, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_data_simple_info_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1909
 * 
 *         data_simple_info_df = self.dataproc.getStockSimpleInfo()
 *         select_str = []             # <<<<<<<<<<<<<<
 *         for market in market_type:
 *             if market == '':
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_select_str = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1910
 *         data_simple_info_df = self.dataproc.getStockSimpleInfo()
 *         select_str = []
 *         for market in market_type:             # <<<<<<<<<<<<<<
 *             if market == '':
 *                 select_str.append('60')
 */
  if (unlikely(__pyx_v_market_type == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1910, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_market_type; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_6 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1910, __pyx_L1_error)
      #endif
      if (__pyx_t_6 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1910, __pyx_L1_error)
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_market, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1911
 *         select_str = []
 *         for market in market_type:
 *             if market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('60')
 *                 select_str.append('00')
 */
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_market, __pyx_kp_s__102, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1911, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1912
 *         for market in market_type:
 *             if market == '':
 *                 select_str.append('60')             # <<<<<<<<<<<<<<
 *                 select_str.append('00')
 *             elif market == '':
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_60_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1912, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1913
 *             if market == '':
 *                 select_str.append('60')
 *                 select_str.append('00')             # <<<<<<<<<<<<<<
 *             elif market == '':
 *                 select_str.append('68')
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_00); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1913, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1911
 *         select_str = []
 *         for market in market_type:
 *             if market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('60')
 *                 select_str.append('00')
 */
      goto __pyx_L6;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1914
 *                 select_str.append('60')
 *                 select_str.append('00')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('68')
 *             elif market == '':
 */
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_market, __pyx_kp_s__104, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1914, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1915
 *                 select_str.append('00')
 *             elif market == '':
 *                 select_str.append('68')             # <<<<<<<<<<<<<<
 *             elif market == '':
 *                 select_str.append('30')
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_68); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1915, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1914
 *                 select_str.append('60')
 *                 select_str.append('00')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('68')
 *             elif market == '':
 */
      goto __pyx_L6;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1916
 *             elif market == '':
 *                 select_str.append('68')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('30')
 *             elif market == '':
 */
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_market, __pyx_kp_s__103, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1916, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1917
 *                 select_str.append('68')
 *             elif market == '':
 *                 select_str.append('30')             # <<<<<<<<<<<<<<
 *             elif market == '':
 *                 select_str.append('4')
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_30); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1917, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1916
 *             elif market == '':
 *                 select_str.append('68')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('30')
 *             elif market == '':
 */
      goto __pyx_L6;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1918
 *             elif market == '':
 *                 select_str.append('30')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('4')
 *                 select_str.append('8')
 */
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_market, __pyx_kp_s__105, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1918, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1919
 *                 select_str.append('30')
 *             elif market == '':
 *                 select_str.append('4')             # <<<<<<<<<<<<<<
 *                 select_str.append('8')
 * 
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_4); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1919, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1920
 *             elif market == '':
 *                 select_str.append('4')
 *                 select_str.append('8')             # <<<<<<<<<<<<<<
 * 
 *         def select_code(code):
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_select_str, __pyx_kp_s_8); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1920, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":1918
 *             elif market == '':
 *                 select_str.append('30')
 *             elif market == '':             # <<<<<<<<<<<<<<
 *                 select_str.append('4')
 *                 select_str.append('8')
 */
    }
    __pyx_L6:;

    /* "tbstock/tradeStrategy/stockStrategy.py":1910
 *         data_simple_info_df = self.dataproc.getStockSimpleInfo()
 *         select_str = []
 *         for market in market_type:             # <<<<<<<<<<<<<<
 *             if market == '':
 *                 select_str.append('60')
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1922
 *                 select_str.append('8')
 * 
 *         def select_code(code):             # <<<<<<<<<<<<<<
 *             if code[0:2] in select_str or code[0] in select_str:
 *                 return True
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_14selectByMarket_1select_code, 0, __pyx_n_s_fundamentalStockStrategy_selectB_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_select_code = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1928
 *                 return False
 * 
 *         data_simple_info_df = data_simple_info_df[data_simple_info_df['code'].apply(select_code)].reset_index(drop=True)             # <<<<<<<<<<<<<<
 *         data_simple_info_df.drop(columns=['id', 'is_delist'], inplace=True)
 *         return data_simple_info_df['code'].tolist()
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_apply); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_select_code};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 1928, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1929
 * 
 *         data_simple_info_df = data_simple_info_df[data_simple_info_df['code'].apply(select_code)].reset_index(drop=True)
 *         data_simple_info_df.drop(columns=['id', 'is_delist'], inplace=True)             # <<<<<<<<<<<<<<
 *         return data_simple_info_df['code'].tolist()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_simple_info_df, __pyx_n_s_drop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_id);
  __Pyx_GIVEREF(__pyx_n_s_id);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_id)) __PYX_ERR(0, 1929, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_is_delist);
  __Pyx_GIVEREF(__pyx_n_s_is_delist);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_is_delist)) __PYX_ERR(0, 1929, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1929, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1930
 *         data_simple_info_df = data_simple_info_df[data_simple_info_df['code'].apply(select_code)].reset_index(drop=True)
 *         data_simple_info_df.drop(columns=['id', 'is_delist'], inplace=True)
 *         return data_simple_info_df['code'].tolist()             # <<<<<<<<<<<<<<
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 1930, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByMarket", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_simple_info_df);
  __Pyx_XDECREF(__pyx_v_market);
  __Pyx_XDECREF(__pyx_v_select_code);
  __Pyx_XDECREF(__pyx_v_market_type);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByStockPrice(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByStockPrice = {"selectByStockPrice", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByStockPrice, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByStockPrice(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_min_price = 0;
  PyObject *__pyx_v_max_price = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByStockPrice (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_min_price,&__pyx_n_s_max_price,&__pyx_n_s_use_st_stock,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_price);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_price);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByStockPrice") < 0)) __PYX_ERR(0, 1932, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_min_price = values[1];
    __pyx_v_max_price = values[2];
    __pyx_v_use_st_stock = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByStockPrice", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1932, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPrice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_16selectByStockPrice(__pyx_self, __pyx_v_self, __pyx_v_min_price, __pyx_v_max_price, __pyx_v_use_st_stock);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1956
 *         #
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['close'] < max_price) & (stock_trade_day_df['close'] > min_price)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]
 *         select_market_cap_df.sort_values(by='close', ascending=True, ignore_index=True, inplace=True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPrice_lambda1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPrice_lambda1 = {"lambda1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPrice_lambda1, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPrice_lambda1(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1956, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda1") < 0)) __PYX_ERR(0, 1956, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1956, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPrice.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1956, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPrice.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_16selectByStockPrice(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_min_price, PyObject *__pyx_v_max_price, PyObject *__pyx_v_use_st_stock) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *__pyx_cur_scope;
  PyObject *__pyx_v_select_market_list = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_trade_day_df = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_select_market_cap_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByStockPrice", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1932, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_INCREF(__pyx_v_min_price);
  __Pyx_INCREF(__pyx_v_max_price);
  __Pyx_INCREF(__pyx_v_use_st_stock);

  /* "tbstock/tradeStrategy/stockStrategy.py":1933
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):
 *         if min_price == None:             # <<<<<<<<<<<<<<
 *             min_price = 0
 *         if max_price == None:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_price, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1934
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):
 *         if min_price == None:
 *             min_price = 0             # <<<<<<<<<<<<<<
 *         if max_price == None:
 *             max_price = utils.positive_infinity
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_min_price, __pyx_int_0);

    /* "tbstock/tradeStrategy/stockStrategy.py":1933
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):
 *         if min_price == None:             # <<<<<<<<<<<<<<
 *             min_price = 0
 *         if max_price == None:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1935
 *         if min_price == None:
 *             min_price = 0
 *         if max_price == None:             # <<<<<<<<<<<<<<
 *             max_price = utils.positive_infinity
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_price, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1936
 *             min_price = 0
 *         if max_price == None:
 *             max_price = utils.positive_infinity             # <<<<<<<<<<<<<<
 * 
 *         select_market_list = []
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_max_price, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1935
 *         if min_price == None:
 *             min_price = 0
 *         if max_price == None:             # <<<<<<<<<<<<<<
 *             max_price = utils.positive_infinity
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1938
 *             max_price = utils.positive_infinity
 * 
 *         select_market_list = []             # <<<<<<<<<<<<<<
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_select_market_list = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1939
 * 
 *         select_market_list = []
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 * 
 */
  __pyx_t_2 = (__pyx_v_use_st_stock == Py_None);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1940
 *         select_market_list = []
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_st_stock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_use_st_stock, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1939
 * 
 *         select_market_list = []
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1943
 * 
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #             # <<<<<<<<<<<<<<
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_kp_s__23, __pyx_t_1, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1943, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_1); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1943, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1943, __pyx_L1_error)
    __pyx_L7_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_stock_trade_day_df = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1944
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_list
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1944, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_2);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1945
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")             # <<<<<<<<<<<<<<
 *             return select_market_list
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_10 += 51;
    __Pyx_GIVEREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_10 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1945, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1946
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_list             # <<<<<<<<<<<<<<
 * 
 *         # ST +
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_select_market_list);
    __pyx_r = __pyx_v_select_market_list;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1944
 *         #
 *         res, stock_trade_day_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', self.use_date, self.use_date)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {self.use_date} to {self.use_date}")
 *             return select_market_list
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1949
 * 
 *         # ST +
 *         exclude_codes = self.suspended_stock_list             # <<<<<<<<<<<<<<
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_exclude_codes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1950
 *         # ST +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1950, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_9);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1951
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1950
 *         # ST +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1952
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_trade_day_df = stock_trade_day_df[~stock_trade_day_df['code'].isin(exclude_codes)]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isin); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_exclude_codes};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Invert(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_trade_day_df, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1955
 * 
 *         #
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['close'] < max_price) & (stock_trade_day_df['close'] > min_price)]             # <<<<<<<<<<<<<<
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_max_price, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_min_price, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_And(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_trade_day_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1956
 *         #
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['close'] < max_price) & (stock_trade_day_df['close'] > min_price)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]
 *         select_market_cap_df.sort_values(by='close', ascending=True, ignore_index=True, inplace=True)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_apply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPrice_lambda1, 0, __pyx_n_s_fundamentalStockStrategy_selectB_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1956, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_n_s_name, __pyx_t_4) < 0))) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1957
 *         stock_trade_day_df = stock_trade_day_df[(stock_trade_day_df['close'] < max_price) & (stock_trade_day_df['close'] > min_price)]
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]             # <<<<<<<<<<<<<<
 *         select_market_cap_df.sort_values(by='close', ascending=True, ignore_index=True, inplace=True)
 *         select_market_list = select_market_cap_df['code'].tolist()
 */
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_date)) __PYX_ERR(0, 1957, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_code)) __PYX_ERR(0, 1957, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_name)) __PYX_ERR(0, 1957, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_close)) __PYX_ERR(0, 1957, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_trade_day_df, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_select_market_cap_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1958
 *         stock_trade_day_df['name'] = stock_trade_day_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]
 *         select_market_cap_df.sort_values(by='close', ascending=True, ignore_index=True, inplace=True)             # <<<<<<<<<<<<<<
 *         select_market_list = select_market_cap_df['code'].tolist()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_select_market_cap_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_by, __pyx_n_s_close) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ascending, Py_True) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1959
 *         select_market_cap_df = stock_trade_day_df[['date', 'code', 'name', 'close']]
 *         select_market_cap_df.sort_values(by='close', ascending=True, ignore_index=True, inplace=True)
 *         select_market_list = select_market_cap_df['code'].tolist()             # <<<<<<<<<<<<<<
 * 
 *         return select_market_list
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_select_market_cap_df, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tolist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_select_market_list, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1961
 *         select_market_list = select_market_cap_df['code'].tolist()
 * 
 *         return select_market_list             # <<<<<<<<<<<<<<
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_select_market_list);
  __pyx_r = __pyx_v_select_market_list;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPrice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_select_market_list);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_trade_day_df);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_select_market_cap_df);
  __Pyx_XDECREF(__pyx_v_min_price);
  __Pyx_XDECREF(__pyx_v_max_price);
  __Pyx_XDECREF(__pyx_v_use_st_stock);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":1963
 *         return select_market_list
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,             # <<<<<<<<<<<<<<
 *                                    input_codes=None):
 *         if use_st_stock is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_19selectByStockPriceQuantile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_19selectByStockPriceQuantile = {"selectByStockPriceQuantile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_19selectByStockPriceQuantile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_19selectByStockPriceQuantile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_day_len = 0;
  PyObject *__pyx_v_quantile_amplitude_tr = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByStockPriceQuantile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_day_len,&__pyx_n_s_quantile_amplitude_tr,&__pyx_n_s_use_st_stock,&__pyx_n_s_multi_type,&__pyx_n_s_workers,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_30)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_process)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));

    /* "tbstock/tradeStrategy/stockStrategy.py":1964
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,
 *                                    input_codes=None):             # <<<<<<<<<<<<<<
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock
 */
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_day_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quantile_amplitude_tr);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByStockPriceQuantile") < 0)) __PYX_ERR(0, 1963, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_day_len = values[1];
    __pyx_v_quantile_amplitude_tr = ((PyObject*)values[2]);
    __pyx_v_use_st_stock = values[3];
    __pyx_v_multi_type = values[4];
    __pyx_v_workers = values[5];
    __pyx_v_input_codes = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByStockPriceQuantile", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 1963, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quantile_amplitude_tr), (&PyDict_Type), 1, "quantile_amplitude_tr", 1))) __PYX_ERR(0, 1963, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPriceQuantile(__pyx_self, __pyx_v_self, __pyx_v_day_len, __pyx_v_quantile_amplitude_tr, __pyx_v_use_st_stock, __pyx_v_multi_type, __pyx_v_workers, __pyx_v_input_codes);

  /* "tbstock/tradeStrategy/stockStrategy.py":1963
 *         return select_market_list
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,             # <<<<<<<<<<<<<<
 *                                    input_codes=None):
 *         if use_st_stock is None:
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_18selectByStockPriceQuantile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_day_len, PyObject *__pyx_v_quantile_amplitude_tr, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_update_range_dict = NULL;
  PyObject *__pyx_v_stock_tmp = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_succeed = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_stock_tmp_code_list = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_code = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByStockPriceQuantile", 0);
  __Pyx_INCREF(__pyx_v_quantile_amplitude_tr);
  __Pyx_INCREF(__pyx_v_use_st_stock);

  /* "tbstock/tradeStrategy/stockStrategy.py":1965
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,
 *                                    input_codes=None):
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 *         if quantile_amplitude_tr is None:
 */
  __pyx_t_1 = (__pyx_v_use_st_stock == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1966
 *                                    input_codes=None):
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock             # <<<<<<<<<<<<<<
 *         if quantile_amplitude_tr is None:
 *             quantile_amplitude_tr = {'quantile_tr_min': 0.0, 'quantile_tr_max': 0.5, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.5}
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_st_stock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_use_st_stock, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1965
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,
 *                                    input_codes=None):
 *         if use_st_stock is None:             # <<<<<<<<<<<<<<
 *             use_st_stock = self.use_st_stock
 *         if quantile_amplitude_tr is None:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1967
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock
 *         if quantile_amplitude_tr is None:             # <<<<<<<<<<<<<<
 *             quantile_amplitude_tr = {'quantile_tr_min': 0.0, 'quantile_tr_max': 0.5, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.5}
 * 
 */
  __pyx_t_1 = (__pyx_v_quantile_amplitude_tr == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1968
 *             use_st_stock = self.use_st_stock
 *         if quantile_amplitude_tr is None:
 *             quantile_amplitude_tr = {'quantile_tr_min': 0.0, 'quantile_tr_max': 0.5, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.5}             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_quantile_tr_min, __pyx_float_0_0) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_quantile_tr_max, __pyx_float_0_5) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_amplitude_tr_min, __pyx_float_0_0) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_amplitude_tr_max, __pyx_float_0_5) < 0) __PYX_ERR(0, 1968, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_quantile_amplitude_tr, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1967
 *         if use_st_stock is None:
 *             use_st_stock = self.use_st_stock
 *         if quantile_amplitude_tr is None:             # <<<<<<<<<<<<<<
 *             quantile_amplitude_tr = {'quantile_tr_min': 0.0, 'quantile_tr_max': 0.5, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.5}
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1970
 *             quantile_amplitude_tr = {'quantile_tr_min': 0.0, 'quantile_tr_max': 0.5, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.5}
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getframe); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fun_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1971
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1974
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1974, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = (!__pyx_t_1);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1975
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             print('new end_date: ', end_date)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_3, __pyx_n_s_previous};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Y_m_d};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_end_date = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1976
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)             # <<<<<<<<<<<<<<
 *         else:
 *             end_date = self.use_date
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_kp_s_new_end_date);
    __Pyx_GIVEREF(__pyx_kp_s_new_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_new_end_date)) __PYX_ERR(0, 1976, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_end_date);
    __Pyx_GIVEREF(__pyx_v_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_end_date)) __PYX_ERR(0, 1976, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1974
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
    goto __pyx_L5;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1978
 *             print('new end_date: ', end_date)
 *         else:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')  # 60
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_end_date = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L5:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1979
 *         else:
 *             end_date = self.use_date
 *         start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_end_date, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_start_date = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1982
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_input_codes); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1982, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":1983
 *         #
 *         if input_codes:
 *             update_range = input_codes  #             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
    __Pyx_INCREF(__pyx_v_input_codes);
    __pyx_v_update_range = __pyx_v_input_codes;

    /* "tbstock/tradeStrategy/stockStrategy.py":1982
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
    goto __pyx_L6;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1986
 *         else:
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *             update_range = all_stock_simple_info['code'].to_list()
 * 
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_all_stock_simple_info = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1987
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *             update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 * 
 *             #  + ST +
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_update_range = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1990
 * 
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list             # <<<<<<<<<<<<<<
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_exclude_codes = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":1991
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1991, __pyx_L1_error)
    __pyx_t_1 = (!__pyx_t_7);
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":1992
 *             exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":1991
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":1993
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]             # <<<<<<<<<<<<<<
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1993, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
        __pyx_t_2 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1993, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1993, __pyx_L10_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1993, __pyx_L10_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1993, __pyx_L10_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1993, __pyx_L10_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1993, __pyx_L10_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_10(__pyx_t_2);
          if (unlikely(!__pyx_t_6)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1993, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_x, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr8__pyx_v_x, __pyx_v_exclude_codes, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1993, __pyx_L10_error)
        if (__pyx_t_1) {
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_8genexpr8__pyx_v_x))) __PYX_ERR(0, 1993, __pyx_L10_error)
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "tbstock/tradeStrategy/stockStrategy.py":1995
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1995, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_2 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1995, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1995, __pyx_L18_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1995, __pyx_L18_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1995, __pyx_L18_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1995, __pyx_L18_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1995, __pyx_L18_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_10(__pyx_t_2);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1995, __pyx_L18_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_code, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1995, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_8genexpr9__pyx_v_code};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_8genexpr9__pyx_v_code, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1995, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_code); __pyx_8genexpr9__pyx_v_code = 0;
    goto __pyx_L22_exit_scope;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_code); __pyx_8genexpr9__pyx_v_code = 0;
    goto __pyx_L1_error;
    __pyx_L22_exit_scope:;
  } /* exit inner scope */
  __pyx_v_update_range_dict = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1998
 * 
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'price_quantile', 'price_amplitude'])             # <<<<<<<<<<<<<<
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_code)) __PYX_ERR(0, 1998, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_name)) __PYX_ERR(0, 1998, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_price_quantile);
  __Pyx_GIVEREF(__pyx_n_s_price_quantile);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_price_quantile)) __PYX_ERR(0, 1998, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_price_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_price_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_price_amplitude)) __PYX_ERR(0, 1998, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_columns, __pyx_t_6) < 0) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_stock_tmp = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1999
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'price_quantile', 'price_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 */
  __pyx_t_6 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__108); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_v_multi_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_desc_name = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2000
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'price_quantile', 'price_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2000, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2001
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                 if succeed:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyDict_Items(__pyx_v_update_range_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6)) __PYX_ERR(0, 2001, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2001, __pyx_L1_error)
    __pyx_t_9 = PyDict_Size(__pyx_v_update_range_dict); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2001, __pyx_L1_error)
    __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_total, __pyx_t_8) < 0) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2001, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2001, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2001, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2001, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2001, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2001, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2001, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2001, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_10(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2001, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
        PyObject* sequence = __pyx_t_8;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2001, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2001, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L27_unpacking_done;
        __pyx_L26_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2001, __pyx_L1_error)
        __pyx_L27_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2002
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                 if succeed:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getSingleStockPriceQuantile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2002, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[7] = {__pyx_t_2, __pyx_v_stock_code, __pyx_v_day_len, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 6+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
        PyObject* sequence = __pyx_t_8;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2002, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2002, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L29_unpacking_done;
        __pyx_L28_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2002, __pyx_L1_error)
        __pyx_L29_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2003
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                 if succeed:             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2003, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2004
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                 if succeed:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely((__Pyx_SetItemInt(__pyx_t_8, __pyx_t_12, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2004, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2003
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                 if succeed:             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2001
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                 if succeed:
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2000
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'price_quantile', 'price_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 succeed, new_record = self.getSingleStockPriceQuantile(stock_code, day_len, stock_name, start_date, end_date, multi_type)
 */
    goto __pyx_L23;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2005
 *                 if succeed:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2005, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2006
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2006, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2006, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2006, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2006, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2007
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 */
            __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2007, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_v_futures = ((PyObject*)__pyx_t_6);
            __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2008
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = 0;
            __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_12), (&__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF(__pyx_t_6);
            __pyx_t_6 = __pyx_t_2;
            __pyx_t_2 = 0;
            while (1) {
              __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_12, &__pyx_t_9, &__pyx_t_2, &__pyx_t_8, NULL, __pyx_t_17);
              if (unlikely(__pyx_t_18 == 0)) break;
              if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 2008, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
              __pyx_t_2 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2009
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2009, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getSingleStockPriceQuantile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_3 = NULL;
              __pyx_t_5 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_5 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_t_4, __pyx_v_stock_code, __pyx_v_day_len, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2009, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2010
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 */
              __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 2010, __pyx_L36_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2011
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_futures};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2011, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_8);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8)) __PYX_ERR(0, 2011, __pyx_L36_error);
            __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_8);
            if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2011, __pyx_L36_error)
            __pyx_t_12 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2011, __pyx_L36_error)
            __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_total, __pyx_t_4) < 0) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L36_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
              __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8);
              __pyx_t_12 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2011, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2011, __pyx_L36_error)
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_8))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2011, __pyx_L36_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 2011, __pyx_L36_error)
                  #else
                  __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L36_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2011, __pyx_L36_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 2011, __pyx_L36_error)
                  #else
                  __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L36_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  #endif
                }
              } else {
                __pyx_t_4 = __pyx_t_10(__pyx_t_8);
                if (unlikely(!__pyx_t_4)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2011, __pyx_L36_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_4);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2012
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_6 = NULL;
              __pyx_t_5 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_6)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_6);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_5 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2012, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
                PyObject* sequence = __pyx_t_4;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2012, __pyx_L36_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_6);
                #else
                __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2012, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_6);
                #endif
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2012, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
                index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L46_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_2);
                index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L46_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_6);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2012, __pyx_L36_error)
                __pyx_t_11 = NULL;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L47_unpacking_done;
                __pyx_L46_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_11 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2012, __pyx_L36_error)
                __pyx_L47_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_2);
              __pyx_t_2 = 0;
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2013
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 *                     if succeed:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 */
              __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2013, __pyx_L36_error)
              if (__pyx_t_1) {

                /* "tbstock/tradeStrategy/stockStrategy.py":2014
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2014, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_9 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2014, __pyx_L36_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely((__Pyx_SetItemInt(__pyx_t_4, __pyx_t_9, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2014, __pyx_L36_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2013
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 *                     if succeed:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 */
              }

              /* "tbstock/tradeStrategy/stockStrategy.py":2011
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 */
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2006
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L41_try_end;
          __pyx_L36_error:;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 2006, __pyx_L38_except_error)
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_4);
            __Pyx_XGOTREF(__pyx_t_6);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2006, __pyx_L38_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2006, __pyx_L38_except_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_20);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            if (__pyx_t_1 < 0) __PYX_ERR(0, 2006, __pyx_L38_except_error)
            __pyx_t_7 = (!__pyx_t_1);
            if (unlikely(__pyx_t_7)) {
              __Pyx_GIVEREF(__pyx_t_8);
              __Pyx_GIVEREF(__pyx_t_4);
              __Pyx_XGIVEREF(__pyx_t_6);
              __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_4, __pyx_t_6);
              __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0; 
              __PYX_ERR(0, 2006, __pyx_L38_except_error)
            }
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L37_exception_handled;
          }
          __pyx_L38_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L37_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L41_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2006, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L35;
        }
        __pyx_L35:;
      }
      goto __pyx_L53;
      __pyx_L32_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L53:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2005
 *                 if succeed:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L23;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2015
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2015, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2016
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2016, __pyx_L1_error)
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_8, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2016, __pyx_L54_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2016, __pyx_L54_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_6;
            __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2017
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 */
            __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2017, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_v_futures = ((PyObject*)__pyx_t_6);
            __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2018
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_12 = 0;
            __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_17)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2018, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_6);
            __pyx_t_6 = __pyx_t_8;
            __pyx_t_8 = 0;
            while (1) {
              __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_9, &__pyx_t_12, &__pyx_t_8, &__pyx_t_4, NULL, __pyx_t_17);
              if (unlikely(__pyx_t_18 == 0)) break;
              if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 2018, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_8);
              __pyx_t_8 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2019
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2019, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getSingleStockPriceQuantile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = NULL;
              __pyx_t_5 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                  __pyx_t_5 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_t_2, __pyx_v_stock_code, __pyx_v_day_len, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 7+__pyx_t_5);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_4);
              __pyx_t_4 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2020
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 */
              __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 2020, __pyx_L58_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2021
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_2 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_8))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_8, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            }
            __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_4);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L58_error);
            __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2021, __pyx_L58_error)
            __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2021, __pyx_L58_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L58_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4);
              __pyx_t_9 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2021, __pyx_L58_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_4))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2021, __pyx_L58_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2021, __pyx_L58_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L58_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2021, __pyx_L58_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2021, __pyx_L58_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L58_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_4);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2021, __pyx_L58_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2022
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2022, __pyx_L58_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_6 = NULL;
              __pyx_t_5 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_8))) {
                __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
                if (likely(__pyx_t_6)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                  __Pyx_INCREF(__pyx_t_6);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_8, function);
                  __pyx_t_5 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2022, __pyx_L58_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(__pyx_t_6);
                #else
                __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2022, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2022, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_6);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2022, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
                index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_8)) goto __pyx_L68_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_8);
                index = 1; __pyx_t_6 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L68_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_6);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2022, __pyx_L58_error)
                __pyx_t_11 = NULL;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L69_unpacking_done;
                __pyx_L68_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_11 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2022, __pyx_L58_error)
                __pyx_L69_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_8);
              __pyx_t_8 = 0;
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2023
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 *                     if succeed:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 */
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2023, __pyx_L58_error)
              if (__pyx_t_7) {

                /* "tbstock/tradeStrategy/stockStrategy.py":2024
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2024, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2024, __pyx_L58_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_12 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2024, __pyx_L58_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely((__Pyx_SetItemInt(__pyx_t_2, __pyx_t_12, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2024, __pyx_L58_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2023
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     succeed, new_record = future.result()  #
 *                     if succeed:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 */
              }

              /* "tbstock/tradeStrategy/stockStrategy.py":2021
 *                     future = executor.submit(self.getSingleStockPriceQuantile, stock_code, day_len, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     succeed, new_record = future.result()  #
 *                     if succeed:
 */
            }
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2016
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L63_try_end;
          __pyx_L58_error:;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_6) < 0) __PYX_ERR(0, 2016, __pyx_L60_except_error)
            __Pyx_XGOTREF(__pyx_t_4);
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_6);
            __pyx_t_8 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2016, __pyx_L60_except_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_8, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2016, __pyx_L60_except_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_20);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            if (__pyx_t_7 < 0) __PYX_ERR(0, 2016, __pyx_L60_except_error)
            __pyx_t_1 = (!__pyx_t_7);
            if (unlikely(__pyx_t_1)) {
              __Pyx_GIVEREF(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_XGIVEREF(__pyx_t_6);
              __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_2, __pyx_t_6);
              __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0; 
              __PYX_ERR(0, 2016, __pyx_L60_except_error)
            }
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L59_exception_handled;
          }
          __pyx_L60_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L59_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          __pyx_L63_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2016, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L57;
        }
        __pyx_L57:;
      }
      goto __pyx_L75;
      __pyx_L54_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L75:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2015
 *                     if succeed:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L23:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2026
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)             # <<<<<<<<<<<<<<
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_set_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_keys, __pyx_n_s_name) < 0) __PYX_ERR(0, 2026, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2026, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2027
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (             # <<<<<<<<<<<<<<
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_price_quantile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(__pyx_v_quantile_amplitude_tr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2027, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_quantile_amplitude_tr, __pyx_n_s_quantile_tr_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2028
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]             # <<<<<<<<<<<<<<
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (
 *                 stock_tmp['price_amplitude'] <= quantile_amplitude_tr['amplitude_tr_max'])]
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_price_quantile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(__pyx_v_quantile_amplitude_tr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2028, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_quantile_amplitude_tr, __pyx_n_s_quantile_tr_max); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2027
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (             # <<<<<<<<<<<<<<
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (
 */
  __pyx_t_4 = PyNumber_And(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_stock_tmp, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_tmp, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2029
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (             # <<<<<<<<<<<<<<
 *                 stock_tmp['price_amplitude'] <= quantile_amplitude_tr['amplitude_tr_max'])]
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_price_amplitude); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (unlikely(__pyx_v_quantile_amplitude_tr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2029, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_quantile_amplitude_tr, __pyx_n_s_amplitude_tr_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2030
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (
 *                 stock_tmp['price_amplitude'] <= quantile_amplitude_tr['amplitude_tr_max'])]             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp_code_list = stock_tmp['code'].to_list()
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_price_amplitude); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(__pyx_v_quantile_amplitude_tr == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2030, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_quantile_amplitude_tr, __pyx_n_s_amplitude_tr_max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2029
 *         stock_tmp = stock_tmp[(stock_tmp['price_quantile'] >= quantile_amplitude_tr['quantile_tr_min']) & (
 *                 stock_tmp['price_quantile'] <= quantile_amplitude_tr['quantile_tr_max'])]
 *         stock_tmp = stock_tmp[(stock_tmp['price_amplitude'] >= quantile_amplitude_tr['amplitude_tr_min']) & (             # <<<<<<<<<<<<<<
 *                 stock_tmp['price_amplitude'] <= quantile_amplitude_tr['amplitude_tr_max'])]
 * 
 */
  __pyx_t_8 = PyNumber_And(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_stock_tmp, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_tmp, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2032
 *                 stock_tmp['price_amplitude'] <= quantile_amplitude_tr['amplitude_tr_max'])]
 * 
 *         stock_tmp_code_list = stock_tmp['code'].to_list()             # <<<<<<<<<<<<<<
 *         return stock_tmp
 *         # return stock_tmp_code_list
 */
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_to_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_stock_tmp_code_list = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2033
 * 
 *         stock_tmp_code_list = stock_tmp['code'].to_list()
 *         return stock_tmp             # <<<<<<<<<<<<<<
 *         # return stock_tmp_code_list
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_tmp);
  __pyx_r = __pyx_v_stock_tmp;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1963
 *         return select_market_list
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,             # <<<<<<<<<<<<<<
 *                                    input_codes=None):
 *         if use_st_stock is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.selectByStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_update_range_dict);
  __Pyx_XDECREF(__pyx_v_stock_tmp);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_succeed);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_stock_tmp_code_list);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_quantile_amplitude_tr);
  __Pyx_XDECREF(__pyx_v_use_st_stock);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2036
 *         # return stock_tmp_code_list
 * 
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,             # <<<<<<<<<<<<<<
 *                                     multi_type='single'):
 *         if stock_name is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_21getSingleStockPriceQuantile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_21getSingleStockPriceQuantile = {"getSingleStockPriceQuantile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_21getSingleStockPriceQuantile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_21getSingleStockPriceQuantile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_day_len = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSingleStockPriceQuantile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_day_len,&__pyx_n_s_stock_name,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_multi_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleStockPriceQuantile", 0, 3, 7, 1); __PYX_ERR(0, 2036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_day_len)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleStockPriceQuantile", 0, 3, 7, 2); __PYX_ERR(0, 2036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getSingleStockPriceQuantile") < 0)) __PYX_ERR(0, 2036, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_day_len = values[2];
    __pyx_v_stock_name = ((PyObject*)values[3]);
    __pyx_v_start_date = ((PyObject*)values[4]);
    __pyx_v_end_date = ((PyObject*)values[5]);
    __pyx_v_multi_type = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getSingleStockPriceQuantile", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 2036, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.getSingleStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_name), (&PyString_Type), 1, "stock_name", 1))) __PYX_ERR(0, 2036, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start_date), (&PyString_Type), 1, "start_date", 1))) __PYX_ERR(0, 2036, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end_date), (&PyString_Type), 1, "end_date", 1))) __PYX_ERR(0, 2036, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_20getSingleStockPriceQuantile(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_day_len, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_20getSingleStockPriceQuantile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_day_len, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_engine = NULL;
  PyObject *__pyx_v_session = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_num_rows = NULL;
  PyObject *__pyx_v_max_price = NULL;
  PyObject *__pyx_v_min_price = NULL;
  PyObject *__pyx_v_now_price = NULL;
  PyObject *__pyx_v_price_quantile = NULL;
  PyObject *__pyx_v_price_amplitude = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getSingleStockPriceQuantile", 0);
  __Pyx_INCREF(__pyx_v_stock_name);
  __Pyx_INCREF(__pyx_v_start_date);
  __Pyx_INCREF(__pyx_v_end_date);

  /* "tbstock/tradeStrategy/stockStrategy.py":2038
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,
 *                                     multi_type='single'):
 *         if stock_name is None:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         if end_date is None:
 */
  __pyx_t_1 = (__pyx_v_stock_name == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2039
 *                                     multi_type='single'):
 *         if stock_name is None:
 *             stock_name = self.getStockNameByCode(stock_code)             # <<<<<<<<<<<<<<
 *         if end_date is None:
 *             end_date = self.use_date
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_stock_code};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2039, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_stock_name, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2038
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,
 *                                     multi_type='single'):
 *         if stock_name is None:             # <<<<<<<<<<<<<<
 *             stock_name = self.getStockNameByCode(stock_code)
 *         if end_date is None:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2040
 *         if stock_name is None:
 *             stock_name = self.getStockNameByCode(stock_code)
 *         if end_date is None:             # <<<<<<<<<<<<<<
 *             end_date = self.use_date
 *         if start_date is None:
 */
  __pyx_t_1 = (__pyx_v_end_date == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2041
 *             stock_name = self.getStockNameByCode(stock_code)
 *         if end_date is None:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         if start_date is None:
 *             start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2041, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_end_date, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2040
 *         if stock_name is None:
 *             stock_name = self.getStockNameByCode(stock_code)
 *         if end_date is None:             # <<<<<<<<<<<<<<
 *             end_date = self.use_date
 *         if start_date is None:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2042
 *         if end_date is None:
 *             end_date = self.use_date
 *         if start_date is None:             # <<<<<<<<<<<<<<
 *             start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')
 * 
 */
  __pyx_t_1 = (__pyx_v_start_date == ((PyObject*)Py_None));
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2043
 *             end_date = self.use_date
 *         if start_date is None:
 *             start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_end_date, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_start_date, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2042
 *         if end_date is None:
 *             end_date = self.use_date
 *         if start_date is None:             # <<<<<<<<<<<<<<
 *             start_date = utils.sh_calendar.session_offset(end_date, -(day_len - 1)).strftime('%Y%m%d')
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2046
 * 
 *         #
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2046, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2047
 *         #
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()             # <<<<<<<<<<<<<<
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2047, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2047, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2047, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __pyx_v_engine = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_session = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2048
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)             # <<<<<<<<<<<<<<
 *             session.remove()
 *             engine.dispose()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2048, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_session};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 5+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2048, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2048, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2048, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2048, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_stock_data = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2049
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()             # <<<<<<<<<<<<<<
 *             engine.dispose()
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2049, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2050
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()
 *             engine.dispose()             # <<<<<<<<<<<<<<
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2046
 * 
 *         #
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 */
    goto __pyx_L6;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2052
 *             engine.dispose()
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)             # <<<<<<<<<<<<<<
 * 
 *         if not res:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2052, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2052, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2052, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2052, __pyx_L1_error)
      __pyx_L12_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_stock_data = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2054
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoFq.")
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2054, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_1);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2055
 * 
 *         if not res:
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoFq.")             # <<<<<<<<<<<<<<
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u__21);
    __pyx_t_10 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__21);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__21);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u_failed_to_getStockTradeDayInfoF);
    __pyx_t_10 += 34;
    __Pyx_GIVEREF(__pyx_kp_u_failed_to_getStockTradeDayInfoF);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u_failed_to_getStockTradeDayInfoF);
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2056
 *         if not res:
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoFq.")
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}             # <<<<<<<<<<<<<<
 * 
 *         # price_quantileprice_amplitude
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_price_quantile, __pyx_int_0) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_price_amplitude, __pyx_int_0) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(0, 2056, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2056, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2054
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoFq.")
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2059
 * 
 *         # price_quantileprice_amplitude
 *         num_rows = stock_data.shape[0]             # <<<<<<<<<<<<<<
 *         if num_rows < int(day_len * 0.8):
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_num_rows = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2060
 *         # price_quantileprice_amplitude
 *         num_rows = stock_data.shape[0]
 *         if num_rows < int(day_len * 0.8):             # <<<<<<<<<<<<<<
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 * 
 */
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_day_len, __pyx_float_0_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_num_rows, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2061
 *         num_rows = stock_data.shape[0]
 *         if num_rows < int(day_len * 0.8):
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}             # <<<<<<<<<<<<<<
 * 
 *         stock_data = stock_data.sort_values(by='date', ascending=False, ignore_index=True)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 2061, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2061, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_price_quantile, __pyx_int_0) < 0) __PYX_ERR(0, 2061, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_price_amplitude, __pyx_int_0) < 0) __PYX_ERR(0, 2061, __pyx_L1_error)
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(0, 2061, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 2061, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2060
 *         # price_quantileprice_amplitude
 *         num_rows = stock_data.shape[0]
 *         if num_rows < int(day_len * 0.8):             # <<<<<<<<<<<<<<
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2063
 *             return False, {'code': stock_code, 'name': stock_name, 'price_quantile': 0, 'price_amplitude': 0}
 * 
 *         stock_data = stock_data.sort_values(by='date', ascending=False, ignore_index=True)             # <<<<<<<<<<<<<<
 *         max_price = stock_data['close'].max()
 *         min_price = stock_data['close'].min()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_by, __pyx_n_s_date) < 0) __PYX_ERR(0, 2063, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 2063, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 2063, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_data, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2064
 * 
 *         stock_data = stock_data.sort_values(by='date', ascending=False, ignore_index=True)
 *         max_price = stock_data['close'].max()             # <<<<<<<<<<<<<<
 *         min_price = stock_data['close'].min()
 *         now_price = stock_data.loc[0, 'close']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_max_price = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2065
 *         stock_data = stock_data.sort_values(by='date', ascending=False, ignore_index=True)
 *         max_price = stock_data['close'].max()
 *         min_price = stock_data['close'].min()             # <<<<<<<<<<<<<<
 *         now_price = stock_data.loc[0, 'close']
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_min_price = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2066
 *         max_price = stock_data['close'].max()
 *         min_price = stock_data['close'].min()
 *         now_price = stock_data.loc[0, 'close']             # <<<<<<<<<<<<<<
 * 
 *         price_quantile = (now_price - min_price) / (max_price - min_price)
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_loc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_tuple__110); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_now_price = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2068
 *         now_price = stock_data.loc[0, 'close']
 * 
 *         price_quantile = (now_price - min_price) / (max_price - min_price)             # <<<<<<<<<<<<<<
 *         price_amplitude = (max_price - min_price) / min_price
 * 
 */
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_now_price, __pyx_v_min_price); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = PyNumber_Subtract(__pyx_v_max_price, __pyx_v_min_price); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_price_quantile = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2069
 * 
 *         price_quantile = (now_price - min_price) / (max_price - min_price)
 *         price_amplitude = (max_price - min_price) / min_price             # <<<<<<<<<<<<<<
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'price_quantile': price_quantile,
 */
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_max_price, __pyx_v_min_price); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_v_min_price); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_price_amplitude = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2071
 *         price_amplitude = (max_price - min_price) / min_price
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'price_quantile': price_quantile,             # <<<<<<<<<<<<<<
 *                       'price_amplitude': price_amplitude}
 *         return True, new_record
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2071, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_price_quantile, __pyx_v_price_quantile) < 0) __PYX_ERR(0, 2071, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2072
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'price_quantile': price_quantile,
 *                       'price_amplitude': price_amplitude}             # <<<<<<<<<<<<<<
 *         return True, new_record
 * 
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_price_amplitude, __pyx_v_price_amplitude) < 0) __PYX_ERR(0, 2071, __pyx_L1_error)
  __pyx_v_new_record = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2073
 *         new_record = {'code': stock_code, 'name': stock_name, 'price_quantile': price_quantile,
 *                       'price_amplitude': price_amplitude}
 *         return True, new_record             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, Py_True)) __PYX_ERR(0, 2073, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_new_record);
  __Pyx_GIVEREF(__pyx_v_new_record);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_new_record)) __PYX_ERR(0, 2073, __pyx_L1_error);
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2036
 *         # return stock_tmp_code_list
 * 
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,             # <<<<<<<<<<<<<<
 *                                     multi_type='single'):
 *         if stock_name is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.fundamentalStockStrategy.getSingleStockPriceQuantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_engine);
  __Pyx_XDECREF(__pyx_v_session);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_num_rows);
  __Pyx_XDECREF(__pyx_v_max_price);
  __Pyx_XDECREF(__pyx_v_min_price);
  __Pyx_XDECREF(__pyx_v_now_price);
  __Pyx_XDECREF(__pyx_v_price_quantile);
  __Pyx_XDECREF(__pyx_v_price_amplitude);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2085
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2085, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2085, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2085, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2085, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2086
 * 
 *     def __init__(self, save_json=False):
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         self.checkDatabaseTableUpdate()
 *         print("technicalStockStrategy.__init__")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_technicalStockStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 2086, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 2086, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2087
 *     def __init__(self, save_json=False):
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()             # <<<<<<<<<<<<<<
 *         print("technicalStockStrategy.__init__")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkDatabaseTableUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2088
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 *         print("technicalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2085
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2090
 *         print("technicalStockStrategy.__init__")
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_3selectByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_3selectByTechIndicator = {"selectByTechIndicator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_3selectByTechIndicator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_3selectByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("selectByTechIndicator (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_300416)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2090, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2090, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "selectByTechIndicator") < 0)) __PYX_ERR(0, 2090, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("selectByTechIndicator", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2090, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.selectByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_2selectByTechIndicator(__pyx_self, __pyx_v_self, __pyx_v_stock_code);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_2selectByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code) {
  PyObject *__pyx_v_date_end = NULL;
  PyObject *__pyx_v_date_start = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_tech_ind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("selectByTechIndicator", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2091
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):
 *         date_end = self.use_date             # <<<<<<<<<<<<<<
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_date_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2092
 *     def selectByTechIndicator(self, stock_code='300416'):
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)
 *         if not res:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_date_end, __pyx_int_neg_59};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_date_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2093
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)             # <<<<<<<<<<<<<<
 *         if not res:
 *             return
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_stock_code);
  __Pyx_GIVEREF(__pyx_v_stock_code);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_stock_code)) __PYX_ERR(0, 2093, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_qfq);
  __Pyx_GIVEREF(__pyx_n_s_qfq);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_qfq)) __PYX_ERR(0, 2093, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_start, __pyx_v_date_start) < 0) __PYX_ERR(0, 2093, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_end, __pyx_v_date_end) < 0) __PYX_ERR(0, 2093, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2093, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2093, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2093, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_stock_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2094
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2094, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_7);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2095
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)
 *         if not res:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         tech_ind = stockTechInd(stock_data, True)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2094
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 *         res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=date_start, date_end=date_end)
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2097
 *             return
 * 
 *         tech_ind = stockTechInd(stock_data, True)             # <<<<<<<<<<<<<<
 *         # tech_ind.EMA(ma_column='amount', ma_time=[5, 10, 20, 30])
 *         # tech_ind.MACD()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_stockTechInd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_stock_data, Py_True};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_tech_ind = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2107
 *         # tech_ind.OBV()
 *         # tech_ind.CDL2CROWS()
 *         tech_ind.CDL3WHITESOLDIERS()             # <<<<<<<<<<<<<<
 * 
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tech_ind, __pyx_n_s_CDL3WHITESOLDIERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2090
 *         print("technicalStockStrategy.__init__")
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.selectByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_date_end);
  __Pyx_XDECREF(__pyx_v_date_start);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_tech_ind);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2109
 *         tech_ind.CDL3WHITESOLDIERS()
 * 
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if multi_type == 'process':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_5judgeSingleStockByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_5judgeSingleStockByTechIndicator = {"judgeSingleStockByTechIndicator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_5judgeSingleStockByTechIndicator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_5judgeSingleStockByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tech_name = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("judgeSingleStockByTechIndicator (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tech_name,&__pyx_n_s_stock_code,&__pyx_n_s_stock_name,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_multi_type,0};
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tech_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, 1); __PYX_ERR(0, 2109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, 2); __PYX_ERR(0, 2109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, 3); __PYX_ERR(0, 2109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, 4); __PYX_ERR(0, 2109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[5]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, 5); __PYX_ERR(0, 2109, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "judgeSingleStockByTechIndicator") < 0)) __PYX_ERR(0, 2109, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_tech_name = values[1];
    __pyx_v_stock_code = values[2];
    __pyx_v_stock_name = values[3];
    __pyx_v_start_date = values[4];
    __pyx_v_end_date = values[5];
    __pyx_v_multi_type = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("judgeSingleStockByTechIndicator", 0, 6, 7, __pyx_nargs); __PYX_ERR(0, 2109, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.judgeSingleStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_4judgeSingleStockByTechIndicator(__pyx_self, __pyx_v_self, __pyx_v_tech_name, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_4judgeSingleStockByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tech_name, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_engine = NULL;
  PyObject *__pyx_v_session = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_tech_ind = NULL;
  PyObject *__pyx_v_tech_ind_method = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_near_datetime = NULL;
  PyObject *__pyx_v_date_list = NULL;
  PyObject *__pyx_v_date_str = NULL;
  PyObject *__pyx_v_return_dict = NULL;
  PyObject *__pyx_9genexpr10__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("judgeSingleStockByTechIndicator", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2111
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):
 *         #
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2111, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2112
 *         #
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()             # <<<<<<<<<<<<<<
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)
 *             session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2112, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2112, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2112, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_session = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2113
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)             # <<<<<<<<<<<<<<
 *             session.remove()
 *             engine.dispose()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_stock_code);
    __Pyx_GIVEREF(__pyx_v_stock_code);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stock_code)) __PYX_ERR(0, 2113, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_qfq);
    __Pyx_GIVEREF(__pyx_n_s_qfq);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_qfq)) __PYX_ERR(0, 2113, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_date_start, __pyx_v_start_date) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_date_end, __pyx_v_end_date) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_session, __pyx_v_session) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2113, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2113, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2114
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)
 *             session.remove()             # <<<<<<<<<<<<<<
 *             engine.dispose()
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2115
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)
 *             session.remove()
 *             engine.dispose()             # <<<<<<<<<<<<<<
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2111
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):
 *         #
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date, session=session)
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2117
 *             engine.dispose()
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date)             # <<<<<<<<<<<<<<
 * 
 *         if not res:
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_stock_code);
    __Pyx_GIVEREF(__pyx_v_stock_code);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stock_code)) __PYX_ERR(0, 2117, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_qfq);
    __Pyx_GIVEREF(__pyx_n_s_qfq);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_qfq)) __PYX_ERR(0, 2117, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_date_start, __pyx_v_start_date) < 0) __PYX_ERR(0, 2117, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_date_end, __pyx_v_end_date) < 0) __PYX_ERR(0, 2117, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
      PyObject* sequence = __pyx_t_4;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2117, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2117, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2117, __pyx_L1_error)
      __pyx_L9_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2119
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2119, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_1);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2120
 * 
 *         if not res:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2119
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', date_start=start_date, date_end=end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2123
 * 
 *         #
 *         tech_ind = stockTechInd(stock_data, False)             # <<<<<<<<<<<<<<
 *         tech_ind_method = getattr(tech_ind, tech_name)
 *         df = tech_ind_method()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_stockTechInd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stock_data, Py_False};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_tech_ind = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2124
 *         #
 *         tech_ind = stockTechInd(stock_data, False)
 *         tech_ind_method = getattr(tech_ind, tech_name)             # <<<<<<<<<<<<<<
 *         df = tech_ind_method()
 * 
 */
  __pyx_t_4 = __Pyx_GetAttr(__pyx_v_tech_ind, __pyx_v_tech_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tech_ind_method = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2125
 *         tech_ind = stockTechInd(stock_data, False)
 *         tech_ind_method = getattr(tech_ind, tech_name)
 *         df = tech_ind_method()             # <<<<<<<<<<<<<<
 * 
 *         # # 5
 */
  __Pyx_INCREF(__pyx_v_tech_ind_method);
  __pyx_t_6 = __pyx_v_tech_ind_method; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2125, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_df = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2128
 * 
 *         # # 5
 *         near_datetime = utils.sh_calendar.session_offset(end_date, -5)             # <<<<<<<<<<<<<<
 *         near_datetime = pd.Timestamp(near_datetime)
 *         df = df[(df['date'] > near_datetime) & (df[tech_name] == 100)]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_end_date, __pyx_int_neg_5};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_near_datetime = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2129
 *         # # 5
 *         near_datetime = utils.sh_calendar.session_offset(end_date, -5)
 *         near_datetime = pd.Timestamp(near_datetime)             # <<<<<<<<<<<<<<
 *         df = df[(df['date'] > near_datetime) & (df[tech_name] == 100)]
 *         # df = df[df[tech_name] == 100]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pd); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_near_datetime};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_near_datetime, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2130
 *         near_datetime = utils.sh_calendar.session_offset(end_date, -5)
 *         near_datetime = pd.Timestamp(near_datetime)
 *         df = df[(df['date'] > near_datetime) & (df[tech_name] == 100)]             # <<<<<<<<<<<<<<
 *         # df = df[df[tech_name] == 100]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_near_datetime, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_v_tech_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_100, 0x64, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_And(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_df, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_df, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2134
 * 
 *         #
 *         if not df.empty:             # <<<<<<<<<<<<<<
 *             date_list = df['date'].to_list()
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = (!__pyx_t_8);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2135
 *         #
 *         if not df.empty:
 *             date_list = df['date'].to_list()             # <<<<<<<<<<<<<<
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]
 *             date_str = ','.join(date_list)
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_to_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_date_list = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2136
 *         if not df.empty:
 *             date_list = df['date'].to_list()
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]             # <<<<<<<<<<<<<<
 *             date_str = ','.join(date_list)
 *             return_dict = {'code': stock_code, 'name': stock_name, 'trigger_date': date_str}
 */
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2136, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (likely(PyList_CheckExact(__pyx_v_date_list)) || PyTuple_CheckExact(__pyx_v_date_list)) {
        __pyx_t_3 = __pyx_v_date_list; __Pyx_INCREF(__pyx_t_3);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_date_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2136, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2136, __pyx_L14_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2136, __pyx_L14_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2136, __pyx_L14_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2136, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2136, __pyx_L14_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2136, __pyx_L14_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2136, __pyx_L14_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_10(__pyx_t_3);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2136, __pyx_L14_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_x, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr10__pyx_v_x, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_kp_s_Y_m_d};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2136, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 2136, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x); __pyx_9genexpr10__pyx_v_x = 0;
      goto __pyx_L18_exit_scope;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x); __pyx_9genexpr10__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L18_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_date_list, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2137
 *             date_list = df['date'].to_list()
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]
 *             date_str = ','.join(date_list)             # <<<<<<<<<<<<<<
 *             return_dict = {'code': stock_code, 'name': stock_name, 'trigger_date': date_str}
 *             return True, return_dict
 */
    __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_v_date_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_date_str = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2138
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]
 *             date_str = ','.join(date_list)
 *             return_dict = {'code': stock_code, 'name': stock_name, 'trigger_date': date_str}             # <<<<<<<<<<<<<<
 *             return True, return_dict
 *         else:
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 2138, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2138, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_trigger_date, __pyx_v_date_str) < 0) __PYX_ERR(0, 2138, __pyx_L1_error)
    __pyx_v_return_dict = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2139
 *             date_str = ','.join(date_list)
 *             return_dict = {'code': stock_code, 'name': stock_name, 'trigger_date': date_str}
 *             return True, return_dict             # <<<<<<<<<<<<<<
 *         else:
 *             return False, {}
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_True)) __PYX_ERR(0, 2139, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_return_dict);
    __Pyx_GIVEREF(__pyx_v_return_dict);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_return_dict)) __PYX_ERR(0, 2139, __pyx_L1_error);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2134
 * 
 *         #
 *         if not df.empty:             # <<<<<<<<<<<<<<
 *             date_list = df['date'].to_list()
 *             date_list = [x.strftime('%Y%m%d') for x in date_list]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2141
 *             return True, return_dict
 *         else:
 *             return False, {}             # <<<<<<<<<<<<<<
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(0, 2141, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(0, 2141, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2109
 *         tech_ind.CDL3WHITESOLDIERS()
 * 
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if multi_type == 'process':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.judgeSingleStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_engine);
  __Pyx_XDECREF(__pyx_v_session);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_tech_ind);
  __Pyx_XDECREF(__pyx_v_tech_ind_method);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_near_datetime);
  __Pyx_XDECREF(__pyx_v_date_list);
  __Pyx_XDECREF(__pyx_v_date_str);
  __Pyx_XDECREF(__pyx_v_return_dict);
  __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2143
 *             return False, {}
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                                 input_codes: list = None):
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_7getStockByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_7getStockByTechIndicator = {"getStockByTechIndicator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_7getStockByTechIndicator, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_7getStockByTechIndicator(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_tech_name = 0;
  PyObject *__pyx_v_trade_day_len = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockByTechIndicator (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_tech_name,&__pyx_n_s_trade_day_len,&__pyx_n_s_use_st_stock,&__pyx_n_s_save_file,&__pyx_n_s_multi_type,&__pyx_n_s_workers,&__pyx_n_s_input_codes,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_60)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_thread)));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));

    /* "tbstock/tradeStrategy/stockStrategy.py":2144
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,
 *                                 input_codes: list = None):             # <<<<<<<<<<<<<<
 * 
 *         strategy_key_name = tech_name
 */
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tech_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getStockByTechIndicator", 0, 2, 8, 1); __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trade_day_len);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockByTechIndicator") < 0)) __PYX_ERR(0, 2143, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_tech_name = values[1];
    __pyx_v_trade_day_len = values[2];
    __pyx_v_use_st_stock = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_multi_type = values[5];
    __pyx_v_workers = values[6];
    __pyx_v_input_codes = ((PyObject*)values[7]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockByTechIndicator", 0, 2, 8, __pyx_nargs); __PYX_ERR(0, 2143, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.getStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 2144, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_6getStockByTechIndicator(__pyx_self, __pyx_v_self, __pyx_v_tech_name, __pyx_v_trade_day_len, __pyx_v_use_st_stock, __pyx_v_save_file, __pyx_v_multi_type, __pyx_v_workers, __pyx_v_input_codes);

  /* "tbstock/tradeStrategy/stockStrategy.py":2143
 *             return False, {}
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                                 input_codes: list = None):
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_6getStockByTechIndicator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tech_name, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_update_range_dict = NULL;
  PyObject *__pyx_v_stock_tmp = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_stock_tmp_dict = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_code = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockByTechIndicator", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2146
 *                                 input_codes: list = None):
 * 
 *         strategy_key_name = tech_name             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_v_tech_name);
  __pyx_v_strategy_key_name = __pyx_v_tech_name;

  /* "tbstock/tradeStrategy/stockStrategy.py":2149
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 2149, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2150
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2150, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2150, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2151
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2151, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2152
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2153
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2151
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2150
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2156
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2156, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2157
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2157, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2158
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_2 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2159
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2157
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2156
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2161
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}: {tech_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2162
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}: {tech_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_10 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_2 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Beginning);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__108);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__108);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__108);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_tech_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2165
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (!__pyx_t_4);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2166
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             print('new end_date: ', end_date)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_1, __pyx_n_s_previous};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_kp_s_Y_m_d};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_end_date = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2167
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)             # <<<<<<<<<<<<<<
 *         else:
 *             end_date = self.use_date
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_kp_s_new_end_date);
    __Pyx_GIVEREF(__pyx_kp_s_new_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_new_end_date)) __PYX_ERR(0, 2167, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_end_date);
    __Pyx_GIVEREF(__pyx_v_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_end_date)) __PYX_ERR(0, 2167, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2165
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
    goto __pyx_L14;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2169
 *             print('new end_date: ', end_date)
 *         else:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_end_date = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L14:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2170
 *         else:
 *             end_date = self.use_date
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_trade_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_end_date, __pyx_t_8};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_start_date = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2173
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
  __pyx_t_7 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2174
 *         #
 *         if input_codes:
 *             update_range = input_codes  #             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
    __Pyx_INCREF(__pyx_v_input_codes);
    __pyx_v_update_range = __pyx_v_input_codes;

    /* "tbstock/tradeStrategy/stockStrategy.py":2173
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
    goto __pyx_L15;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2177
 *         else:
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *             update_range = all_stock_simple_info['code'].to_list()
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_all_stock_simple_info = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2178
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *             update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 * 
 *             #  + ST +
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_list); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_11))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_11, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
    __pyx_v_update_range = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2181
 * 
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list             # <<<<<<<<<<<<<<
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = PyNumber_Add(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_exclude_codes = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2182
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2182, __pyx_L1_error)
    __pyx_t_4 = (!__pyx_t_7);
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2183
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2182
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2184
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]             # <<<<<<<<<<<<<<
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2184, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
        __pyx_t_6 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_2 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2184, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2184, __pyx_L19_error)
      }
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2184, __pyx_L19_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2184, __pyx_L19_error)
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2184, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2184, __pyx_L19_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2184, __pyx_L19_error)
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2184, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_13(__pyx_t_6);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2184, __pyx_L19_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_x, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr11__pyx_v_x, __pyx_v_exclude_codes, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2184, __pyx_L19_error)
        if (__pyx_t_4) {
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr11__pyx_v_x))) __PYX_ERR(0, 2184, __pyx_L19_error)
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
      goto __pyx_L24_exit_scope;
      __pyx_L19_error:;
      __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L24_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L15:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2186
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2186, __pyx_L27_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_6 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2186, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2186, __pyx_L27_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2186, __pyx_L27_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2186, __pyx_L27_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2186, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2186, __pyx_L27_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2186, __pyx_L27_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2186, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_13(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2186, __pyx_L27_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_code, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2186, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_9genexpr12__pyx_v_code};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2186, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_9genexpr12__pyx_v_code, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 2186, __pyx_L27_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_code); __pyx_9genexpr12__pyx_v_code = 0;
    goto __pyx_L31_exit_scope;
    __pyx_L27_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_code); __pyx_9genexpr12__pyx_v_code = 0;
    goto __pyx_L1_error;
    __pyx_L31_exit_scope:;
  } /* exit inner scope */
  __pyx_v_update_range_dict = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2189
 * 
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'trigger_date'])             # <<<<<<<<<<<<<<
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type
 *         if multi_type == 'single':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_code)) __PYX_ERR(0, 2189, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_name)) __PYX_ERR(0, 2189, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_trigger_date);
  __Pyx_GIVEREF(__pyx_n_s_trigger_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_n_s_trigger_date)) __PYX_ERR(0, 2189, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_t_8) < 0) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_stock_tmp = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2190
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'trigger_date'])
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 */
  __pyx_t_8 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_v_tech_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__108); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_v_multi_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_desc_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2191
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'trigger_date'])
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2191, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2192
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 *                 if hit:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_update_range_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2192, __pyx_L1_error)
    __pyx_t_2 = PyDict_Size(__pyx_v_update_range_dict); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2192, __pyx_L1_error)
    __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_total, __pyx_t_11) < 0) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
      __pyx_t_8 = __pyx_t_11; __Pyx_INCREF(__pyx_t_8);
      __pyx_t_2 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2192, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2192, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_11); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2192, __pyx_L1_error)
          #else
          __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2192, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2192, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_11); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2192, __pyx_L1_error)
          #else
          __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2192, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        }
      } else {
        __pyx_t_11 = __pyx_t_13(__pyx_t_8);
        if (unlikely(!__pyx_t_11)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2192, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_11);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
        PyObject* sequence = __pyx_t_11;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2192, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2192, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2192, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
        index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L35_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L35_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 2192, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L36_unpacking_done;
        __pyx_L35_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2192, __pyx_L1_error)
        __pyx_L36_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2193
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                 if hit:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_judgeSingleStockByTechIndicator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[7] = {__pyx_t_6, __pyx_v_tech_name, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 6+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
        PyObject* sequence = __pyx_t_11;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2193, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
        index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L37_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L37_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 2193, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L38_unpacking_done;
        __pyx_L37_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2193, __pyx_L1_error)
        __pyx_L38_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2194
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 *                 if hit:             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 */
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_hit); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2194, __pyx_L1_error)
      if (__pyx_t_4) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2195
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 *                 if hit:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2195, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely((__Pyx_SetItemInt(__pyx_t_11, __pyx_t_9, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2195, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2194
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 *                 if hit:             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2192
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 *                 if hit:
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2191
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'trigger_date'])
 *         desc_name = fun_name + '-' + tech_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 hit, new_record = self.judgeSingleStockByTechIndicator(tech_name, stock_code, stock_name, start_date, end_date, multi_type)
 */
    goto __pyx_L32;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2196
 *                 if hit:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2196, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2197
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2197, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2197, __pyx_L41_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2197, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __pyx_t_11;
      __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_8;
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2198
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 */
            __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2198, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_v_futures = ((PyObject*)__pyx_t_8);
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2199
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)
 */
            __pyx_t_2 = 0;
            __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_19)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2199, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_8);
            __pyx_t_8 = __pyx_t_6;
            __pyx_t_6 = 0;
            while (1) {
              __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_9, &__pyx_t_2, &__pyx_t_6, &__pyx_t_11, NULL, __pyx_t_19);
              if (unlikely(__pyx_t_20 == 0)) break;
              if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 2199, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_6);
              __pyx_t_6 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_11);
              __pyx_t_11 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2200
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,             # <<<<<<<<<<<<<<
 *                                              multi_type)
 *                     futures.append(future)
 */
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2200, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_judgeSingleStockByTechIndicator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2200, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_3);

              /* "tbstock/tradeStrategy/stockStrategy.py":2201
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_1 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_6))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_6, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[8] = {__pyx_t_1, __pyx_t_3, __pyx_v_tech_name, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 7+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2200, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_11);
              __pyx_t_11 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2202
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 */
              __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 2202, __pyx_L45_error)
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2203
 *                                              multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     hit, new_record = future.result()  #
 *                     if hit:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_3 = NULL;
            __pyx_t_12 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
                __pyx_t_12 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_futures};
              __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2203, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            }
            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_11);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11)) __PYX_ERR(0, 2203, __pyx_L45_error);
            __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_11);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2203, __pyx_L45_error)
            __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2203, __pyx_L45_error)
            __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_total, __pyx_t_3) < 0) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2203, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11);
              __pyx_t_9 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_9 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2203, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2203, __pyx_L45_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_11))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2203, __pyx_L45_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2203, __pyx_L45_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2203, __pyx_L45_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2203, __pyx_L45_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2203, __pyx_L45_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2203, __pyx_L45_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_13(__pyx_t_11);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2203, __pyx_L45_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2204
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L45_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_8 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_6))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_6, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2204, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                PyObject* sequence = __pyx_t_3;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2204, __pyx_L45_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_8);
                #else
                __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2204, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2204, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
                index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L55_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_6);
                index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_8)) goto __pyx_L55_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_8);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 2204, __pyx_L45_error)
                __pyx_t_14 = NULL;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                goto __pyx_L56_unpacking_done;
                __pyx_L55_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_14 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2204, __pyx_L45_error)
                __pyx_L56_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_6);
              __pyx_t_6 = 0;
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2205
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 *                     if hit:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 */
              __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_hit); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2205, __pyx_L45_error)
              if (__pyx_t_4) {

                /* "tbstock/tradeStrategy/stockStrategy.py":2206
 *                     hit, new_record = future.result()  #
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2206, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2206, __pyx_L45_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_2 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2206, __pyx_L45_error)
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely((__Pyx_SetItemInt(__pyx_t_3, __pyx_t_2, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2206, __pyx_L45_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2205
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 *                     if hit:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 */
              }

              /* "tbstock/tradeStrategy/stockStrategy.py":2203
 *                                              multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     hit, new_record = future.result()  #
 *                     if hit:
 */
            }
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2197
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L50_try_end;
          __pyx_L45_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.getStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(0, 2197, __pyx_L47_except_error)
            __Pyx_XGOTREF(__pyx_t_11);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_8);
            __pyx_t_6 = PyTuple_Pack(3, __pyx_t_11, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2197, __pyx_L47_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2197, __pyx_L47_except_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            if (__pyx_t_4 < 0) __PYX_ERR(0, 2197, __pyx_L47_except_error)
            __pyx_t_7 = (!__pyx_t_4);
            if (unlikely(__pyx_t_7)) {
              __Pyx_GIVEREF(__pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_3, __pyx_t_8);
              __pyx_t_11 = 0; __pyx_t_3 = 0; __pyx_t_8 = 0; 
              __PYX_ERR(0, 2197, __pyx_L47_except_error)
            }
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L46_exception_handled;
          }
          __pyx_L47_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          goto __pyx_L1_error;
          __pyx_L46_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_L50_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_15) {
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2197, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          goto __pyx_L44;
        }
        __pyx_L44:;
      }
      goto __pyx_L62;
      __pyx_L41_error:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L1_error;
      __pyx_L62:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2196
 *                 if hit:
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L32;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2207
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2207, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2208
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2208, __pyx_L1_error)
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_11, __pyx_n_s_enter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2208, __pyx_L63_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __pyx_L63_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_8;
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2209
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 */
            __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2209, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_v_futures = ((PyObject*)__pyx_t_8);
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2210
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)
 */
            __pyx_t_9 = 0;
            __pyx_t_11 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_19)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2210, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_8);
            __pyx_t_8 = __pyx_t_11;
            __pyx_t_11 = 0;
            while (1) {
              __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_2, &__pyx_t_9, &__pyx_t_11, &__pyx_t_3, NULL, __pyx_t_19);
              if (unlikely(__pyx_t_20 == 0)) break;
              if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 2210, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_11);
              __pyx_t_11 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2211
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,             # <<<<<<<<<<<<<<
 *                                              multi_type)
 *                     futures.append(future)
 */
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2211, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_judgeSingleStockByTechIndicator); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2211, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_6);

              /* "tbstock/tradeStrategy/stockStrategy.py":2212
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_1 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_11))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_11, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[8] = {__pyx_t_1, __pyx_t_6, __pyx_v_tech_name, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 7+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2213
 *                     future = executor.submit(self.judgeSingleStockByTechIndicator, tech_name, stock_code, stock_name, start_date, end_date,
 *                                              multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 */
              __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 2213, __pyx_L67_error)
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2214
 *                                              multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     hit, new_record = future.result()  #
 *                     if hit:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_6 = NULL;
            __pyx_t_12 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_12 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L67_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2214, __pyx_L67_error)
            __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2214, __pyx_L67_error)
            __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_6) < 0) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2214, __pyx_L67_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
              __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_2 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2214, __pyx_L67_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2214, __pyx_L67_error)
                    #endif
                    if (__pyx_t_2 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2214, __pyx_L67_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2214, __pyx_L67_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2214, __pyx_L67_error)
                    #endif
                    if (__pyx_t_2 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2214, __pyx_L67_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2214, __pyx_L67_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                }
              } else {
                __pyx_t_6 = __pyx_t_13(__pyx_t_3);
                if (unlikely(!__pyx_t_6)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2214, __pyx_L67_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_6);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2215
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2215, __pyx_L67_error)
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_8 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_11))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_11, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
                __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2215, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
                PyObject* sequence = __pyx_t_6;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2215, __pyx_L67_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_8);
                #else
                __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2215, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2215, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_8);
                #endif
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2215, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
                index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L77_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_11);
                index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_8)) goto __pyx_L77_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_8);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 2215, __pyx_L67_error)
                __pyx_t_14 = NULL;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                goto __pyx_L78_unpacking_done;
                __pyx_L77_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_14 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2215, __pyx_L67_error)
                __pyx_L78_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_hit, __pyx_t_11);
              __pyx_t_11 = 0;
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2216
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 *                     if hit:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 */
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_hit); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2216, __pyx_L67_error)
              if (__pyx_t_7) {

                /* "tbstock/tradeStrategy/stockStrategy.py":2217
 *                     hit, new_record = future.result()  #
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 */
                __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_6);
                __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2217, __pyx_L67_error)
                __Pyx_GOTREF(__pyx_t_8);
                __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2217, __pyx_L67_error)
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely((__Pyx_SetItemInt(__pyx_t_6, __pyx_t_9, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2217, __pyx_L67_error)
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2216
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     hit, new_record = future.result()  #
 *                     if hit:             # <<<<<<<<<<<<<<
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 */
              }

              /* "tbstock/tradeStrategy/stockStrategy.py":2214
 *                                              multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     hit, new_record = future.result()  #
 *                     if hit:
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2208
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L72_try_end;
          __pyx_L67_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.getStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 2208, __pyx_L69_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_8);
            __pyx_t_11 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2208, __pyx_L69_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_11, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2208, __pyx_L69_except_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            if (__pyx_t_7 < 0) __PYX_ERR(0, 2208, __pyx_L69_except_error)
            __pyx_t_4 = (!__pyx_t_7);
            if (unlikely(__pyx_t_4)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_6, __pyx_t_8);
              __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_8 = 0; 
              __PYX_ERR(0, 2208, __pyx_L69_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L68_exception_handled;
          }
          __pyx_L69_except_error:;
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L68_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __pyx_L72_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_15) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2208, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L66;
        }
        __pyx_L66:;
      }
      goto __pyx_L84;
      __pyx_L63_error:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L1_error;
      __pyx_L84:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2207
 *                     if hit:
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L32:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2219
 *                         stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)             # <<<<<<<<<<<<<<
 *         stock_tmp_dict = stock_tmp.to_dict()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_set_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_keys, __pyx_n_s_name) < 0) __PYX_ERR(0, 2219, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2219, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2220
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         stock_tmp_dict = stock_tmp.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_stock_tmp_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2223
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_tmp_dict['day_len'] = trade_day_len
 *             stock_tmp_dict['updated'] = True
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2223, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2224
 *         # json
 *         if save_file:
 *             stock_tmp_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_tmp_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2224, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2225
 *         if save_file:
 *             stock_tmp_dict['day_len'] = trade_day_len
 *             stock_tmp_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_tmp_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2225, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2226
 *             stock_tmp_dict['day_len'] = trade_day_len
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_strategy_key_name, __pyx_v_stock_tmp_dict) < 0))) __PYX_ERR(0, 2226, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2227
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *         return stock_tmp
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2223
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_tmp_dict['day_len'] = trade_day_len
 *             stock_tmp_dict['updated'] = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2229
 *             self.dumpJsonToFile()
 * 
 *         return stock_tmp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_tmp);
  __pyx_r = __pyx_v_stock_tmp;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2143
 *             return False, {}
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                                 input_codes: list = None):
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.technicalStockStrategy.getStockByTechIndicator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_update_range_dict);
  __Pyx_XDECREF(__pyx_v_stock_tmp);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_stock_tmp_dict);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2243
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2243, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2243, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2244
 * 
 *     def __init__(self, save_json=False):
 *         super(financialStockStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         self.checkDatabaseTableUpdate()
 *         print("financialStockStrategy.__init__")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_financialStockStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 2244, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 2244, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2245
 *     def __init__(self, save_json=False):
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()             # <<<<<<<<<<<<<<
 *         print("financialStockStrategy.__init__")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkDatabaseTableUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2246
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 *         print("financialStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2243
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2248
 *         print("financialStockStrategy.__init__")
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_3getStockMultiFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_3getStockMultiFinancialData = {"getStockMultiFinancialData", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_3getStockMultiFinancialData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_3getStockMultiFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_financial_mode = 0;
  PyObject *__pyx_v_filter_dict = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockMultiFinancialData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_financial_mode,&__pyx_n_s_filter_dict,&__pyx_n_s_use_st_stock,&__pyx_n_s_save_file,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_quarter)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_financial_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_dict);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockMultiFinancialData") < 0)) __PYX_ERR(0, 2248, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_financial_mode = values[1];
    __pyx_v_filter_dict = values[2];
    __pyx_v_use_st_stock = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_input_codes = ((PyObject*)values[5]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockMultiFinancialData", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 2248, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.getStockMultiFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 2248, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_2getStockMultiFinancialData(__pyx_self, __pyx_v_self, __pyx_v_financial_mode, __pyx_v_filter_dict, __pyx_v_use_st_stock, __pyx_v_save_file, __pyx_v_input_codes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_2getStockMultiFinancialData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_financial_mode, PyObject *__pyx_v_filter_dict, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_query_stock_df_dict = NULL;
  PyObject *__pyx_v_query_date = NULL;
  PyObject *__pyx_v_filter_dict_item = NULL;
  PyObject *__pyx_v_query_date_str = NULL;
  PyObject *__pyx_v_stock_query_df = NULL;
  PyObject *__pyx_v_date_str = NULL;
  PyObject *__pyx_v_merged_df = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockMultiFinancialData", 0);
  __Pyx_INCREF(__pyx_v_filter_dict);

  /* "tbstock/tradeStrategy/stockStrategy.py":2249
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:             # <<<<<<<<<<<<<<
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 */
  __pyx_t_1 = (__pyx_v_filter_dict == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2250
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],             # <<<<<<<<<<<<<<
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_datetime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_datetime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(0, 2250, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_report_date, __pyx_t_7) < 0) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2251
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],             # <<<<<<<<<<<<<<
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         elif not isinstance(filter_dict['report_date'], list):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_float_100_0);
    __Pyx_GIVEREF(__pyx_float_100_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_float_100_0)) __PYX_ERR(0, 2251, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error);
    __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total_operate_revenue_tb, __pyx_t_7) < 0) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2252
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}             # <<<<<<<<<<<<<<
 *         elif not isinstance(filter_dict['report_date'], list):
 *             raise ValueError("filter_dict['report_date'] should be a list.")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_float_100_0);
    __Pyx_GIVEREF(__pyx_float_100_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_float_100_0)) __PYX_ERR(0, 2252, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error);
    __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_kf_net_profit_tb, __pyx_t_7) < 0) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_float_10_0);
    __Pyx_GIVEREF(__pyx_float_10_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_float_10_0)) __PYX_ERR(0, 2252, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 2252, __pyx_L1_error);
    __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gross_profit_ratio, __pyx_t_7) < 0) __PYX_ERR(0, 2250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_filter_dict, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2249
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:             # <<<<<<<<<<<<<<
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2253
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         elif not isinstance(filter_dict['report_date'], list):             # <<<<<<<<<<<<<<
 *             raise ValueError("filter_dict['report_date'] should be a list.")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_filter_dict, __pyx_n_s_report_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyList_Check(__pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (!__pyx_t_1);
  if (unlikely(__pyx_t_9)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2254
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         elif not isinstance(filter_dict['report_date'], list):
 *             raise ValueError("filter_dict['report_date'] should be a list.")             # <<<<<<<<<<<<<<
 * 
 *         # query_stock_list = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2254, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2253
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         elif not isinstance(filter_dict['report_date'], list):             # <<<<<<<<<<<<<<
 *             raise ValueError("filter_dict['report_date'] should be a list.")
 * 
 */
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2257
 * 
 *         # query_stock_list = []
 *         query_stock_df_dict = {}             # <<<<<<<<<<<<<<
 *         for query_date in filter_dict['report_date']:
 *             filter_dict_item = filter_dict.copy()
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_query_stock_df_dict = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2258
 *         # query_stock_list = []
 *         query_stock_df_dict = {}
 *         for query_date in filter_dict['report_date']:             # <<<<<<<<<<<<<<
 *             filter_dict_item = filter_dict.copy()
 *             filter_dict_item['report_date'] = query_date
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_filter_dict, __pyx_n_s_report_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7);
    __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2258, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_7))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2258, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2258, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2258, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2258, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_11(__pyx_t_7);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2258, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_query_date, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2259
 *         query_stock_df_dict = {}
 *         for query_date in filter_dict['report_date']:
 *             filter_dict_item = filter_dict.copy()             # <<<<<<<<<<<<<<
 *             filter_dict_item['report_date'] = query_date
 *             query_date_str = '_' + query_date.strftime('%Y%m%d')
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_filter_dict, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_filter_dict_item, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2260
 *         for query_date in filter_dict['report_date']:
 *             filter_dict_item = filter_dict.copy()
 *             filter_dict_item['report_date'] = query_date             # <<<<<<<<<<<<<<
 *             query_date_str = '_' + query_date.strftime('%Y%m%d')
 *             stock_query_df = self.getStockByFinancialData(financial_mode, filter_dict_item, use_st_stock, save_file, input_codes)
 */
    if (unlikely((PyObject_SetItem(__pyx_v_filter_dict_item, __pyx_n_s_report_date, __pyx_v_query_date) < 0))) __PYX_ERR(0, 2260, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2261
 *             filter_dict_item = filter_dict.copy()
 *             filter_dict_item['report_date'] = query_date
 *             query_date_str = '_' + query_date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             stock_query_df = self.getStockByFinancialData(financial_mode, filter_dict_item, use_st_stock, save_file, input_codes)
 *             # query_stock_list.append(stock_query_df['code'].tolist())
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Y_m_d};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = PyNumber_Add(__pyx_n_s__117, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_query_date_str, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2262
 *             filter_dict_item['report_date'] = query_date
 *             query_date_str = '_' + query_date.strftime('%Y%m%d')
 *             stock_query_df = self.getStockByFinancialData(financial_mode, filter_dict_item, use_st_stock, save_file, input_codes)             # <<<<<<<<<<<<<<
 *             # query_stock_list.append(stock_query_df['code'].tolist())
 *             query_stock_df_dict[query_date_str] = stock_query_df
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockByFinancialData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_financial_mode, __pyx_v_filter_dict_item, __pyx_v_use_st_stock, __pyx_v_save_file, __pyx_v_input_codes};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 5+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_stock_query_df, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2264
 *             stock_query_df = self.getStockByFinancialData(financial_mode, filter_dict_item, use_st_stock, save_file, input_codes)
 *             # query_stock_list.append(stock_query_df['code'].tolist())
 *             query_stock_df_dict[query_date_str] = stock_query_df             # <<<<<<<<<<<<<<
 * 
 *         date_str = list(query_stock_df_dict.keys())[0]
 */
    if (unlikely((PyDict_SetItem(__pyx_v_query_stock_df_dict, __pyx_v_query_date_str, __pyx_v_stock_query_df) < 0))) __PYX_ERR(0, 2264, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2258
 *         # query_stock_list = []
 *         query_stock_df_dict = {}
 *         for query_date in filter_dict['report_date']:             # <<<<<<<<<<<<<<
 *             filter_dict_item = filter_dict.copy()
 *             filter_dict_item['report_date'] = query_date
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2266
 *             query_stock_df_dict[query_date_str] = stock_query_df
 * 
 *         date_str = list(query_stock_df_dict.keys())[0]             # <<<<<<<<<<<<<<
 *         merged_df = query_stock_df_dict.pop(date_str)
 * 
 */
  __pyx_t_7 = __Pyx_PyDict_Keys(__pyx_v_query_stock_df_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_date_str = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2267
 * 
 *         date_str = list(query_stock_df_dict.keys())[0]
 *         merged_df = query_stock_df_dict.pop(date_str)             # <<<<<<<<<<<<<<
 * 
 *         for key, value in query_stock_df_dict.items():
 */
  __pyx_t_7 = __Pyx_PyDict_Pop(__pyx_v_query_stock_df_dict, __pyx_v_date_str, ((PyObject *)NULL)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_merged_df = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2269
 *         merged_df = query_stock_df_dict.pop(date_str)
 * 
 *         for key, value in query_stock_df_dict.items():             # <<<<<<<<<<<<<<
 *             value.drop(columns=['code'], inplace=True)
 *             merged_df = pd.merge(merged_df, value, how='inner', suffixes=(date_str, key), left_index=True, right_index=True)
 */
  __pyx_t_10 = 0;
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_query_stock_df_dict, 1, __pyx_n_s_items, (&__pyx_t_12), (&__pyx_t_13)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __pyx_t_7 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_7, __pyx_t_12, &__pyx_t_10, &__pyx_t_5, &__pyx_t_2, NULL, __pyx_t_13);
    if (unlikely(__pyx_t_14 == 0)) break;
    if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 2269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2270
 * 
 *         for key, value in query_stock_df_dict.items():
 *             value.drop(columns=['code'], inplace=True)             # <<<<<<<<<<<<<<
 *             merged_df = pd.merge(merged_df, value, how='inner', suffixes=(date_str, key), left_index=True, right_index=True)
 *             date_str = key
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_drop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_n_s_code);
    __Pyx_GIVEREF(__pyx_n_s_code);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_code)) __PYX_ERR(0, 2270, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_columns, __pyx_t_4) < 0) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2270, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2271
 *         for key, value in query_stock_df_dict.items():
 *             value.drop(columns=['code'], inplace=True)
 *             merged_df = pd.merge(merged_df, value, how='inner', suffixes=(date_str, key), left_index=True, right_index=True)             # <<<<<<<<<<<<<<
 *             date_str = key
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_merge); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_merged_df);
    __Pyx_GIVEREF(__pyx_v_merged_df);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_merged_df)) __PYX_ERR(0, 2271, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value)) __PYX_ERR(0, 2271, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_how, __pyx_n_s_inner) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_date_str);
    __Pyx_GIVEREF(__pyx_v_date_str);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_date_str)) __PYX_ERR(0, 2271, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key)) __PYX_ERR(0, 2271, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_suffixes, __pyx_t_3) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_left_index, Py_True) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_right_index, Py_True) < 0) __PYX_ERR(0, 2271, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_merged_df, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2272
 *             value.drop(columns=['code'], inplace=True)
 *             merged_df = pd.merge(merged_df, value, how='inner', suffixes=(date_str, key), left_index=True, right_index=True)
 *             date_str = key             # <<<<<<<<<<<<<<
 * 
 *         # final_stock_list = self.listIntersection(query_stock_list)
 */
    __Pyx_INCREF(__pyx_v_key);
    __Pyx_DECREF_SET(__pyx_v_date_str, __pyx_v_key);
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2276
 *         # final_stock_list = self.listIntersection(query_stock_list)
 *         # return final_stock_list
 *         return merged_df             # <<<<<<<<<<<<<<
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_merged_df);
  __pyx_r = __pyx_v_merged_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2248
 *         print("financialStockStrategy.__init__")
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.getStockMultiFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_query_stock_df_dict);
  __Pyx_XDECREF(__pyx_v_query_date);
  __Pyx_XDECREF(__pyx_v_filter_dict_item);
  __Pyx_XDECREF(__pyx_v_query_date_str);
  __Pyx_XDECREF(__pyx_v_stock_query_df);
  __Pyx_XDECREF(__pyx_v_date_str);
  __Pyx_XDECREF(__pyx_v_merged_df);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_filter_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2278
 *         return merged_df
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_5getStockByFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_5getStockByFinancialData = {"getStockByFinancialData", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_5getStockByFinancialData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_5getStockByFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_financial_mode = 0;
  PyObject *__pyx_v_filter_dict = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockByFinancialData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_financial_mode,&__pyx_n_s_filter_dict,&__pyx_n_s_use_st_stock,&__pyx_n_s_save_file,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_quarter)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_financial_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filter_dict);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2278, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockByFinancialData") < 0)) __PYX_ERR(0, 2278, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_financial_mode = values[1];
    __pyx_v_filter_dict = values[2];
    __pyx_v_use_st_stock = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_input_codes = ((PyObject*)values[5]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockByFinancialData", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 2278, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.getStockByFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 2278, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_4getStockByFinancialData(__pyx_self, __pyx_v_self, __pyx_v_financial_mode, __pyx_v_filter_dict, __pyx_v_use_st_stock, __pyx_v_save_file, __pyx_v_input_codes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_4getStockByFinancialData(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_financial_mode, PyObject *__pyx_v_filter_dict, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_filter_list = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_sql_query = NULL;
  PyObject *__pyx_v_stock_tmp = NULL;
  PyObject *__pyx_v_col_list = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_stock_tmp_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockByFinancialData", 0);
  __Pyx_INCREF(__pyx_v_filter_dict);

  /* "tbstock/tradeStrategy/stockStrategy.py":2279
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:             # <<<<<<<<<<<<<<
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 */
  __pyx_t_1 = (__pyx_v_filter_dict == Py_None);
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2280
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],             # <<<<<<<<<<<<<<
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         else:
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_report_date, __pyx_t_3) < 0) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_float_50_0);
    __Pyx_GIVEREF(__pyx_float_50_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_50_0)) __PYX_ERR(0, 2280, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1_error);
    __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total_operate_revenue_tb, __pyx_t_3) < 0) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2281
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}             # <<<<<<<<<<<<<<
 *         else:
 *             if isinstance(filter_dict['report_date'], list):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_float_25_0);
    __Pyx_GIVEREF(__pyx_float_25_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_25_0)) __PYX_ERR(0, 2281, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error);
    __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_kf_net_profit_tb, __pyx_t_3) < 0) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_float_10_0);
    __Pyx_GIVEREF(__pyx_float_10_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_10_0)) __PYX_ERR(0, 2281, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error);
    __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gross_profit_ratio, __pyx_t_3) < 0) __PYX_ERR(0, 2280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_filter_dict, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2279
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:             # <<<<<<<<<<<<<<
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2283
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         else:
 *             if isinstance(filter_dict['report_date'], list):             # <<<<<<<<<<<<<<
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_filter_dict, __pyx_n_s_report_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyList_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2284
 *         else:
 *             if isinstance(filter_dict['report_date'], list):
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")             # <<<<<<<<<<<<<<
 * 
 *         if financial_mode == "quarter":
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2284, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":2283
 *                            'kf_net_profit_tb': [25.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         else:
 *             if isinstance(filter_dict['report_date'], list):             # <<<<<<<<<<<<<<
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")
 * 
 */
    }
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2286
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")
 * 
 *         if financial_mode == "quarter":             # <<<<<<<<<<<<<<
 *             strategy_key_name = "financial_quarter_selection"
 *             need_database_tables = ['stock_financial_quarter']
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_financial_mode, __pyx_n_s_quarter, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2286, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2287
 * 
 *         if financial_mode == "quarter":
 *             strategy_key_name = "financial_quarter_selection"             # <<<<<<<<<<<<<<
 *             need_database_tables = ['stock_financial_quarter']
 *         else:
 */
    __Pyx_INCREF(__pyx_n_s_financial_quarter_selection);
    __pyx_v_strategy_key_name = __pyx_n_s_financial_quarter_selection;

    /* "tbstock/tradeStrategy/stockStrategy.py":2288
 *         if financial_mode == "quarter":
 *             strategy_key_name = "financial_quarter_selection"
 *             need_database_tables = ['stock_financial_quarter']             # <<<<<<<<<<<<<<
 *         else:
 *             strategy_key_name = "financial_report_selection"
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_stock_financial_quarter);
    __Pyx_GIVEREF(__pyx_n_s_stock_financial_quarter);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_stock_financial_quarter)) __PYX_ERR(0, 2288, __pyx_L1_error);
    __pyx_v_need_database_tables = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2286
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")
 * 
 *         if financial_mode == "quarter":             # <<<<<<<<<<<<<<
 *             strategy_key_name = "financial_quarter_selection"
 *             need_database_tables = ['stock_financial_quarter']
 */
    goto __pyx_L5;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2290
 *             need_database_tables = ['stock_financial_quarter']
 *         else:
 *             strategy_key_name = "financial_report_selection"             # <<<<<<<<<<<<<<
 *             need_database_tables = ['stock_financial_report']
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_financial_report_selection);
    __pyx_v_strategy_key_name = __pyx_n_s_financial_report_selection;

    /* "tbstock/tradeStrategy/stockStrategy.py":2291
 *         else:
 *             strategy_key_name = "financial_report_selection"
 *             need_database_tables = ['stock_financial_report']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_stock_financial_report);
    __Pyx_GIVEREF(__pyx_n_s_stock_financial_report);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_stock_financial_report)) __PYX_ERR(0, 2291, __pyx_L1_error);
    __pyx_v_need_database_tables = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L5:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2294
 * 
 *         #
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_2 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_7 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2294, __pyx_L1_error)
      #endif
      if (__pyx_t_7 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2294, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2295
 *         #
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_8) {
    } else {
      __pyx_t_1 = __pyx_t_8;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2295, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = (!__pyx_t_8);
    __pyx_t_1 = __pyx_t_9;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2296
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_10 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_10 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_firstly);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2297
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2295
 *         #
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2294
 * 
 *         #
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2300
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2300, __pyx_L1_error)
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_9;
  __pyx_L13_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2301
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2301, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2302
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_The);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_12};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2302, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2303
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2303, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2301
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2300
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name}  table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2305
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}: {financial_mode}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2306
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}: {financial_mode}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = 0;
  __pyx_t_11 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Beginning);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__108);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__108);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__108);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_financial_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_11;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2309
 * 
 *         #
 *         filter_list = []             # <<<<<<<<<<<<<<
 *         if financial_mode == "quarter":
 *             for key, value in filter_dict.items():
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_filter_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2310
 *         #
 *         filter_list = []
 *         if financial_mode == "quarter":             # <<<<<<<<<<<<<<
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_financial_mode, __pyx_n_s_quarter, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2310, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2311
 *         filter_list = []
 *         if financial_mode == "quarter":
 *             for key, value in filter_dict.items():             # <<<<<<<<<<<<<<
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:
 */
    __pyx_t_7 = 0;
    if (unlikely(__pyx_v_filter_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 2311, __pyx_L1_error)
    }
    __pyx_t_12 = __Pyx_dict_iterator(__pyx_v_filter_dict, 0, __pyx_n_s_items, (&__pyx_t_10), (&__pyx_t_13)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_12;
    __pyx_t_12 = 0;
    while (1) {
      __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_10, &__pyx_t_7, &__pyx_t_12, &__pyx_t_4, NULL, __pyx_t_13);
      if (unlikely(__pyx_t_14 == 0)) break;
      if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 2311, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2312
 *         if financial_mode == "quarter":
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):             # <<<<<<<<<<<<<<
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 */
      __pyx_t_1 = PyList_Check(__pyx_v_value); 
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2313
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_negative_infinity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2313, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2313, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_1) {

          /* "tbstock/tradeStrategy/stockStrategy.py":2314
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])             # <<<<<<<<<<<<<<
 *                     if value[1] != utils.positive_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) < value[1])
 */
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_stock_financial_quarter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2314, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_GetAttr(__pyx_t_12, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2314, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_12, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2314, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2313
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":2315
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 *                     if value[1] != utils.positive_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_quarter, key) < value[1])
 *                 else:
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2315, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2315, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_1) {

          /* "tbstock/tradeStrategy/stockStrategy.py":2316
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) < value[1])             # <<<<<<<<<<<<<<
 *                 else:
 *                     filter_list.append(getattr(stock_financial_quarter, key) == value)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_stock_financial_quarter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_2 = __Pyx_GetAttr(__pyx_t_12, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_12, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2316, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2316, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2315
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 *                     if value[1] != utils.positive_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_quarter, key) < value[1])
 *                 else:
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":2312
 *         if financial_mode == "quarter":
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):             # <<<<<<<<<<<<<<
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_quarter, key) > value[0])
 */
        goto __pyx_L20;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2318
 *                         filter_list.append(getattr(stock_financial_quarter, key) < value[1])
 *                 else:
 *                     filter_list.append(getattr(stock_financial_quarter, key) == value)             # <<<<<<<<<<<<<<
 *             sql_query = session.query(stock_financial_quarter).filter(and_(*filter_list))
 *         else:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stock_financial_quarter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_GetAttr(__pyx_t_4, __pyx_v_key); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2318, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_12, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2318, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L20:;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2319
 *                 else:
 *                     filter_list.append(getattr(stock_financial_quarter, key) == value)
 *             sql_query = session.query(stock_financial_quarter).filter(and_(*filter_list))             # <<<<<<<<<<<<<<
 *         else:
 *             for key, value in filter_dict.items():
 */
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_session); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_stock_financial_quarter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_and); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = PySequence_Tuple(__pyx_v_filter_list); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2319, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_sql_query = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2310
 *         #
 *         filter_list = []
 *         if financial_mode == "quarter":             # <<<<<<<<<<<<<<
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 */
    goto __pyx_L17;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2321
 *             sql_query = session.query(stock_financial_quarter).filter(and_(*filter_list))
 *         else:
 *             for key, value in filter_dict.items():             # <<<<<<<<<<<<<<
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:
 */
  /*else*/ {
    __pyx_t_10 = 0;
    if (unlikely(__pyx_v_filter_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 2321, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_filter_dict, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
    while (1) {
      __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_7, &__pyx_t_10, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_13);
      if (unlikely(__pyx_t_14 == 0)) break;
      if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 2321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2322
 *         else:
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):             # <<<<<<<<<<<<<<
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 */
      __pyx_t_1 = PyList_Check(__pyx_v_value); 
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2323
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_negative_infinity); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2323, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2323, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "tbstock/tradeStrategy/stockStrategy.py":2324
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])             # <<<<<<<<<<<<<<
 *                     if value[1] != utils.positive_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) < value[1])
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stock_financial_report); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_12, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2324, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2323
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):
 *                     if value[0] != utils.negative_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":2325
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 *                     if value[1] != utils.positive_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_report, key) < value[1])
 *                 else:
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_12, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2325, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {

          /* "tbstock/tradeStrategy/stockStrategy.py":2326
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 *                     if value[1] != utils.positive_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) < value[1])             # <<<<<<<<<<<<<<
 *                 else:
 *                     filter_list.append(getattr(stock_financial_report, key) == value)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stock_financial_report); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_value, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_12, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2326, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2326, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2325
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 *                     if value[1] != utils.positive_infinity:             # <<<<<<<<<<<<<<
 *                         filter_list.append(getattr(stock_financial_report, key) < value[1])
 *                 else:
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":2322
 *         else:
 *             for key, value in filter_dict.items():
 *                 if isinstance(value, list):             # <<<<<<<<<<<<<<
 *                     if value[0] != utils.negative_infinity:
 *                         filter_list.append(getattr(stock_financial_report, key) > value[0])
 */
        goto __pyx_L25;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2328
 *                         filter_list.append(getattr(stock_financial_report, key) < value[1])
 *                 else:
 *                     filter_list.append(getattr(stock_financial_report, key) == value)             # <<<<<<<<<<<<<<
 *             sql_query = session.query(stock_financial_report).filter(and_(*filter_list))
 * 
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_stock_financial_report); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_GetAttr(__pyx_t_5, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2328, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_filter_list, __pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2328, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_L25:;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2329
 *                 else:
 *                     filter_list.append(getattr(stock_financial_report, key) == value)
 *             sql_query = session.query(stock_financial_report).filter(and_(*filter_list))             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp = pd.read_sql(sql_query.statement, session.bind)  # pandasdata
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_query); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stock_financial_report); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_filter); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_and); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PySequence_Tuple(__pyx_v_filter_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __pyx_v_sql_query = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L17:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2331
 *             sql_query = session.query(stock_financial_report).filter(and_(*filter_list))
 * 
 *         stock_tmp = pd.read_sql(sql_query.statement, session.bind)  # pandasdata             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pd); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_read_sql); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sql_query, __pyx_n_s_statement); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_12, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_stock_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2334
 * 
 *         #
 *         col_list = ['code', 'name']             # <<<<<<<<<<<<<<
 *         col_list = col_list + list(filter_dict.keys())
 *         stock_tmp = stock_tmp[col_list]
 */
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_code)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_name)) __PYX_ERR(0, 2334, __pyx_L1_error);
  __pyx_v_col_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2335
 *         #
 *         col_list = ['code', 'name']
 *         col_list = col_list + list(filter_dict.keys())             # <<<<<<<<<<<<<<
 *         stock_tmp = stock_tmp[col_list]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filter_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_v_col_list, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_col_list, ((PyObject*)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2336
 *         col_list = ['code', 'name']
 *         col_list = col_list + list(filter_dict.keys())
 *         stock_tmp = stock_tmp[col_list]             # <<<<<<<<<<<<<<
 * 
 *         # use_st_stockinput_codes
 */
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_tmp, __pyx_v_col_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF_SET(__pyx_v_stock_tmp, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2339
 * 
 *         # use_st_stockinput_codes
 *         exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list             # <<<<<<<<<<<<<<
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_exclude_codes = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2340
 *         # use_st_stockinput_codes
 *         exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2340, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_1);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2341
 *         exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2340
 *         # use_st_stockinput_codes
 *         exclude_codes = list(self.delist_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2342
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]             # <<<<<<<<<<<<<<
 * 
 *         if input_codes:
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_exclude_codes};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyNumber_Invert(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_stock_tmp, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_tmp, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2344
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]
 * 
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             stock_tmp = stock_tmp[stock_tmp['code'].isin(input_codes)]
 * 
 */
  __pyx_t_9 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2345
 * 
 *         if input_codes:
 *             stock_tmp = stock_tmp[stock_tmp['code'].isin(input_codes)]             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tmp, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isin); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_input_codes};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_stock_tmp, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_stock_tmp, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2344
 *         stock_tmp = stock_tmp[~stock_tmp['code'].isin(exclude_codes)]
 * 
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             stock_tmp = stock_tmp[stock_tmp['code'].isin(input_codes)]
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2347
 *             stock_tmp = stock_tmp[stock_tmp['code'].isin(input_codes)]
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)             # <<<<<<<<<<<<<<
 *         stock_tmp_dict = stock_tmp.to_dict()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_set_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_keys, __pyx_n_s_name) < 0) __PYX_ERR(0, 2347, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2347, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2348
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         stock_tmp_dict = stock_tmp.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_stock_tmp_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2351
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2351, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2352
 *         # json
 *         if save_file:
 *             stock_tmp_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_tmp_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2352, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2353
 *         if save_file:
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_strategy_key_name, __pyx_v_stock_tmp_dict) < 0))) __PYX_ERR(0, 2353, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2354
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *         return stock_tmp
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2351
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_tmp_dict['updated'] = True
 *             self.strategy_json[strategy_key_name] = stock_tmp_dict
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2356
 *             self.dumpJsonToFile()
 * 
 *         return stock_tmp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_tmp);
  __pyx_r = __pyx_v_stock_tmp;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2278
 *         return merged_df
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.financialStockStrategy.getStockByFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_filter_list);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_sql_query);
  __Pyx_XDECREF(__pyx_v_stock_tmp);
  __Pyx_XDECREF(__pyx_v_col_list);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_stock_tmp_dict);
  __Pyx_XDECREF(__pyx_v_filter_dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2368
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2368, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2368, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2368, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2368, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2369
 * 
 *     def __init__(self, save_json=False):
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 *         print("capitalStockStrategy.__init__")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_capitalStockStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 2369, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 2369, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 2369, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2370
 *     def __init__(self, save_json=False):
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()             # <<<<<<<<<<<<<<
 *         print("capitalStockStrategy.__init__")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAllHighAmountStock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_high_amount_stock_list, __pyx_t_3) < 0) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2371
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 *         print("capitalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2368
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2373
 *         print("capitalStockStrategy.__init__")
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:             # <<<<<<<<<<<<<<
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_3isLowAmountStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_3isLowAmountStock = {"isLowAmountStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_3isLowAmountStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_3isLowAmountStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_amount_th = 0;
  PyObject *__pyx_v_use_ma = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isLowAmountStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_amount_th,&__pyx_n_s_use_ma,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_50000000)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("isLowAmountStock", 0, 2, 4, 1); __PYX_ERR(0, 2373, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amount_th);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_ma);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isLowAmountStock") < 0)) __PYX_ERR(0, 2373, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_amount_th = values[2];
    __pyx_v_use_ma = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isLowAmountStock", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2373, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.isLowAmountStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_2isLowAmountStock(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_amount_th, __pyx_v_use_ma);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_2isLowAmountStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_amount_th, PyObject *__pyx_v_use_ma) {
  PyObject *__pyx_v_ma_time_list = NULL;
  PyObject *__pyx_v_date_end = NULL;
  PyObject *__pyx_v_date_start = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_tech_ind = NULL;
  PyObject *__pyx_v_df = NULL;
  PyObject *__pyx_v_today_condition_amount = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isLowAmountStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2375
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:             # <<<<<<<<<<<<<<
 *             if stock_code in self.high_amount_stock_list:
 *                 return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_amount_stock_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2376
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 *             if stock_code in self.high_amount_stock_list:             # <<<<<<<<<<<<<<
 *                 return False
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_high_amount_stock_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_2) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2377
 *         if self.high_amount_stock_list:
 *             if stock_code in self.high_amount_stock_list:
 *                 return False             # <<<<<<<<<<<<<<
 *             else:
 *                 return True
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2376
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 *             if stock_code in self.high_amount_stock_list:             # <<<<<<<<<<<<<<
 *                 return False
 *             else:
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2379
 *                 return False
 *             else:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2375
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:             # <<<<<<<<<<<<<<
 *             if stock_code in self.high_amount_stock_list:
 *                 return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2382
 * 
 *         #
 *         ma_time_list = [5]             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_5);
  __Pyx_GIVEREF(__pyx_int_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_5)) __PYX_ERR(0, 2382, __pyx_L1_error);
  __pyx_v_ma_time_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2383
 *         #
 *         ma_time_list = [5]
 *         date_end = self.use_date             # <<<<<<<<<<<<<<
 *         date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_date_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2384
 *         ma_time_list = [5]
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ma_time_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_date_end, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_date_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2387
 * 
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, date_start, date_end)  #             # <<<<<<<<<<<<<<
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for stock {stock_code} between {date_start} to {date_end}")
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_stock_code, __pyx_v_date_start, __pyx_v_date_end};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2387, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(0, 2387, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2387, __pyx_L1_error)
    __pyx_L6_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_stock_data = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2388
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, date_start, date_end)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for stock {stock_code} between {date_start} to {date_end}")
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2388, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_2);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2389
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, date_start, date_end)  #
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for stock {stock_code} between {date_start} to {date_end}")             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2);
    __pyx_t_10 += 38;
    __Pyx_GIVEREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_between);
    __pyx_t_10 += 9;
    __Pyx_GIVEREF(__pyx_kp_u_between);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_between);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_date_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_10 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_to);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_date_end, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2389, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2390
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for stock {stock_code} between {date_start} to {date_end}")
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2388
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, date_start, date_end)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for stock {stock_code} between {date_start} to {date_end}")
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2393
 * 
 *         #
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             tech_ind = stockTechInd(stock_data, False)
 *             df = tech_ind.MA(ma_column='amount', ma_time=ma_time_list)
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_use_ma); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2393, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2394
 *         #
 *         if use_ma:
 *             tech_ind = stockTechInd(stock_data, False)             # <<<<<<<<<<<<<<
 *             df = tech_ind.MA(ma_column='amount', ma_time=ma_time_list)
 *             today_condition_amount = df.iloc[-1]['ma_5']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stockTechInd); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_stock_data, Py_False};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_tech_ind = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2395
 *         if use_ma:
 *             tech_ind = stockTechInd(stock_data, False)
 *             df = tech_ind.MA(ma_column='amount', ma_time=ma_time_list)             # <<<<<<<<<<<<<<
 *             today_condition_amount = df.iloc[-1]['ma_5']
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tech_ind, __pyx_n_s_MA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ma_column, __pyx_n_s_amount) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ma_time, __pyx_v_ma_time_list) < 0) __PYX_ERR(0, 2395, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2395, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_df = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2396
 *             tech_ind = stockTechInd(stock_data, False)
 *             df = tech_ind.MA(ma_column='amount', ma_time=ma_time_list)
 *             today_condition_amount = df.iloc[-1]['ma_5']             # <<<<<<<<<<<<<<
 *         else:
 *             today_condition_amount = stock_data.iloc[-1]['amount']
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_df, __pyx_n_s_iloc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_ma_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_today_condition_amount = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2393
 * 
 *         #
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             tech_ind = stockTechInd(stock_data, False)
 *             df = tech_ind.MA(ma_column='amount', ma_time=ma_time_list)
 */
    goto __pyx_L8;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2398
 *             today_condition_amount = df.iloc[-1]['ma_5']
 *         else:
 *             today_condition_amount = stock_data.iloc[-1]['amount']             # <<<<<<<<<<<<<<
 * 
 *         if today_condition_amount < amount_th:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_amount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_today_condition_amount = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L8:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2400
 *             today_condition_amount = stock_data.iloc[-1]['amount']
 * 
 *         if today_condition_amount < amount_th:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_today_condition_amount, __pyx_v_amount_th, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2400, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2401
 * 
 *         if today_condition_amount < amount_th:
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2400
 *             today_condition_amount = stock_data.iloc[-1]['amount']
 * 
 *         if today_condition_amount < amount_th:             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2403
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def getAllHighAmountStock(self, amount_th=50000000, use_ma=True, use_st_stock=False):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2373
 *         print("capitalStockStrategy.__init__")
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:             # <<<<<<<<<<<<<<
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.isLowAmountStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ma_time_list);
  __Pyx_XDECREF(__pyx_v_date_end);
  __Pyx_XDECREF(__pyx_v_date_start);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_tech_ind);
  __Pyx_XDECREF(__pyx_v_df);
  __Pyx_XDECREF(__pyx_v_today_condition_amount);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2405
 *             return False
 * 
 *     def getAllHighAmountStock(self, amount_th=50000000, use_ma=True, use_st_stock=False):             # <<<<<<<<<<<<<<
 *         '''
 *         1. use_ma=False:  >
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_5getAllHighAmountStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_4getAllHighAmountStock, "\n        1. use_ma=False: \345\275\223\345\211\215\346\227\245\347\232\204\346\210\220\344\272\244\351\242\235 > \351\230\210\345\200\274\n        2. use_ma=True: \345\275\223\345\211\215\346\227\245\347\232\204ma_x\346\210\220\344\272\244\351\242\235 > \351\230\210\345\200\274\n\n        :param amount_th:\n        :param use_st_stock:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_5getAllHighAmountStock = {"getAllHighAmountStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_5getAllHighAmountStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_4getAllHighAmountStock};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_5getAllHighAmountStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_amount_th = 0;
  PyObject *__pyx_v_use_ma = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getAllHighAmountStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_amount_th,&__pyx_n_s_use_ma,&__pyx_n_s_use_st_stock,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_50000000)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_amount_th);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_ma);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getAllHighAmountStock") < 0)) __PYX_ERR(0, 2405, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_amount_th = values[1];
    __pyx_v_use_ma = values[2];
    __pyx_v_use_st_stock = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getAllHighAmountStock", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2405, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.getAllHighAmountStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_4getAllHighAmountStock(__pyx_self, __pyx_v_self, __pyx_v_amount_th, __pyx_v_use_ma, __pyx_v_use_st_stock);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_4getAllHighAmountStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_amount_th, PyObject *__pyx_v_use_ma, PyObject *__pyx_v_use_st_stock) {
  PyObject *__pyx_v_high_amount_stock_list = NULL;
  PyObject *__pyx_v_ma_time_list = NULL;
  PyObject *__pyx_v_date_end = NULL;
  PyObject *__pyx_v_date_start = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_data_simple_info_df = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_ma_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getAllHighAmountStock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2414
 *         :return:
 *         '''
 *         high_amount_stock_list = []             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_high_amount_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2417
 * 
 *         #
 *         ma_time_list = [5]             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         if use_ma:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_5);
  __Pyx_GIVEREF(__pyx_int_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_5)) __PYX_ERR(0, 2417, __pyx_L1_error);
  __pyx_v_ma_time_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2418
 *         #
 *         ma_time_list = [5]
 *         date_end = self.use_date             # <<<<<<<<<<<<<<
 *         if use_ma:
 *             date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_date_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2419
 *         ma_time_list = [5]
 *         date_end = self.use_date
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_ma); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2419, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2420
 *         date_end = self.use_date
 *         if use_ma:
 *             date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         else:
 *             date_start = date_end
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ma_time_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_date_end, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_date_start = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2419
 *         ma_time_list = [5]
 *         date_end = self.use_date
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2422
 *             date_start = utils.sh_calendar.session_offset(date_end, -(ma_time_list[-1] - 1)).strftime('%Y%m%d')
 *         else:
 *             date_start = date_end             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_date_end);
    __pyx_v_date_start = __pyx_v_date_end;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2425
 * 
 *         #
 *         res, data_simple_info_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', date_start, date_end)  #             # <<<<<<<<<<<<<<
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {date_start} to {date_end}")
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_kp_s__23, __pyx_v_date_start, __pyx_v_date_end};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2425, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(0, 2425, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2425, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_data_simple_info_df = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2426
 *         #
 *         res, data_simple_info_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', date_start, date_end)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {date_start} to {date_end}")
 *             return high_amount_stock_list
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2426, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_2);
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2427
 *         res, data_simple_info_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', date_start, date_end)  #
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {date_start} to {date_end}")             # <<<<<<<<<<<<<<
 *             return high_amount_stock_list
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = 0;
    __pyx_t_11 = 127;
    __Pyx_INCREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_10 += 51;
    __Pyx_GIVEREF(__pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cant_getStockTradeDayInfoFq_for);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_date_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_10 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_to);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_date_end, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2428
 *         if not res:
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {date_start} to {date_end}")
 *             return high_amount_stock_list             # <<<<<<<<<<<<<<
 * 
 *         # ST + +
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_high_amount_stock_list);
    __pyx_r = __pyx_v_high_amount_stock_list;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2426
 *         #
 *         res, data_simple_info_df = self.dataproc.getStockTradeDayInfoSqlalchemy('', date_start, date_end)  #
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Cant getStockTradeDayInfoFq for all stocks between {date_start} to {date_end}")
 *             return high_amount_stock_list
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2431
 * 
 *         # ST + +
 *         exclude_codes = self.suspended_stock_list             # <<<<<<<<<<<<<<
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_exclude_codes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2432
 *         # ST + +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         data_simple_info_df = data_simple_info_df[~data_simple_info_df['code'].isin(exclude_codes)]
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2432, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_9);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2433
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *         data_simple_info_df = data_simple_info_df[~data_simple_info_df['code'].isin(exclude_codes)]
 *         data_simple_info_df = data_simple_info_df[['date', 'code', 'amount']]
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2433, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2432
 *         # ST + +
 *         exclude_codes = self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         data_simple_info_df = data_simple_info_df[~data_simple_info_df['code'].isin(exclude_codes)]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2434
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         data_simple_info_df = data_simple_info_df[~data_simple_info_df['code'].isin(exclude_codes)]             # <<<<<<<<<<<<<<
 *         data_simple_info_df = data_simple_info_df[['date', 'code', 'amount']]
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isin); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_exclude_codes};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2435
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *         data_simple_info_df = data_simple_info_df[~data_simple_info_df['code'].isin(exclude_codes)]
 *         data_simple_info_df = data_simple_info_df[['date', 'code', 'amount']]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_date)) __PYX_ERR(0, 2435, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_code)) __PYX_ERR(0, 2435, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_amount);
  __Pyx_GIVEREF(__pyx_n_s_amount);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_amount)) __PYX_ERR(0, 2435, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2438
 * 
 *         #
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             ma_name = 'amount_ma' + str(ma_time_list[-1])
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_ma); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2438, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2439
 *         #
 *         if use_ma:
 *             ma_name = 'amount_ma' + str(ma_time_list[-1])             # <<<<<<<<<<<<<<
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['date'] == date_end]  #
 */
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ma_time_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Add(__pyx_n_s_amount_ma, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ma_name = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2440
 *         if use_ma:
 *             ma_name = 'amount_ma' + str(ma_time_list[-1])
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')             # <<<<<<<<<<<<<<
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['date'] == date_end]  #
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df[ma_name] > amount_th]
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_simple_info_df, __pyx_n_s_groupby); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_code};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_amount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_transform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_s_mean};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (unlikely((PyObject_SetItem(__pyx_v_data_simple_info_df, __pyx_v_ma_name, __pyx_t_4) < 0))) __PYX_ERR(0, 2440, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2441
 *             ma_name = 'amount_ma' + str(ma_time_list[-1])
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['date'] == date_end]  #             # <<<<<<<<<<<<<<
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df[ma_name] > amount_th]
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_date_end, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2442
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['date'] == date_end]  #
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df[ma_name] > amount_th]             # <<<<<<<<<<<<<<
 *         else:
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['amount'] > amount_th]
 */
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_v_ma_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_amount_th, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2442, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2438
 * 
 *         #
 *         if use_ma:             # <<<<<<<<<<<<<<
 *             ma_name = 'amount_ma' + str(ma_time_list[-1])
 *             data_simple_info_df[ma_name] = data_simple_info_df.groupby('code')['amount'].transform('mean')
 */
    goto __pyx_L8;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2444
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df[ma_name] > amount_th]
 *         else:
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['amount'] > amount_th]             # <<<<<<<<<<<<<<
 * 
 *         data_simple_info_df.reset_index(drop=True, inplace=True)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_amount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_amount_th, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_data_simple_info_df, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_data_simple_info_df, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L8:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2446
 *             data_simple_info_df = data_simple_info_df[data_simple_info_df['amount'] > amount_th]
 * 
 *         data_simple_info_df.reset_index(drop=True, inplace=True)             # <<<<<<<<<<<<<<
 *         high_amount_stock_list = data_simple_info_df['code'].tolist()
 *         return high_amount_stock_list
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_simple_info_df, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 2446, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2446, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2447
 * 
 *         data_simple_info_df.reset_index(drop=True, inplace=True)
 *         high_amount_stock_list = data_simple_info_df['code'].tolist()             # <<<<<<<<<<<<<<
 *         return high_amount_stock_list
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data_simple_info_df, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_high_amount_stock_list, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2448
 *         data_simple_info_df.reset_index(drop=True, inplace=True)
 *         high_amount_stock_list = data_simple_info_df['code'].tolist()
 *         return high_amount_stock_list             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_high_amount_stock_list);
  __pyx_r = __pyx_v_high_amount_stock_list;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2405
 *             return False
 * 
 *     def getAllHighAmountStock(self, amount_th=50000000, use_ma=True, use_st_stock=False):             # <<<<<<<<<<<<<<
 *         '''
 *         1. use_ma=False:  >
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.capitalStockStrategy.getAllHighAmountStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_high_amount_stock_list);
  __Pyx_XDECREF(__pyx_v_ma_time_list);
  __Pyx_XDECREF(__pyx_v_date_end);
  __Pyx_XDECREF(__pyx_v_date_start);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_data_simple_info_df);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_ma_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2493
 *     '''
 * 
 *     def __init__(self, save_json=True):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2493, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2493, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2494
 * 
 *     def __init__(self, save_json=True):
 *         super(publishStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         self.checkDatabaseTableUpdate()
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_publishStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 2494, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 2494, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2495
 *     def __init__(self, save_json=True):
 *         super(publishStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()             # <<<<<<<<<<<<<<
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkDatabaseTableUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2497
 *         self.checkDatabaseTableUpdate()
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)             # <<<<<<<<<<<<<<
 *         if self.non_serializable_attrs:
 *             print("publishStrategy :", self.non_serializable_attrs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_check_serializability); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_self};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs, __pyx_t_3) < 0) __PYX_ERR(0, 2497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2498
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("publishStrategy :", self.non_serializable_attrs)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2499
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:
 *             print("publishStrategy :", self.non_serializable_attrs)             # <<<<<<<<<<<<<<
 * 
 *         print("publishStrategy.__init__")
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_kp_s_publishStrategy_2);
    __Pyx_GIVEREF(__pyx_kp_s_publishStrategy_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_publishStrategy_2)) __PYX_ERR(0, 2499, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2498
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("publishStrategy :", self.non_serializable_attrs)
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2501
 *             print("publishStrategy :", self.non_serializable_attrs)
 * 
 *         print("publishStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def reset(self, use_date):
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2493
 *     '''
 * 
 *     def __init__(self, save_json=True):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2503
 *         print("publishStrategy.__init__")
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).reset(use_date)
 *         self.checkDatabaseTableUpdate()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_3reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_3reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_3reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_3reset(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_use_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_use_date,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2503, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("reset", 1, 2, 2, 1); __PYX_ERR(0, 2503, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reset") < 0)) __PYX_ERR(0, 2503, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_use_date = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reset", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2503, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_2reset(__pyx_self, __pyx_v_self, __pyx_v_use_date);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_2reset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_date) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2504
 * 
 *     def reset(self, use_date):
 *         super(publishStrategy, self).reset(use_date)             # <<<<<<<<<<<<<<
 *         self.checkDatabaseTableUpdate()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_publishStrategy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)) __PYX_ERR(0, 2504, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_use_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2505
 *     def reset(self, use_date):
 *         super(publishStrategy, self).reset(use_date)
 *         self.checkDatabaseTableUpdate()             # <<<<<<<<<<<<<<
 * 
 *     def getStrategyDataAndImg(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_checkDatabaseTableUpdate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2503
 *         print("publishStrategy.__init__")
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).reset(use_date)
 *         self.checkDatabaseTableUpdate()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2507
 *         self.checkDatabaseTableUpdate()
 * 
 *     def getStrategyDataAndImg(self):             # <<<<<<<<<<<<<<
 * 
 *         print('use_date = ', self.use_date)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_5getStrategyDataAndImg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_5getStrategyDataAndImg = {"getStrategyDataAndImg", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_5getStrategyDataAndImg, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_5getStrategyDataAndImg(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStrategyDataAndImg (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2507, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStrategyDataAndImg") < 0)) __PYX_ERR(0, 2507, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStrategyDataAndImg", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2507, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStrategyDataAndImg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_4getStrategyDataAndImg(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_4getStrategyDataAndImg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *__pyx_v_top_10_up_limit = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_top_10_amplitude = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_stock_wave_up_df = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_stock_wave_down_df = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_new_date = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_rate_hist_dict = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_rate_hist_dict_len = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_max_level = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_stock_ladder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStrategyDataAndImg", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2509
 *     def getStrategyDataAndImg(self):
 * 
 *         print('use_date = ', self.use_date)             # <<<<<<<<<<<<<<
 * 
 *         ## 1:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s_use_date_2);
  __Pyx_GIVEREF(__pyx_kp_s_use_date_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_use_date_2)) __PYX_ERR(0, 2509, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2513
 *         ## 1:
 *         # top_10_up_limit, top_10_amplitude = self.getStockProperty_(trade_day_len=30, use_st_stock=False, num_tr=15, save_file=True)
 *         top_10_up_limit, top_10_amplitude = self.getStockProperty(30, False, 15, True, 'process')             # <<<<<<<<<<<<<<
 *         # print('top_10_up_limit:', top_10_up_limit)
 *         # print('top_10_amplitude:', top_10_amplitude)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2513, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 2513, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2513, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_top_10_up_limit = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_top_10_amplitude = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2518
 * 
 *         ## 10: x
 *         stock_wave_up_df, stock_wave_down_df = self.getStockWavePriceRatio(trade_day_len=60, use_st_stock=False, num_tr=20, save_file=True,             # <<<<<<<<<<<<<<
 *                                                                            multi_type='process')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockWavePriceRatio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_trade_day_len, __pyx_int_60) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_use_st_stock, Py_False) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_20) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_multi_type, __pyx_n_s_process) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2518, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 2518, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2518, __pyx_L1_error)
    __pyx_L6_unpacking_done:;
  }
  __pyx_v_stock_wave_up_df = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_stock_wave_down_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2522
 * 
 *         ## 2:
 *         new_date, rate_hist_dict, rate_hist_dict_len = self.getTradeDistributionTable(multi_thread=True, workers=12, save_file=True)             # <<<<<<<<<<<<<<
 *         # print(f"rate_hist_dict = \n{rate_hist_dict} ")
 *         # print(f"rate_hist_dict_ = \n{rate_hist_dict_len} ")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDistributionTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2522, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 2; __pyx_t_4 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_6), 3) < 0) __PYX_ERR(0, 2522, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_unpacking_done;
    __pyx_L7_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2522, __pyx_L1_error)
    __pyx_L8_unpacking_done:;
  }
  __pyx_v_new_date = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_rate_hist_dict = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_rate_hist_dict_len = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2527
 * 
 *         ## 3:
 *         max_level, stock_ladder = self.getStockLadderTable(use_st_stock=False, ladder_max=7, save_file=True)             # <<<<<<<<<<<<<<
 *         # print(f' = {max_level}')
 *         # print(' ', stock_ladder)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockLadderTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_use_st_stock, Py_False) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ladder_max, __pyx_int_7) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2527, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L10_unpacking_done;
    __pyx_L9_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2527, __pyx_L1_error)
    __pyx_L10_unpacking_done:;
  }
  __pyx_v_max_level = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_stock_ladder = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2532
 * 
 *         ## 4
 *         self.getIndustryHotTable(num_tr=6, save_file=True)             # <<<<<<<<<<<<<<
 *         self.getIndustryConceptHotFrequency(mode='industry', near_day=7, save_file=True)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getIndustryHotTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_6) < 0) __PYX_ERR(0, 2532, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2532, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2533
 *         ## 4
 *         self.getIndustryHotTable(num_tr=6, save_file=True)
 *         self.getIndustryConceptHotFrequency(mode='industry', near_day=7, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         ## 5
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getIndustryConceptHotFrequency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_n_s_industry) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_day, __pyx_int_7) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2533, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2536
 * 
 *         ## 5
 *         self.getConceptHotTable(num_tr=6, save_file=True)             # <<<<<<<<<<<<<<
 *         self.getIndustryConceptHotFrequency(mode='concept', near_day=7, save_file=True)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getConceptHotTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_6) < 0) __PYX_ERR(0, 2536, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2536, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2537
 *         ## 5
 *         self.getConceptHotTable(num_tr=6, save_file=True)
 *         self.getIndustryConceptHotFrequency(mode='concept', near_day=7, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         ## 6
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getIndustryConceptHotFrequency); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_n_s_concept) < 0) __PYX_ERR(0, 2537, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_day, __pyx_int_7) < 0) __PYX_ERR(0, 2537, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2537, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2540
 * 
 *         ## 6
 *         self.getStockHotTable(num_tr=5, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         ## 7
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockHotTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_5) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2543
 * 
 *         ## 7
 *         self.getFutureHotTable(num_tr=5, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         ## 8
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getFutureHotTable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_5) < 0) __PYX_ERR(0, 2543, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2543, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2546
 * 
 *         ## 8
 *         self.getIndexHotTable(num_tr=5, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         ## 9
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getIndexHotTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_int_5) < 0) __PYX_ERR(0, 2546, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2546, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2549
 * 
 *         ## 9
 *         self.getStockHoldNumberChangeTable(day_len=252, new_date_len=30, quantile_tr=0.1, save_file=True)             # <<<<<<<<<<<<<<
 * 
 *         self.strategy_json['updated'] = True
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockHoldNumberChangeTable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_day_len, __pyx_int_252) < 0) __PYX_ERR(0, 2549, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_new_date_len, __pyx_int_30) < 0) __PYX_ERR(0, 2549, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_quantile_tr, __pyx_float_0_1) < 0) __PYX_ERR(0, 2549, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_True) < 0) __PYX_ERR(0, 2549, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2551
 *         self.getStockHoldNumberChangeTable(day_len=252, new_date_len=30, quantile_tr=0.1, save_file=True)
 * 
 *         self.strategy_json['updated'] = True             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2552
 * 
 *         self.strategy_json['updated'] = True
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2507
 *         self.checkDatabaseTableUpdate()
 * 
 *     def getStrategyDataAndImg(self):             # <<<<<<<<<<<<<<
 * 
 *         print('use_date = ', self.use_date)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStrategyDataAndImg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_top_10_up_limit);
  __Pyx_XDECREF(__pyx_v_top_10_amplitude);
  __Pyx_XDECREF(__pyx_v_stock_wave_up_df);
  __Pyx_XDECREF(__pyx_v_stock_wave_down_df);
  __Pyx_XDECREF(__pyx_v_new_date);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict_len);
  __Pyx_XDECREF(__pyx_v_max_level);
  __Pyx_XDECREF(__pyx_v_stock_ladder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_7getStockProperty_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_7getStockProperty_ = {"getStockProperty_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_7getStockProperty_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_7getStockProperty_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_trade_day_len = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockProperty_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_trade_day_len,&__pyx_n_s_use_st_stock,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_60)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_15)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trade_day_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockProperty_") < 0)) __PYX_ERR(0, 2554, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_trade_day_len = values[1];
    __pyx_v_use_st_stock = values[2];
    __pyx_v_num_tr = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_input_codes = ((PyObject*)values[5]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockProperty_", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 2554, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 2554, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_6getStockProperty_(__pyx_self, __pyx_v_self, __pyx_v_trade_day_len, __pyx_v_use_st_stock, __pyx_v_num_tr, __pyx_v_save_file, __pyx_v_input_codes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2604
 * 
 *         #
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(row['code'], row['close'], row['pre_close']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__lambda2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__lambda2 = {"lambda2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__lambda2, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__lambda2(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2604, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda2") < 0)) __PYX_ERR(0, 2604, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2604, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2604, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isUpLimit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_3, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2615
 *         #
 *         grouped_df = grouped_df.copy()
 *         grouped_df['name'] = grouped_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 * 
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__1lambda3(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__1lambda3 = {"lambda3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__1lambda3, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__1lambda3(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2615, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda3") < 0)) __PYX_ERR(0, 2615, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2615, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda3(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda3", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2615, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_6getStockProperty_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_cur_scope;
  PyObject *__pyx_v_strategy_key_name1 = NULL;
  PyObject *__pyx_v_strategy_key_name2 = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_grouped_df = NULL;
  PyObject *__pyx_v_sorted_df = NULL;
  PyObject *__pyx_v_top_up_limit = NULL;
  PyObject *__pyx_v_top_10_up_limit_dict = NULL;
  PyObject *__pyx_v_top_amplitude = NULL;
  PyObject *__pyx_v_top_10_amplitude_dict = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockProperty_", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2554, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_INCREF(__pyx_v_input_codes);

  /* "tbstock/tradeStrategy/stockStrategy.py":2555
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):
 *         strategy_key_name1 = 'top_10_up_limit'             # <<<<<<<<<<<<<<
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 * 
 */
  __Pyx_INCREF(__pyx_n_s_top_10_up_limit);
  __pyx_v_strategy_key_name1 = __pyx_n_s_top_10_up_limit;

  /* "tbstock/tradeStrategy/stockStrategy.py":2556
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len             # <<<<<<<<<<<<<<
 * 
 *         input_codes = [] if input_codes is None else input_codes
 */
  __Pyx_INCREF(__pyx_n_s_top_10_amplitude);
  __pyx_v_strategy_key_name2 = __pyx_n_s_top_10_amplitude;

  /* "tbstock/tradeStrategy/stockStrategy.py":2558
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 * 
 *         input_codes = [] if input_codes is None else input_codes             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = (__pyx_v_input_codes == ((PyObject*)Py_None));
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2558, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_input_codes);
    __pyx_t_1 = __pyx_v_input_codes;
  }
  __Pyx_DECREF_SET(__pyx_v_input_codes, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2561
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 2561, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2562
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2562, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 2562, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2562, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2563
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_2 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2563, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_2 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_2) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2564
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2565
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2563
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2562
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2568
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2568, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name1, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2569
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_2 = __pyx_t_7;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2569, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __pyx_t_7;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_2) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2570
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_4 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name1, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_and_2);
      __pyx_t_4 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_and_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_and_2);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_4 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2570, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2571
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 2571, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11)) __PYX_ERR(0, 2571, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_11 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2569
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2568
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2573
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2574
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2577
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_2);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2578
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             print('new end_date: ', end_date)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_11, __pyx_n_s_previous};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_end_date = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2579
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)             # <<<<<<<<<<<<<<
 *         else:
 *             end_date = self.use_date
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_new_end_date);
    __Pyx_GIVEREF(__pyx_kp_s_new_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_new_end_date)) __PYX_ERR(0, 2579, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_end_date);
    __Pyx_GIVEREF(__pyx_v_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end_date)) __PYX_ERR(0, 2579, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2577
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
    goto __pyx_L16;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2581
 *             print('new end_date: ', end_date)
 *         else:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_end_date = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L16:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2582
 *         else:
 *             end_date = self.use_date
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_v_trade_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = PyNumber_Negative(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_v_end_date, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_start_date = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2585
 * 
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy('', start_date, end_date)             # <<<<<<<<<<<<<<
 *         if not res:
 *             utils.logger.error(f"Failed to getStockTradeDayInfoSqlalchemy between {start_date} to {end_date}")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_kp_s__23, __pyx_v_start_date, __pyx_v_end_date};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
    PyObject* sequence = __pyx_t_6;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 2585, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
    index = 0; __pyx_t_1 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2585, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L18_unpacking_done;
    __pyx_L17_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 2585, __pyx_L1_error)
    __pyx_L18_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_stock_data = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2586
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy('', start_date, end_date)
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to getStockTradeDayInfoSqlalchemy between {start_date} to {end_date}")
 *             return pd.DataFrame(), pd.DataFrame()
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2586, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_7);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2587
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy('', start_date, end_date)
 *         if not res:
 *             utils.logger.error(f"Failed to getStockTradeDayInfoSqlalchemy between {start_date} to {end_date}")             # <<<<<<<<<<<<<<
 *             return pd.DataFrame(), pd.DataFrame()
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_Failed_to_getStockTradeDayInfoSq);
    __pyx_t_4 += 49;
    __Pyx_GIVEREF(__pyx_kp_u_Failed_to_getStockTradeDayInfoSq);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Failed_to_getStockTradeDayInfoSq);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_start_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_kp_u_to);
    __pyx_t_4 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_to);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_to);
    __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_end_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_10;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2588
 *         if not res:
 *             utils.logger.error(f"Failed to getStockTradeDayInfoSqlalchemy between {start_date} to {end_date}")
 *             return pd.DataFrame(), pd.DataFrame()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6)) __PYX_ERR(0, 2588, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8)) __PYX_ERR(0, 2588, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_8 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2586
 *         #
 *         res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy('', start_date, end_date)
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to getStockTradeDayInfoSqlalchemy between {start_date} to {end_date}")
 *             return pd.DataFrame(), pd.DataFrame()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2591
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             stock_data = stock_data[(stock_data['code'].isin(input_codes))]
 *         else:
 */
  __pyx_t_2 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2592
 *         #
 *         if input_codes:
 *             stock_data = stock_data[(stock_data['code'].isin(input_codes))]             # <<<<<<<<<<<<<<
 *         else:
 *             #  + ST +
 */
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_input_codes};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2592, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_stock_data, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_stock_data, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2591
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             stock_data = stock_data[(stock_data['code'].isin(input_codes))]
 *         else:
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2595
 *         else:
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_exclude_codes = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2596
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys())
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             stock_data = stock_data[~stock_data['code'].isin(exclude_codes)]
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2596, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_2);
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2597
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys())
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             stock_data = stock_data[~stock_data['code'].isin(exclude_codes)]
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_exclude_codes, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2596
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys())
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             stock_data = stock_data[~stock_data['code'].isin(exclude_codes)]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2598
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             stock_data = stock_data[~stock_data['code'].isin(exclude_codes)]             # <<<<<<<<<<<<<<
 * 
 *         # pre_close == 0
 */
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_exclude_codes};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyNumber_Invert(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_stock_data, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_stock_data, __pyx_t_6);
    __pyx_t_6 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2601
 * 
 *         # pre_close == 0
 *         stock_data.loc[stock_data['pre_close'] == 0, 'pre_close'] = stock_data['close']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1)) __PYX_ERR(0, 2601, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_pre_close);
  __Pyx_GIVEREF(__pyx_n_s_pre_close);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_pre_close)) __PYX_ERR(0, 2601, __pyx_L1_error);
  __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_8, __pyx_t_6) < 0))) __PYX_ERR(0, 2601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2604
 * 
 *         #
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(row['code'], row['close'], row['pre_close']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_apply); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__lambda2, 0, __pyx_n_s_publishStrategy_getStockProperty, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 2604, __pyx_L1_error);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 2604, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_up_limit, __pyx_t_1) < 0))) __PYX_ERR(0, 2604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2605
 *         #
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(row['code'], row['close'], row['pre_close']), axis=1)
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #             # <<<<<<<<<<<<<<
 * 
 *         stock_data['upLimit_times'] = stock_data.groupby('code')['up_limit'].transform('sum')
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_high); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_low); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_float_100_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_amplitude, __pyx_t_8) < 0))) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2607
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 *         stock_data['upLimit_times'] = stock_data.groupby('code')['up_limit'].transform('sum')             # <<<<<<<<<<<<<<
 *         stock_data['average_amplitude'] = stock_data.groupby('code')['amplitude'].transform('mean')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_groupby); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_up_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_transform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_sum};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_upLimit_times, __pyx_t_8) < 0))) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2608
 * 
 *         stock_data['upLimit_times'] = stock_data.groupby('code')['up_limit'].transform('sum')
 *         stock_data['average_amplitude'] = stock_data.groupby('code')['amplitude'].transform('mean')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_groupby); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_amplitude); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_transform); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_mean};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_average_amplitude, __pyx_t_8) < 0))) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2611
 * 
 *         #
 *         grouped_df = stock_data[stock_data['date'] == end_date]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_date); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_8, __pyx_v_end_date, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_stock_data, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_grouped_df = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2614
 * 
 *         #
 *         grouped_df = grouped_df.copy()             # <<<<<<<<<<<<<<
 *         grouped_df['name'] = grouped_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grouped_df, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_grouped_df, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2615
 *         #
 *         grouped_df = grouped_df.copy()
 *         grouped_df['name'] = grouped_df.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_grouped_df, __pyx_n_s_apply); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getStockProperty__1lambda3, 0, __pyx_n_s_publishStrategy_getStockProperty, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 2615, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_grouped_df, __pyx_n_s_name, __pyx_t_6) < 0))) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2618
 * 
 *         #
 *         grouped_df = grouped_df[['name', 'code', 'upLimit_times', 'average_amplitude']]             # <<<<<<<<<<<<<<
 *         grouped_df.set_index('name', inplace=True)
 * 
 */
  __pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_name)) __PYX_ERR(0, 2618, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_code)) __PYX_ERR(0, 2618, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2618, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2618, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_grouped_df, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_grouped_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2619
 *         #
 *         grouped_df = grouped_df[['name', 'code', 'upLimit_times', 'average_amplitude']]
 *         grouped_df.set_index('name', inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grouped_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2619, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__122, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2621
 *         grouped_df.set_index('name', inplace=True)
 * 
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])             # <<<<<<<<<<<<<<
 *         if num_tr > 1:
 *             top_up_limit = sorted_df.head(num_tr)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_grouped_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2621, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2621, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_by, __pyx_t_1) < 0) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_False)) __PYX_ERR(0, 2621, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, Py_False)) __PYX_ERR(0, 2621, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ascending, __pyx_t_1) < 0) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_sorted_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2622
 * 
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_num_tr, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2623
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:
 *             top_up_limit = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_num_tr};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_top_up_limit = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2622
 * 
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 */
    goto __pyx_L22;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2625
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]             # <<<<<<<<<<<<<<
 *         top_10_up_limit_dict = top_up_limit.to_dict()
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_sorted_df, __pyx_n_s_upLimit_times); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2625, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sorted_df, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_top_up_limit = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L22:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2626
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]
 *         top_10_up_limit_dict = top_up_limit.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         sorted_df = grouped_df.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_up_limit, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_top_10_up_limit_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2628
 *         top_10_up_limit_dict = top_up_limit.to_dict()
 * 
 *         sorted_df = grouped_df.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])             # <<<<<<<<<<<<<<
 *         if num_tr > 1:
 *             top_amplitude = sorted_df.head(num_tr)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_grouped_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2628, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2628, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_by, __pyx_t_3) < 0) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(0, 2628, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 2628, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_ascending, __pyx_t_3) < 0) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_sorted_df, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2629
 * 
 *         sorted_df = grouped_df.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_num_tr, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2629, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2630
 *         sorted_df = grouped_df.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:
 *             top_amplitude = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_num_tr};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_top_amplitude = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2629
 * 
 *         sorted_df = grouped_df.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 */
    goto __pyx_L23;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2632
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]             # <<<<<<<<<<<<<<
 *         top_10_amplitude_dict = top_amplitude.to_dict()
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_sorted_df, __pyx_n_s_average_amplitude); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_float_5_0, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2632, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sorted_df, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_top_amplitude = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L23:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2633
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]
 *         top_10_amplitude_dict = top_amplitude.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_amplitude, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_top_10_amplitude_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2636
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2636, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2637
 *         # json
 *         if save_file:
 *             top_10_up_limit_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_up_limit_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2637, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2638
 *         if save_file:
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_up_limit_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2638, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2639
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_amplitude_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2639, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2640
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_amplitude_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2640, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2641
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 *             self.dumpJsonToFile()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_strategy_key_name1, __pyx_v_top_10_up_limit_dict) < 0))) __PYX_ERR(0, 2641, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2642
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_strategy_key_name2, __pyx_v_top_10_amplitude_dict) < 0))) __PYX_ERR(0, 2642, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2643
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *         return top_up_limit, top_amplitude
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2636
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2645
 *             self.dumpJsonToFile()
 * 
 *         return top_up_limit, top_amplitude             # <<<<<<<<<<<<<<
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_top_up_limit);
  __Pyx_GIVEREF(__pyx_v_top_up_limit);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_top_up_limit)) __PYX_ERR(0, 2645, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_top_amplitude);
  __Pyx_GIVEREF(__pyx_v_top_amplitude);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_top_amplitude)) __PYX_ERR(0, 2645, __pyx_L1_error);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name1);
  __Pyx_XDECREF(__pyx_v_strategy_key_name2);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_grouped_df);
  __Pyx_XDECREF(__pyx_v_sorted_df);
  __Pyx_XDECREF(__pyx_v_top_up_limit);
  __Pyx_XDECREF(__pyx_v_top_10_up_limit_dict);
  __Pyx_XDECREF(__pyx_v_top_amplitude);
  __Pyx_XDECREF(__pyx_v_top_10_amplitude_dict);
  __Pyx_XDECREF(__pyx_v_input_codes);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_9stockSingleStockProperty(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_9stockSingleStockProperty = {"stockSingleStockProperty", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_9stockSingleStockProperty, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_9stockSingleStockProperty(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stockSingleStockProperty (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_stock_name,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_multi_type,0};
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("stockSingleStockProperty", 0, 5, 6, 1); __PYX_ERR(0, 2647, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("stockSingleStockProperty", 0, 5, 6, 2); __PYX_ERR(0, 2647, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("stockSingleStockProperty", 0, 5, 6, 3); __PYX_ERR(0, 2647, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("stockSingleStockProperty", 0, 5, 6, 4); __PYX_ERR(0, 2647, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2647, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "stockSingleStockProperty") < 0)) __PYX_ERR(0, 2647, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_stock_name = values[2];
    __pyx_v_start_date = values[3];
    __pyx_v_end_date = values[4];
    __pyx_v_multi_type = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stockSingleStockProperty", 0, 5, 6, __pyx_nargs); __PYX_ERR(0, 2647, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.stockSingleStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_8stockSingleStockProperty(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2663
 *         stock_data.loc[stock_data['pre_close'] == 0, 'pre_close'] = stock_data['close']
 * 
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(stock_code, row['close'], row['pre_close']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24stockSingleStockProperty_lambda4(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24stockSingleStockProperty_lambda4 = {"lambda4", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24stockSingleStockProperty_lambda4, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24stockSingleStockProperty_lambda4(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2663, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda4") < 0)) __PYX_ERR(0, 2663, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda4", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2663, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.stockSingleStockProperty.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda4(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda4(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda4", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2663, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isUpLimit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_stock_code)) { __Pyx_RaiseClosureNameError("stock_code"); __PYX_ERR(0, 2663, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_stock_code, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.stockSingleStockProperty.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_8stockSingleStockProperty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_multi_type) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *__pyx_cur_scope;
  PyObject *__pyx_v_engine = NULL;
  PyObject *__pyx_v_session = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_upLimit_times = NULL;
  PyObject *__pyx_v_average_amplitude = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stockSingleStockProperty", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2647, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_stock_code = __pyx_v_stock_code;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stock_code);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stock_code);

  /* "tbstock/tradeStrategy/stockStrategy.py":2648
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2648, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2649
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()             # <<<<<<<<<<<<<<
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)
 *             session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2649, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2649, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2649, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_session = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2650
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)             # <<<<<<<<<<<<<<
 *             session.remove()
 *             engine.dispose()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_session};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2650, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2650, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2650, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2651
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)
 *             session.remove()             # <<<<<<<<<<<<<<
 *             engine.dispose()
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2652
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)
 *             session.remove()
 *             engine.dispose()             # <<<<<<<<<<<<<<
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2648
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date, session)
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2654
 *             engine.dispose()
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date)             # <<<<<<<<<<<<<<
 * 
 *         if not res:
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2654, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2654, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2654, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2654, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2654, __pyx_L1_error)
      __pyx_L9_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2656
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoSqlalchemy.")
 *             return {'code': stock_code, 'name': stock_name, 'upLimit_times': 0, 'average_amplitude': 0}
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2656, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_1);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2657
 * 
 *         if not res:
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoSqlalchemy.")             # <<<<<<<<<<<<<<
 *             return {'code': stock_code, 'name': stock_name, 'upLimit_times': 0, 'average_amplitude': 0}
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__21);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__21);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__21);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_failed_to_getStockTradeDayInfoS);
    __pyx_t_9 += 42;
    __Pyx_GIVEREF(__pyx_kp_u_failed_to_getStockTradeDayInfoS);
    PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_failed_to_getStockTradeDayInfoS);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2658
 *         if not res:
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoSqlalchemy.")
 *             return {'code': stock_code, 'name': stock_name, 'upLimit_times': 0, 'average_amplitude': 0}             # <<<<<<<<<<<<<<
 * 
 *         # pre_close == 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_upLimit_times, __pyx_int_0) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_average_amplitude, __pyx_int_0) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2656
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}:{stock_name} failed to getStockTradeDayInfoSqlalchemy.")
 *             return {'code': stock_code, 'name': stock_name, 'upLimit_times': 0, 'average_amplitude': 0}
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2661
 * 
 *         # pre_close == 0
 *         stock_data.loc[stock_data['pre_close'] == 0, 'pre_close'] = stock_data['close']             # <<<<<<<<<<<<<<
 * 
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(stock_code, row['close'], row['pre_close']), axis=1)
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_pre_close);
  __Pyx_GIVEREF(__pyx_n_s_pre_close);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_pre_close)) __PYX_ERR(0, 2661, __pyx_L1_error);
  __pyx_t_3 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_t_6, __pyx_t_2) < 0))) __PYX_ERR(0, 2661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2663
 *         stock_data.loc[stock_data['pre_close'] == 0, 'pre_close'] = stock_data['close']
 * 
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(stock_code, row['close'], row['pre_close']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24stockSingleStockProperty_lambda4, 0, __pyx_n_s_publishStrategy_stockSingleStock, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 2663, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_up_limit, __pyx_t_3) < 0))) __PYX_ERR(0, 2663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2664
 * 
 *         stock_data['up_limit'] = stock_data.apply(lambda row: self.isUpLimit(stock_code, row['close'], row['pre_close']), axis=1)
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #             # <<<<<<<<<<<<<<
 * 
 *         upLimit_times = stock_data['up_limit'].sum()
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_high); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_low); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_float_100_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_data, __pyx_n_s_amplitude, __pyx_t_6) < 0))) __PYX_ERR(0, 2664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2666
 *         stock_data['amplitude'] = (stock_data['high'] - stock_data['low']) / stock_data['pre_close'] * 100.0  #
 * 
 *         upLimit_times = stock_data['up_limit'].sum()             # <<<<<<<<<<<<<<
 *         average_amplitude = stock_data['amplitude'].sum() / stock_data.shape[0]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_up_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_upLimit_times = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2667
 * 
 *         upLimit_times = stock_data['up_limit'].sum()
 *         average_amplitude = stock_data['amplitude'].sum() / stock_data.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'upLimit_times': upLimit_times,
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_data, __pyx_n_s_amplitude); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_average_amplitude = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2669
 *         average_amplitude = stock_data['amplitude'].sum() / stock_data.shape[0]
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'upLimit_times': upLimit_times,             # <<<<<<<<<<<<<<
 *                       'average_amplitude': average_amplitude}
 *         return new_record
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2669, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 2669, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_upLimit_times, __pyx_v_upLimit_times) < 0) __PYX_ERR(0, 2669, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2670
 * 
 *         new_record = {'code': stock_code, 'name': stock_name, 'upLimit_times': upLimit_times,
 *                       'average_amplitude': average_amplitude}             # <<<<<<<<<<<<<<
 *         return new_record
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_average_amplitude, __pyx_v_average_amplitude) < 0) __PYX_ERR(0, 2669, __pyx_L1_error)
  __pyx_v_new_record = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2671
 *         new_record = {'code': stock_code, 'name': stock_name, 'upLimit_times': upLimit_times,
 *                       'average_amplitude': average_amplitude}
 *         return new_record             # <<<<<<<<<<<<<<
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_new_record);
  __pyx_r = __pyx_v_new_record;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.stockSingleStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_engine);
  __Pyx_XDECREF(__pyx_v_session);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_upLimit_times);
  __Pyx_XDECREF(__pyx_v_average_amplitude);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2673
 *         return new_record
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                          input_codes: list = None):
 *         '''
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_11getStockProperty(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_10getStockProperty, "\n        \346\240\271\346\215\256\350\202\241\346\200\247\351\200\211\350\202\241\n        - \346\240\271\346\215\256\346\234\200\350\277\2212\344\270\252\346\234\210\347\232\204\346\266\250\345\201\234\346\254\241\346\225\260\n        - \346\240\271\346\215\256\346\234\200\350\277\2212\344\270\252\346\234\210\346\214\257\345\271\205\346\216\222\345\220\215\n        :param trade_day_len:\n        :param use_st_stock:\n        :param multi_thread:\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_11getStockProperty = {"getStockProperty", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_11getStockProperty, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_10getStockProperty};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_11getStockProperty(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_trade_day_len = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockProperty (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_trade_day_len,&__pyx_n_s_use_st_stock,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,&__pyx_n_s_multi_type,&__pyx_n_s_workers,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_60)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_15)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_thread)));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));

    /* "tbstock/tradeStrategy/stockStrategy.py":2674
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,
 *                          input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trade_day_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2673, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockProperty") < 0)) __PYX_ERR(0, 2673, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_trade_day_len = values[1];
    __pyx_v_use_st_stock = values[2];
    __pyx_v_num_tr = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_multi_type = values[5];
    __pyx_v_workers = values[6];
    __pyx_v_input_codes = ((PyObject*)values[7]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockProperty", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 2673, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 2674, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_10getStockProperty(__pyx_self, __pyx_v_self, __pyx_v_trade_day_len, __pyx_v_use_st_stock, __pyx_v_num_tr, __pyx_v_save_file, __pyx_v_multi_type, __pyx_v_workers, __pyx_v_input_codes);

  /* "tbstock/tradeStrategy/stockStrategy.py":2673
 *         return new_record
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                          input_codes: list = None):
 *         '''
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_10getStockProperty(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_strategy_key_name1 = NULL;
  PyObject *__pyx_v_strategy_key_name2 = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_update_range_dict = NULL;
  PyObject *__pyx_v_stock_tmp = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_sorted_df = NULL;
  PyObject *__pyx_v_top_up_limit = NULL;
  PyObject *__pyx_v_top_10_up_limit_dict = NULL;
  PyObject *__pyx_v_top_amplitude = NULL;
  PyObject *__pyx_v_top_10_amplitude_dict = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr14__pyx_v_code = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockProperty", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":2685
 *         :return:
 *         '''
 *         strategy_key_name1 = 'top_10_up_limit'             # <<<<<<<<<<<<<<
 *         strategy_key_name2 = 'top_10_amplitude'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_top_10_up_limit);
  __pyx_v_strategy_key_name1 = __pyx_n_s_top_10_up_limit;

  /* "tbstock/tradeStrategy/stockStrategy.py":2686
 *         '''
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_top_10_amplitude);
  __pyx_v_strategy_key_name2 = __pyx_n_s_top_10_amplitude;

  /* "tbstock/tradeStrategy/stockStrategy.py":2689
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 2689, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2690
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2690, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2690, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2691
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2691, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2692
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2693
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2691
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2690
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2696
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2696, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name1, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2696, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2697
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {
    } else {
      __pyx_t_4 = __pyx_t_7;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2697, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_7;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2698
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name1, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_and_2);
      __pyx_t_2 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_and_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_and_2);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name2, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2698, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2699
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 2699, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11)) __PYX_ERR(0, 2699, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_11 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2697
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2696
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2701
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2702
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2705
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_4);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2706
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             print('new end_date: ', end_date)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_11, __pyx_n_s_previous};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_end_date = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2707
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)             # <<<<<<<<<<<<<<
 *         else:
 *             end_date = self.use_date
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_new_end_date);
    __Pyx_GIVEREF(__pyx_kp_s_new_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_new_end_date)) __PYX_ERR(0, 2707, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_end_date);
    __Pyx_GIVEREF(__pyx_v_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end_date)) __PYX_ERR(0, 2707, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2705
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
    goto __pyx_L16;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2709
 *             print('new end_date: ', end_date)
 *         else:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_end_date = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L16:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2710
 *         else:
 *             end_date = self.use_date
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_v_trade_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = PyNumber_Negative(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_v_end_date, __pyx_t_8};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_start_date = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2713
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
  __pyx_t_7 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2714
 *         #
 *         if input_codes:
 *             update_range = input_codes  #             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
    __Pyx_INCREF(__pyx_v_input_codes);
    __pyx_v_update_range = __pyx_v_input_codes;

    /* "tbstock/tradeStrategy/stockStrategy.py":2713
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             update_range = input_codes  #
 *         else:
 */
    goto __pyx_L17;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2717
 *         else:
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *             update_range = all_stock_simple_info['code'].to_list()
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_all_stock_simple_info = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2718
 *             #
 *             all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *             update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 * 
 *             #  + ST +
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_update_range = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2721
 * 
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list             # <<<<<<<<<<<<<<
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_exclude_codes = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2722
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2722, __pyx_L1_error)
    __pyx_t_4 = (!__pyx_t_7);
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2723
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2722
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2724
 *             if not use_st_stock:
 *                 exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 *             update_range = [x for x in update_range if x not in exclude_codes]             # <<<<<<<<<<<<<<
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2724, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
        __pyx_t_6 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_2 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2724, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2724, __pyx_L21_error)
      }
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2724, __pyx_L21_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2724, __pyx_L21_error)
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2724, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2724, __pyx_L21_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2724, __pyx_L21_error)
            #else
            __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2724, __pyx_L21_error)
            __Pyx_GOTREF(__pyx_t_8);
            #endif
          }
        } else {
          __pyx_t_8 = __pyx_t_13(__pyx_t_6);
          if (unlikely(!__pyx_t_8)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2724, __pyx_L21_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_8);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_x, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr13__pyx_v_x, __pyx_v_exclude_codes, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2724, __pyx_L21_error)
        if (__pyx_t_4) {
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr13__pyx_v_x))) __PYX_ERR(0, 2724, __pyx_L21_error)
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_x); __pyx_9genexpr13__pyx_v_x = 0;
      goto __pyx_L26_exit_scope;
      __pyx_L21_error:;
      __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_x); __pyx_9genexpr13__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L26_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L17:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2726
 *             update_range = [x for x in update_range if x not in exclude_codes]
 * 
 *         update_range_dict = {code: self.getStockNameByCode(code) for code in update_range}             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L29_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_6 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2726, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2726, __pyx_L29_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2726, __pyx_L29_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2726, __pyx_L29_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2726, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2726, __pyx_L29_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2726, __pyx_L29_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2726, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_13(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2726, __pyx_L29_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_code, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2726, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr14__pyx_v_code};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2726, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr14__pyx_v_code, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 2726, __pyx_L29_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_code); __pyx_9genexpr14__pyx_v_code = 0;
    goto __pyx_L33_exit_scope;
    __pyx_L29_error:;
    __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_code); __pyx_9genexpr14__pyx_v_code = 0;
    goto __pyx_L1_error;
    __pyx_L33_exit_scope:;
  } /* exit inner scope */
  __pyx_v_update_range_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2729
 * 
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'upLimit_times', 'average_amplitude'])             # <<<<<<<<<<<<<<
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_code)) __PYX_ERR(0, 2729, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_name)) __PYX_ERR(0, 2729, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2729, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2729, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_columns, __pyx_t_8) < 0) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_tmp = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2730
 *         #
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'upLimit_times', 'average_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 */
  __pyx_t_8 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__108); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_v_multi_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_desc_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2731
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'upLimit_times', 'average_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2731, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2732
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_update_range_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)) __PYX_ERR(0, 2732, __pyx_L1_error);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
    __pyx_t_2 = PyDict_Size(__pyx_v_update_range_dict); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2732, __pyx_L1_error)
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_total, __pyx_t_3) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2732, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8);
      __pyx_t_2 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2732, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2732, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2732, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2732, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2732, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2732, __pyx_L1_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2732, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2732, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_13(__pyx_t_8);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2732, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2732, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2732, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L37_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L37_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_11), 2) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L38_unpacking_done;
        __pyx_L37_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2732, __pyx_L1_error)
        __pyx_L38_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2733
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stockSingleStockProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_6, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 5+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2733, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2734
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2734, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely((__Pyx_SetItemInt(__pyx_t_3, __pyx_t_9, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2734, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2732
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):             # <<<<<<<<<<<<<<
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2731
 *         stock_tmp = pd.DataFrame(columns=['code', 'name', 'upLimit_times', 'average_amplitude'])
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             for stock_code, stock_name in tqdm(update_range_dict.items(), desc=desc_name, total=len(update_range_dict)):
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 */
    goto __pyx_L34;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2735
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2735, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2736
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2736, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2736, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2736, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2736, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_8;
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2737
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 */
            __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2737, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_v_futures = ((PyObject*)__pyx_t_8);
            __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2738
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_2 = 0;
            __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_19)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2738, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_XDECREF(__pyx_t_8);
            __pyx_t_8 = __pyx_t_1;
            __pyx_t_1 = 0;
            while (1) {
              __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_9, &__pyx_t_2, &__pyx_t_1, &__pyx_t_3, NULL, __pyx_t_19);
              if (unlikely(__pyx_t_20 == 0)) break;
              if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 2738, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
              __pyx_t_1 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2739
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2739, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stockSingleStockProperty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2739, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_11 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[7] = {__pyx_t_11, __pyx_t_6, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 6+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2739, __pyx_L44_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2740
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #
 */
              __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 2740, __pyx_L44_error)
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2741
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
            __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_6 = NULL;
            __pyx_t_12 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_12 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L44_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2741, __pyx_L44_error)
            __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2741, __pyx_L44_error)
            __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_6) < 0) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2741, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
              __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_9 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2741, __pyx_L44_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2741, __pyx_L44_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2741, __pyx_L44_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2741, __pyx_L44_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2741, __pyx_L44_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 2741, __pyx_L44_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2741, __pyx_L44_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                }
              } else {
                __pyx_t_6 = __pyx_t_13(__pyx_t_3);
                if (unlikely(!__pyx_t_6)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2741, __pyx_L44_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_6);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2742
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2742, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_8 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
                __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2742, __pyx_L44_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2743
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
              __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2743, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2743, __pyx_L44_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2743, __pyx_L44_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely((__Pyx_SetItemInt(__pyx_t_6, __pyx_t_2, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2743, __pyx_L44_error)
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2741
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2736
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L49_try_end;
          __pyx_L44_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 2736, __pyx_L46_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_8 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2736, __pyx_L46_except_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2736, __pyx_L46_except_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            if (__pyx_t_4 < 0) __PYX_ERR(0, 2736, __pyx_L46_except_error)
            __pyx_t_7 = (!__pyx_t_4);
            if (unlikely(__pyx_t_7)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_6, __pyx_t_1);
              __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 2736, __pyx_L46_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L45_exception_handled;
          }
          __pyx_L46_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          goto __pyx_L1_error;
          __pyx_L45_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_L49_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_15) {
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2736, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          goto __pyx_L43;
        }
        __pyx_L43:;
      }
      goto __pyx_L58;
      __pyx_L40_error:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L1_error;
      __pyx_L58:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2735
 *                 new_record = self.stockSingleStockProperty(stock_code, stock_name, start_date, end_date, multi_type)
 *                 stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L34;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2744
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2744, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2745
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2745, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2745, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L59_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2745, __pyx_L59_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2746
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2746, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_v_futures = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2747
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = 0;
            __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_update_range_dict, 1, __pyx_n_s_items, (&__pyx_t_2), (&__pyx_t_19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2747, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_XDECREF(__pyx_t_1);
            __pyx_t_1 = __pyx_t_3;
            __pyx_t_3 = 0;
            while (1) {
              __pyx_t_20 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_2, &__pyx_t_9, &__pyx_t_3, &__pyx_t_6, NULL, __pyx_t_19);
              if (unlikely(__pyx_t_20 == 0)) break;
              if (unlikely(__pyx_t_20 == -1)) __PYX_ERR(0, 2747, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2748
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2748, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stockSingleStockProperty); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2748, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_11 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[7] = {__pyx_t_11, __pyx_t_8, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_multi_type};
                __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 6+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
                if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2748, __pyx_L63_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_6);
              __pyx_t_6 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2749
 *                 for stock_code, stock_name in update_range_dict.items():
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #
 */
              __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 2749, __pyx_L63_error)
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2750
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_8 = NULL;
            __pyx_t_12 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_8)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_8);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_12 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_futures};
              __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2750, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_6);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(0, 2750, __pyx_L63_error);
            __pyx_t_6 = 0;
            __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2750, __pyx_L63_error)
            __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2750, __pyx_L63_error)
            __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_8);
            if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_total, __pyx_t_8) < 0) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2750, __pyx_L63_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
              __pyx_t_6 = __pyx_t_8; __Pyx_INCREF(__pyx_t_6);
              __pyx_t_2 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2750, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2750, __pyx_L63_error)
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_6))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2750, __pyx_L63_error)
                    #endif
                    if (__pyx_t_2 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2750, __pyx_L63_error)
                  #else
                  __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2750, __pyx_L63_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2750, __pyx_L63_error)
                    #endif
                    if (__pyx_t_2 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2750, __pyx_L63_error)
                  #else
                  __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2750, __pyx_L63_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  #endif
                }
              } else {
                __pyx_t_8 = __pyx_t_13(__pyx_t_6);
                if (unlikely(!__pyx_t_8)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2750, __pyx_L63_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_8);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2751
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = NULL;
              __pyx_t_12 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_12 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
                __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2751, __pyx_L63_error)
                __Pyx_GOTREF(__pyx_t_8);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_new_record, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2752
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record             # <<<<<<<<<<<<<<
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 */
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2752, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L63_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_9 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2752, __pyx_L63_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely((__Pyx_SetItemInt(__pyx_t_8, __pyx_t_9, __pyx_v_new_record, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 2752, __pyx_L63_error)
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2750
 *                     future = executor.submit(self.stockSingleStockProperty, stock_code, stock_name, start_date, end_date, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 */
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2745
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
          }
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L68_try_end;
          __pyx_L63_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 2745, __pyx_L65_except_error)
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_3);
            __pyx_t_1 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2745, __pyx_L65_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2745, __pyx_L65_except_error)
            __Pyx_GOTREF(__pyx_t_22);
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
            if (__pyx_t_7 < 0) __PYX_ERR(0, 2745, __pyx_L65_except_error)
            __pyx_t_4 = (!__pyx_t_7);
            if (unlikely(__pyx_t_4)) {
              __Pyx_GIVEREF(__pyx_t_6);
              __Pyx_GIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_3);
              __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_8, __pyx_t_3);
              __pyx_t_6 = 0; __pyx_t_8 = 0; __pyx_t_3 = 0; 
              __PYX_ERR(0, 2745, __pyx_L65_except_error)
            }
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L64_exception_handled;
          }
          __pyx_L65_except_error:;
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L64_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_17, __pyx_t_16);
          __pyx_L68_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_15) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2745, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L62;
        }
        __pyx_L62:;
      }
      goto __pyx_L77;
      __pyx_L59_error:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L1_error;
      __pyx_L77:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2744
 *                     new_record = future.result()  #
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L34:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2754
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)             # <<<<<<<<<<<<<<
 *         sorted_df = stock_tmp.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_set_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_keys, __pyx_n_s_name) < 0) __PYX_ERR(0, 2754, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2754, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2755
 * 
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         sorted_df = stock_tmp.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])             # <<<<<<<<<<<<<<
 *         if num_tr > 1:
 *             top_up_limit = sorted_df.head(num_tr)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2755, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2755, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_by, __pyx_t_3) < 0) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, Py_False)) __PYX_ERR(0, 2755, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, Py_False)) __PYX_ERR(0, 2755, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ascending, __pyx_t_3) < 0) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_v_sorted_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2756
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         sorted_df = stock_tmp.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_num_tr, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2756, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2757
 *         sorted_df = stock_tmp.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:
 *             top_up_limit = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_num_tr};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_v_top_up_limit = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2756
 *         stock_tmp.set_index(keys='name', inplace=True)
 *         sorted_df = stock_tmp.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 */
    goto __pyx_L78;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2759
 *             top_up_limit = sorted_df.head(num_tr)
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]             # <<<<<<<<<<<<<<
 *         top_10_up_limit_dict = top_up_limit.to_dict()
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_sorted_df, __pyx_n_s_upLimit_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sorted_df, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_top_up_limit = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L78:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2760
 *         else:
 *             top_up_limit = sorted_df[sorted_df['upLimit_times'] >= 1]
 *         top_10_up_limit_dict = top_up_limit.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         sorted_df = stock_tmp.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_up_limit, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_v_top_10_up_limit_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2762
 *         top_10_up_limit_dict = top_up_limit.to_dict()
 * 
 *         sorted_df = stock_tmp.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])             # <<<<<<<<<<<<<<
 *         if num_tr > 1:
 *             top_amplitude = sorted_df.head(num_tr)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_tmp, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_average_amplitude);
  __Pyx_GIVEREF(__pyx_n_s_average_amplitude);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_average_amplitude)) __PYX_ERR(0, 2762, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_upLimit_times);
  __Pyx_GIVEREF(__pyx_n_s_upLimit_times);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_upLimit_times)) __PYX_ERR(0, 2762, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_by, __pyx_t_6) < 0) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(0, 2762, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(0, 2762, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ascending, __pyx_t_6) < 0) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF_SET(__pyx_v_sorted_df, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2763
 * 
 *         sorted_df = stock_tmp.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 */
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_num_tr, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2763, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2764
 *         sorted_df = stock_tmp.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:
 *             top_amplitude = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_num_tr};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_v_top_amplitude = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2763
 * 
 *         sorted_df = stock_tmp.sort_values(by=['average_amplitude', 'upLimit_times'], ascending=[False, False])
 *         if num_tr > 1:             # <<<<<<<<<<<<<<
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 */
    goto __pyx_L79;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2766
 *             top_amplitude = sorted_df.head(num_tr)
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]             # <<<<<<<<<<<<<<
 *         top_10_amplitude_dict = top_amplitude.to_dict()
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_sorted_df, __pyx_n_s_average_amplitude); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_6, __pyx_float_5_0, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2766, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_sorted_df, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_top_amplitude = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L79:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2767
 *         else:
 *             top_amplitude = sorted_df[sorted_df['average_amplitude'] >= 5.0]
 *         top_10_amplitude_dict = top_amplitude.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_top_amplitude, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_v_top_10_amplitude_dict = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2770
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2770, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2771
 *         # json
 *         if save_file:
 *             top_10_up_limit_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_up_limit_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2771, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2772
 *         if save_file:
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_up_limit_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2772, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2773
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_amplitude_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2773, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2774
 *             top_10_up_limit_dict['updated'] = True
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_top_10_amplitude_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2774, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2775
 *             top_10_amplitude_dict['day_len'] = trade_day_len
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 *             self.dumpJsonToFile()
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_v_strategy_key_name1, __pyx_v_top_10_up_limit_dict) < 0))) __PYX_ERR(0, 2775, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2776
 *             top_10_amplitude_dict['updated'] = True
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely((PyObject_SetItem(__pyx_t_6, __pyx_v_strategy_key_name2, __pyx_v_top_10_amplitude_dict) < 0))) __PYX_ERR(0, 2776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2777
 *             self.strategy_json[strategy_key_name1] = top_10_up_limit_dict
 *             self.strategy_json[strategy_key_name2] = top_10_amplitude_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *         return top_up_limit, top_amplitude
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2770
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             top_10_up_limit_dict['day_len'] = trade_day_len
 *             top_10_up_limit_dict['updated'] = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2779
 *             self.dumpJsonToFile()
 * 
 *         return top_up_limit, top_amplitude             # <<<<<<<<<<<<<<
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_top_up_limit);
  __Pyx_GIVEREF(__pyx_v_top_up_limit);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_top_up_limit)) __PYX_ERR(0, 2779, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_top_amplitude);
  __Pyx_GIVEREF(__pyx_v_top_amplitude);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_top_amplitude)) __PYX_ERR(0, 2779, __pyx_L1_error);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2673
 *         return new_record
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                          input_codes: list = None):
 *         '''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockProperty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name1);
  __Pyx_XDECREF(__pyx_v_strategy_key_name2);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_update_range_dict);
  __Pyx_XDECREF(__pyx_v_stock_tmp);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_sorted_df);
  __Pyx_XDECREF(__pyx_v_top_up_limit);
  __Pyx_XDECREF(__pyx_v_top_10_up_limit_dict);
  __Pyx_XDECREF(__pyx_v_top_amplitude);
  __Pyx_XDECREF(__pyx_v_top_10_amplitude_dict);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_13getStockWavePriceRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_12getStockWavePriceRatio, "\n\n        :param trade_day_len:\n        :param use_st_stock:\n        :param num_tr:\n        :param save_file:\n        :param max_depth:\n        :param multi_thread:\n        :param workers:\n        :param multi_type: 'single'->\345\215\225\347\272\277\347\250\213; 'thread'->\345\244\232\347\272\277\347\250\213; 'process'->\345\244\232\350\277\233\347\250\213\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_13getStockWavePriceRatio = {"getStockWavePriceRatio", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_13getStockWavePriceRatio, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_12getStockWavePriceRatio};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_13getStockWavePriceRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_trade_day_len = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  PyObject *__pyx_v_max_depth = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[8] = {0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockWavePriceRatio (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_trade_day_len,&__pyx_n_s_use_st_stock,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,&__pyx_n_s_multi_type,&__pyx_n_s_workers,&__pyx_n_s_max_depth,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_60)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_15)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_process)));
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_1)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trade_day_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_depth);
          if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockWavePriceRatio") < 0)) __PYX_ERR(0, 2781, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_trade_day_len = values[1];
    __pyx_v_use_st_stock = values[2];
    __pyx_v_num_tr = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_multi_type = values[5];
    __pyx_v_workers = values[6];
    __pyx_v_max_depth = values[7];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockWavePriceRatio", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 2781, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_12getStockWavePriceRatio(__pyx_self, __pyx_v_self, __pyx_v_trade_day_len, __pyx_v_use_st_stock, __pyx_v_num_tr, __pyx_v_save_file, __pyx_v_multi_type, __pyx_v_workers, __pyx_v_max_depth);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2883
 *         sorted_df = stock_wave_up_df.sort_values(by='wave_ratio', ascending=False, ignore_index=True)
 *         stock_wave_up = sorted_df.head(num_tr)
 *         stock_wave_up.index = stock_wave_up.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_wave_up_dict = stock_wave_up.to_dict()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_lambda5(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_lambda5 = {"lambda5", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_lambda5, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_lambda5(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2883, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda5") < 0)) __PYX_ERR(0, 2883, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda5", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2883, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda5(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda5", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2883, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2889
 *         sorted_df = stock_wave_down_df.sort_values(by='wave_ratio', ascending=True, ignore_index=True)
 *         stock_wave_down = sorted_df.head(num_tr)
 *         stock_wave_down.index = stock_wave_down.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_wave_down_dict = stock_wave_down.to_dict()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_1lambda6(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_1lambda6 = {"lambda6", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_1lambda6, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_1lambda6(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_row = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_row)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2889, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda6") < 0)) __PYX_ERR(0, 2889, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_row = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda6", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2889, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda6(__pyx_self, __pyx_v_row);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda6(PyObject *__pyx_self, PyObject *__pyx_v_row) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda6", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2889, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_12getStockWavePriceRatio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_trade_day_len, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers, PyObject *__pyx_v_max_depth) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_cur_scope;
  PyObject *__pyx_v_strategy_key_name1 = NULL;
  PyObject *__pyx_v_strategy_key_name2 = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_key_list = NULL;
  PyObject *__pyx_v_stock_wave_down_dict = NULL;
  PyObject *__pyx_v_stock_wave_up_dict = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_wave_up_ratio_record = NULL;
  PyObject *__pyx_v_wave_down_ratio_record = NULL;
  PyObject *__pyx_v_list_item = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_stock_wave_up_df = NULL;
  PyObject *__pyx_v_sorted_df = NULL;
  PyObject *__pyx_v_stock_wave_up = NULL;
  PyObject *__pyx_v_stock_wave_down_df = NULL;
  PyObject *__pyx_v_stock_wave_down = NULL;
  PyObject *__pyx_9genexpr15__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr16__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *(*__pyx_t_15)(PyObject *);
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockWavePriceRatio", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2781, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "tbstock/tradeStrategy/stockStrategy.py":2794
 *         :return:
 *         '''
 *         strategy_key_name1 = 'stock_wave_up'             # <<<<<<<<<<<<<<
 *         strategy_key_name2 = 'stock_wave_down'
 *         fun_name = sys._getframe().f_code.co_name
 */
  __Pyx_INCREF(__pyx_n_s_stock_wave_up);
  __pyx_v_strategy_key_name1 = __pyx_n_s_stock_wave_up;

  /* "tbstock/tradeStrategy/stockStrategy.py":2795
 *         '''
 *         strategy_key_name1 = 'stock_wave_up'
 *         strategy_key_name2 = 'stock_wave_down'             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_wave_down);
  __pyx_v_strategy_key_name2 = __pyx_n_s_stock_wave_down;

  /* "tbstock/tradeStrategy/stockStrategy.py":2796
 *         strategy_key_name1 = 'stock_wave_up'
 *         strategy_key_name2 = 'stock_wave_down'
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2799
 * 
 *         #
 *         if multi_type not in ['single', 'thread', 'process']:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"multi_type parameter set wrong.")
 * 
 */
  __Pyx_INCREF(__pyx_v_multi_type);
  __pyx_t_1 = __pyx_v_multi_type;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_single, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2799, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_thread, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2799, __pyx_L1_error)
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_process, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2799, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_5;
  if (unlikely(__pyx_t_6)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2800
 *         #
 *         if multi_type not in ['single', 'thread', 'process']:
 *             raise ValueError(f"multi_type parameter set wrong.")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2800, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2799
 * 
 *         #
 *         if multi_type not in ['single', 'thread', 'process']:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"multi_type parameter set wrong.")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2803
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 2803, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2804
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_7 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2804, __pyx_L1_error)
      #endif
      if (__pyx_t_7 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2804, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2805
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2805, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = (!__pyx_t_5);
    __pyx_t_6 = __pyx_t_8;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2806
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_warning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_10 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_10 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_firstly);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_12};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2806, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2807
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2805
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2804
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2810
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2810, __pyx_L1_error)
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name1, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_8;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2811
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2811, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_8;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2812
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name1, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_and_2);
      __pyx_t_7 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_and_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_and_2);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name2, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_12};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2813
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 2813, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12)) __PYX_ERR(0, 2813, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_12 = 0;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2811
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2810
 * 
 *         #
 *         if save_file and self.has_strategy_file and strategy_key_name1 in self.strategy_json:             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2815
 *                 return self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         key_list = ['code', 'wave_ratio', 'date_start', 'date_end']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2817
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 *         key_list = ['code', 'wave_ratio', 'date_start', 'date_end']             # <<<<<<<<<<<<<<
 *         stock_wave_down_dict = stock_wave_up_dict = {key: [] for key in key_list}
 * 
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_code)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_wave_ratio);
  __Pyx_GIVEREF(__pyx_n_s_wave_ratio);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_wave_ratio)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_date_start);
  __Pyx_GIVEREF(__pyx_n_s_date_start);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_date_start)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_date_end);
  __Pyx_GIVEREF(__pyx_n_s_date_end);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_date_end)) __PYX_ERR(0, 2817, __pyx_L1_error);
  __pyx_v_key_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2818
 * 
 *         key_list = ['code', 'wave_ratio', 'date_start', 'date_end']
 *         stock_wave_down_dict = stock_wave_up_dict = {key: [] for key in key_list}             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2818, __pyx_L22_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __pyx_v_key_list; __Pyx_INCREF(__pyx_t_12);
    __pyx_t_7 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2818, __pyx_L22_error)
        #endif
        if (__pyx_t_7 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2818, __pyx_L22_error)
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2818, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2818, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr15__pyx_v_key, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 2818, __pyx_L22_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_key); __pyx_9genexpr15__pyx_v_key = 0;
    goto __pyx_L26_exit_scope;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_key); __pyx_9genexpr15__pyx_v_key = 0;
    goto __pyx_L1_error;
    __pyx_L26_exit_scope:;
  } /* exit inner scope */
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_stock_wave_down_dict = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_stock_wave_up_dict = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2821
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_session); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (!__pyx_t_6);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2822
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             print('new end_date: ', end_date)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_3, __pyx_n_s_previous};
      __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_end_date = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2823
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)             # <<<<<<<<<<<<<<
 *         else:
 *             end_date = self.use_date
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_new_end_date);
    __Pyx_GIVEREF(__pyx_kp_s_new_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_new_end_date)) __PYX_ERR(0, 2823, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_end_date);
    __Pyx_GIVEREF(__pyx_v_end_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end_date)) __PYX_ERR(0, 2823, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2821
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             end_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *             print('new end_date: ', end_date)
 */
    goto __pyx_L27;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2825
 *             print('new end_date: ', end_date)
 *         else:
 *             end_date = self.use_date             # <<<<<<<<<<<<<<
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_end_date = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L27:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2826
 *         else:
 *             end_date = self.use_date
 *         start_date = utils.sh_calendar.session_offset(end_date, -(trade_day_len - 1)).strftime('%Y%m%d')  # 60             # <<<<<<<<<<<<<<
 * 
 *         #  + ST + +
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_trade_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_end_date, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_v_start_date = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2829
 * 
 *         #  + ST + +
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list             # <<<<<<<<<<<<<<
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_keys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2829, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_exclude_codes = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2830
 *         #  + ST + +
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2830, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_8);
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2831
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_v_exclude_codes, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_exclude_codes, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2830
 *         #  + ST + +
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.new_stock_dict.keys()) + self.suspended_stock_list
 *         if not use_st_stock:             # <<<<<<<<<<<<<<
 *             exclude_codes = exclude_codes + list(self.st_stock_dict.keys())
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2834
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in exclude_codes]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2835
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in exclude_codes]
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_update_range = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2836
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in exclude_codes]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L31_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_2 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2836, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2836, __pyx_L31_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2836, __pyx_L31_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2836, __pyx_L31_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2836, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2836, __pyx_L31_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2836, __pyx_L31_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2836, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_2);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2836, __pyx_L31_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr16__pyx_v_x, __pyx_v_exclude_codes, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2836, __pyx_L31_error)
      if (__pyx_t_6) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr16__pyx_v_x))) __PYX_ERR(0, 2836, __pyx_L31_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_x); __pyx_9genexpr16__pyx_v_x = 0;
    goto __pyx_L36_exit_scope;
    __pyx_L31_error:;
    __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_x); __pyx_9genexpr16__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L36_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2839
 * 
 *         #
 *         desc_name = fun_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':
 *             #
 */
  __pyx_t_1 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__108); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_multi_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_desc_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2840
 *         #
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2840, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2842
 *         if multi_type == 'single':
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):             # <<<<<<<<<<<<<<
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,
 *                                                                                                  multi_type)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_update_range)) __PYX_ERR(0, 2842, __pyx_L1_error);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2842, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
      __pyx_t_9 = __pyx_t_12; __Pyx_INCREF(__pyx_t_9);
      __pyx_t_7 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2842, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2842, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2842, __pyx_L1_error)
          #else
          __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2842, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2842, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2842, __pyx_L1_error)
          #else
          __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2842, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          #endif
        }
      } else {
        __pyx_t_12 = __pyx_t_13(__pyx_t_9);
        if (unlikely(!__pyx_t_12)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2842, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_12);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_12);
      __pyx_t_12 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2843
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,             # <<<<<<<<<<<<<<
 *                                                                                                  multi_type)
 *                 for list_item in wave_up_ratio_record:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getSingleStockWavePriceRatio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "tbstock/tradeStrategy/stockStrategy.py":2844
 *             for stock_code in tqdm(update_range, desc=desc_name):
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,
 *                                                                                                  multi_type)             # <<<<<<<<<<<<<<
 *                 for list_item in wave_up_ratio_record:
 *                     for key, value in list_item.items():
 */
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_max_depth, __pyx_v_multi_type};
        __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
        PyObject* sequence = __pyx_t_12;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2843, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L40_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L40_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2843, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L41_unpacking_done;
        __pyx_L40_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2843, __pyx_L1_error)
        __pyx_L41_unpacking_done:;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2843
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,             # <<<<<<<<<<<<<<
 *                                                                                                  multi_type)
 *                 for list_item in wave_up_ratio_record:
 */
      __Pyx_XDECREF_SET(__pyx_v_wave_up_ratio_record, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_wave_down_ratio_record, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2845
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,
 *                                                                                                  multi_type)
 *                 for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                     for key, value in list_item.items():
 *                         stock_wave_up_dict[key].append(value)
 */
      if (likely(PyList_CheckExact(__pyx_v_wave_up_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_up_ratio_record)) {
        __pyx_t_12 = __pyx_v_wave_up_ratio_record; __Pyx_INCREF(__pyx_t_12);
        __pyx_t_10 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_wave_up_ratio_record); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2845, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_12))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2845, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2845, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2845, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2845, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_15(__pyx_t_12);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2845, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2846
 *                                                                                                  multi_type)
 *                 for list_item in wave_up_ratio_record:
 *                     for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                         stock_wave_up_dict[key].append(value)
 *                 for list_item in wave_down_ratio_record:
 */
        __pyx_t_16 = 0;
        if (unlikely(__pyx_v_list_item == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(0, 2846, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_t_1;
        __pyx_t_1 = 0;
        while (1) {
          __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_17, &__pyx_t_16, &__pyx_t_1, &__pyx_t_3, NULL, __pyx_t_18);
          if (unlikely(__pyx_t_19 == 0)) break;
          if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2846, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
          __pyx_t_1 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2847
 *                 for list_item in wave_up_ratio_record:
 *                     for key, value in list_item.items():
 *                         stock_wave_up_dict[key].append(value)             # <<<<<<<<<<<<<<
 *                 for list_item in wave_down_ratio_record:
 *                     for key, value in list_item.items():
 */
          __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_up_dict, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2847, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2845
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,
 *                                                                                                  multi_type)
 *                 for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                     for key, value in list_item.items():
 *                         stock_wave_up_dict[key].append(value)
 */
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2848
 *                     for key, value in list_item.items():
 *                         stock_wave_up_dict[key].append(value)
 *                 for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                     for key, value in list_item.items():
 *                         stock_wave_down_dict[key].append(value)
 */
      if (likely(PyList_CheckExact(__pyx_v_wave_down_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_down_ratio_record)) {
        __pyx_t_12 = __pyx_v_wave_down_ratio_record; __Pyx_INCREF(__pyx_t_12);
        __pyx_t_10 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_wave_down_ratio_record); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2848, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_12))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2848, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2848, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2848, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2848, __pyx_L1_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2848, __pyx_L1_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2848, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_15(__pyx_t_12);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 2848, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2849
 *                         stock_wave_up_dict[key].append(value)
 *                 for list_item in wave_down_ratio_record:
 *                     for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                         stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'thread':
 */
        __pyx_t_17 = 0;
        if (unlikely(__pyx_v_list_item == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(0, 2849, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_16), (&__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2849, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_t_3;
        __pyx_t_3 = 0;
        while (1) {
          __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_16, &__pyx_t_17, &__pyx_t_3, &__pyx_t_1, NULL, __pyx_t_18);
          if (unlikely(__pyx_t_19 == 0)) break;
          if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2849, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":2850
 *                 for list_item in wave_down_ratio_record:
 *                     for key, value in list_item.items():
 *                         stock_wave_down_dict[key].append(value)             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
          __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_down_dict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2850, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2848
 *                     for key, value in list_item.items():
 *                         stock_wave_up_dict[key].append(value)
 *                 for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                     for key, value in list_item.items():
 *                         stock_wave_down_dict[key].append(value)
 */
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2842
 *         if multi_type == 'single':
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):             # <<<<<<<<<<<<<<
 *                 wave_up_ratio_record, wave_down_ratio_record = self.getSingleStockWavePriceRatio(stock_code, start_date, end_date, max_depth,
 *                                                                                                  multi_type)
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2840
 *         #
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':             # <<<<<<<<<<<<<<
 *             #
 *             for stock_code in tqdm(update_range, desc=desc_name):
 */
    goto __pyx_L37;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2851
 *                     for key, value in list_item.items():
 *                         stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2851, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2852
 *                         stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code in update_range:
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2852, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_21 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2852, __pyx_L53_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2852, __pyx_L53_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __pyx_t_12;
      __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2853
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 */
            __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2853, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_futures = ((PyObject*)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2854
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code in update_range:             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_9);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2854, __pyx_L57_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2854, __pyx_L57_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2854, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2855
 *                 futures = []
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2855, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getSingleStockWavePriceRatio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2855, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_1, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_max_depth, __pyx_v_multi_type};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 6+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2855, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2856
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 */
              __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2856, __pyx_L57_error)

              /* "tbstock/tradeStrategy/stockStrategy.py":2854
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code in update_range:             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2857
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_1 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_futures};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2857, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_2);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 2857, __pyx_L57_error);
            __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2857, __pyx_L57_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2857, __pyx_L57_error)
            __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total, __pyx_t_1) < 0) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L57_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
              __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
              __pyx_t_7 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2857, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2857, __pyx_L57_error)
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_2))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2857, __pyx_L57_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2857, __pyx_L57_error)
                  #else
                  __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2857, __pyx_L57_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2857, __pyx_L57_error)
                  #else
                  __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  #endif
                }
              } else {
                __pyx_t_1 = __pyx_t_13(__pyx_t_2);
                if (unlikely(!__pyx_t_1)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2857, __pyx_L57_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_1);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2858
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():
 */
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2858, __pyx_L57_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
                PyObject* sequence = __pyx_t_1;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2858, __pyx_L57_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_9);
                #else
                __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2858, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2858, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2858, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
                index = 0; __pyx_t_12 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_12)) goto __pyx_L68_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_12);
                index = 1; __pyx_t_9 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_9)) goto __pyx_L68_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2858, __pyx_L57_error)
                __pyx_t_14 = NULL;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L69_unpacking_done;
                __pyx_L68_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_14 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2858, __pyx_L57_error)
                __pyx_L69_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_wave_up_ratio_record, __pyx_t_12);
              __pyx_t_12 = 0;
              __Pyx_XDECREF_SET(__pyx_v_wave_down_ratio_record, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2859
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 */
              if (likely(PyList_CheckExact(__pyx_v_wave_up_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_up_ratio_record)) {
                __pyx_t_1 = __pyx_v_wave_up_ratio_record; __Pyx_INCREF(__pyx_t_1);
                __pyx_t_10 = 0;
                __pyx_t_15 = NULL;
              } else {
                __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_wave_up_ratio_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2859, __pyx_L57_error)
              }
              for (;;) {
                if (likely(!__pyx_t_15)) {
                  if (likely(PyList_CheckExact(__pyx_t_1))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2859, __pyx_L57_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2859, __pyx_L57_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2859, __pyx_L57_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2859, __pyx_L57_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2859, __pyx_L57_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2859, __pyx_L57_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  }
                } else {
                  __pyx_t_9 = __pyx_t_15(__pyx_t_1);
                  if (unlikely(!__pyx_t_9)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 2859, __pyx_L57_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_9);
                }
                __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2860
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:
 */
                __pyx_t_16 = 0;
                if (unlikely(__pyx_v_list_item == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                  __PYX_ERR(0, 2860, __pyx_L57_error)
                }
                __pyx_t_12 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2860, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_XDECREF(__pyx_t_9);
                __pyx_t_9 = __pyx_t_12;
                __pyx_t_12 = 0;
                while (1) {
                  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_17, &__pyx_t_16, &__pyx_t_12, &__pyx_t_3, NULL, __pyx_t_18);
                  if (unlikely(__pyx_t_19 == 0)) break;
                  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2860, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_12);
                  __pyx_t_12 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
                  __pyx_t_3 = 0;

                  /* "tbstock/tradeStrategy/stockStrategy.py":2861
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)             # <<<<<<<<<<<<<<
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():
 */
                  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_up_dict, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2861, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2861, __pyx_L57_error)
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2859
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 */
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2862
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 */
              if (likely(PyList_CheckExact(__pyx_v_wave_down_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_down_ratio_record)) {
                __pyx_t_1 = __pyx_v_wave_down_ratio_record; __Pyx_INCREF(__pyx_t_1);
                __pyx_t_10 = 0;
                __pyx_t_15 = NULL;
              } else {
                __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_wave_down_ratio_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2862, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2862, __pyx_L57_error)
              }
              for (;;) {
                if (likely(!__pyx_t_15)) {
                  if (likely(PyList_CheckExact(__pyx_t_1))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2862, __pyx_L57_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2862, __pyx_L57_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2862, __pyx_L57_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2862, __pyx_L57_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2862, __pyx_L57_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2862, __pyx_L57_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  }
                } else {
                  __pyx_t_9 = __pyx_t_15(__pyx_t_1);
                  if (unlikely(!__pyx_t_9)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 2862, __pyx_L57_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_9);
                }
                __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2863
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                             stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'process':
 */
                __pyx_t_17 = 0;
                if (unlikely(__pyx_v_list_item == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                  __PYX_ERR(0, 2863, __pyx_L57_error)
                }
                __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_16), (&__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L57_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_XDECREF(__pyx_t_9);
                __pyx_t_9 = __pyx_t_3;
                __pyx_t_3 = 0;
                while (1) {
                  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_16, &__pyx_t_17, &__pyx_t_3, &__pyx_t_12, NULL, __pyx_t_18);
                  if (unlikely(__pyx_t_19 == 0)) break;
                  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2863, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_GOTREF(__pyx_t_12);
                  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
                  __pyx_t_3 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_12);
                  __pyx_t_12 = 0;

                  /* "tbstock/tradeStrategy/stockStrategy.py":2864
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_down_dict, __pyx_v_key); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2864, __pyx_L57_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_12, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2864, __pyx_L57_error)
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2862
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 */
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2857
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 */
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2852
 *                         stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code in update_range:
 */
          }
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
          goto __pyx_L62_try_end;
          __pyx_L57_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(0, 2852, __pyx_L59_except_error)
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_12 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2852, __pyx_L59_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_12, NULL);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2852, __pyx_L59_except_error)
            __Pyx_GOTREF(__pyx_t_25);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_25);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 2852, __pyx_L59_except_error)
            __pyx_t_8 = (!__pyx_t_6);
            if (unlikely(__pyx_t_8)) {
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_9);
              __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_9 = 0; 
              __PYX_ERR(0, 2852, __pyx_L59_except_error)
            }
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L58_exception_handled;
          }
          __pyx_L59_except_error:;
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          goto __pyx_L1_error;
          __pyx_L58_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          __pyx_L62_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_21) {
            __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2852, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_24);
            __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
          }
          goto __pyx_L56;
        }
        __pyx_L56:;
      }
      goto __pyx_L84;
      __pyx_L53_error:;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      goto __pyx_L1_error;
      __pyx_L84:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2851
 *                     for key, value in list_item.items():
 *                         stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'thread':             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L37;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2865
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2865, __pyx_L1_error)
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2866
 *                             stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code in update_range:
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2866, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_21 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2866, __pyx_L85_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L85_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2867
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 */
            __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2867, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_futures = ((PyObject*)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2868
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code in update_range:             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_9);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2868, __pyx_L89_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2868, __pyx_L89_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2868, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2869
 *                 futures = []
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2869, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_getSingleStockWavePriceRatio); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2869, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_t_12, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_max_depth, __pyx_v_multi_type};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 6+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2869, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2870
 *                 for stock_code in update_range:
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 */
              __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2870, __pyx_L89_error)

              /* "tbstock/tradeStrategy/stockStrategy.py":2868
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for stock_code in update_range:             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2871
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_12 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_futures};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2871, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_2);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 2871, __pyx_L89_error);
            __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 2871, __pyx_L89_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2871, __pyx_L89_error)
            __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total, __pyx_t_12) < 0) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2871, __pyx_L89_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
              __pyx_t_2 = __pyx_t_12; __Pyx_INCREF(__pyx_t_2);
              __pyx_t_7 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2871, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2871, __pyx_L89_error)
            }
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_2))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2871, __pyx_L89_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_12 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2871, __pyx_L89_error)
                  #else
                  __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2871, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2871, __pyx_L89_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_12); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2871, __pyx_L89_error)
                  #else
                  __pyx_t_12 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2871, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  #endif
                }
              } else {
                __pyx_t_12 = __pyx_t_13(__pyx_t_2);
                if (unlikely(!__pyx_t_12)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2871, __pyx_L89_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_12);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_12);
              __pyx_t_12 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2872
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #             # <<<<<<<<<<<<<<
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L89_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2872, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
                PyObject* sequence = __pyx_t_12;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2872, __pyx_L89_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_9);
                #else
                __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2872, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2872, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_3 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2872, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
                index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L100_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_1);
                index = 1; __pyx_t_9 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_9)) goto __pyx_L100_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2872, __pyx_L89_error)
                __pyx_t_14 = NULL;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L101_unpacking_done;
                __pyx_L100_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_14 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2872, __pyx_L89_error)
                __pyx_L101_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_wave_up_ratio_record, __pyx_t_1);
              __pyx_t_1 = 0;
              __Pyx_XDECREF_SET(__pyx_v_wave_down_ratio_record, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2873
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 */
              if (likely(PyList_CheckExact(__pyx_v_wave_up_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_up_ratio_record)) {
                __pyx_t_12 = __pyx_v_wave_up_ratio_record; __Pyx_INCREF(__pyx_t_12);
                __pyx_t_10 = 0;
                __pyx_t_15 = NULL;
              } else {
                __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_wave_up_ratio_record); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2873, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2873, __pyx_L89_error)
              }
              for (;;) {
                if (likely(!__pyx_t_15)) {
                  if (likely(PyList_CheckExact(__pyx_t_12))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2873, __pyx_L89_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2873, __pyx_L89_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2873, __pyx_L89_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2873, __pyx_L89_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2873, __pyx_L89_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2873, __pyx_L89_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  }
                } else {
                  __pyx_t_9 = __pyx_t_15(__pyx_t_12);
                  if (unlikely(!__pyx_t_9)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 2873, __pyx_L89_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_9);
                }
                __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2874
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:
 */
                __pyx_t_16 = 0;
                if (unlikely(__pyx_v_list_item == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                  __PYX_ERR(0, 2874, __pyx_L89_error)
                }
                __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_XDECREF(__pyx_t_9);
                __pyx_t_9 = __pyx_t_1;
                __pyx_t_1 = 0;
                while (1) {
                  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_17, &__pyx_t_16, &__pyx_t_1, &__pyx_t_3, NULL, __pyx_t_18);
                  if (unlikely(__pyx_t_19 == 0)) break;
                  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2874, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
                  __pyx_t_1 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
                  __pyx_t_3 = 0;

                  /* "tbstock/tradeStrategy/stockStrategy.py":2875
 *                     for list_item in wave_up_ratio_record:
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)             # <<<<<<<<<<<<<<
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():
 */
                  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_up_dict, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2875, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2875, __pyx_L89_error)
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2873
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 */
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2876
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 */
              if (likely(PyList_CheckExact(__pyx_v_wave_down_ratio_record)) || PyTuple_CheckExact(__pyx_v_wave_down_ratio_record)) {
                __pyx_t_12 = __pyx_v_wave_down_ratio_record; __Pyx_INCREF(__pyx_t_12);
                __pyx_t_10 = 0;
                __pyx_t_15 = NULL;
              } else {
                __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_v_wave_down_ratio_record); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2876, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2876, __pyx_L89_error)
              }
              for (;;) {
                if (likely(!__pyx_t_15)) {
                  if (likely(PyList_CheckExact(__pyx_t_12))) {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2876, __pyx_L89_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2876, __pyx_L89_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2876, __pyx_L89_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  } else {
                    {
                      Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12);
                      #if !CYTHON_ASSUME_SAFE_MACROS
                      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2876, __pyx_L89_error)
                      #endif
                      if (__pyx_t_10 >= __pyx_temp) break;
                    }
                    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                    __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2876, __pyx_L89_error)
                    #else
                    __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2876, __pyx_L89_error)
                    __Pyx_GOTREF(__pyx_t_9);
                    #endif
                  }
                } else {
                  __pyx_t_9 = __pyx_t_15(__pyx_t_12);
                  if (unlikely(!__pyx_t_9)) {
                    PyObject* exc_type = PyErr_Occurred();
                    if (exc_type) {
                      if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                      else __PYX_ERR(0, 2876, __pyx_L89_error)
                    }
                    break;
                  }
                  __Pyx_GOTREF(__pyx_t_9);
                }
                __Pyx_XDECREF_SET(__pyx_v_list_item, __pyx_t_9);
                __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2877
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():             # <<<<<<<<<<<<<<
 *                             stock_wave_down_dict[key].append(value)
 * 
 */
                __pyx_t_17 = 0;
                if (unlikely(__pyx_v_list_item == Py_None)) {
                  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
                  __PYX_ERR(0, 2877, __pyx_L89_error)
                }
                __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_list_item, 0, __pyx_n_s_items, (&__pyx_t_16), (&__pyx_t_18)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2877, __pyx_L89_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_XDECREF(__pyx_t_9);
                __pyx_t_9 = __pyx_t_3;
                __pyx_t_3 = 0;
                while (1) {
                  __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_16, &__pyx_t_17, &__pyx_t_3, &__pyx_t_1, NULL, __pyx_t_18);
                  if (unlikely(__pyx_t_19 == 0)) break;
                  if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 2877, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
                  __pyx_t_3 = 0;
                  __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
                  __pyx_t_1 = 0;

                  /* "tbstock/tradeStrategy/stockStrategy.py":2878
 *                     for list_item in wave_down_ratio_record:
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)             # <<<<<<<<<<<<<<
 * 
 *         stock_wave_up_df = pd.DataFrame(stock_wave_up_dict)
 */
                  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_stock_wave_down_dict, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L89_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_20 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_value); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 2878, __pyx_L89_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/tradeStrategy/stockStrategy.py":2876
 *                         for key, value in list_item.items():
 *                             stock_wave_up_dict[key].append(value)
 *                     for list_item in wave_down_ratio_record:             # <<<<<<<<<<<<<<
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 */
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":2871
 *                     future = executor.submit(self.getSingleStockWavePriceRatio, stock_code, start_date, end_date, max_depth, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     wave_up_ratio_record, wave_down_ratio_record = future.result()  #
 *                     for list_item in wave_up_ratio_record:
 */
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":2866
 *                             stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code in update_range:
 */
          }
          __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
          goto __pyx_L94_try_end;
          __pyx_L89_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_12, &__pyx_t_9) < 0) __PYX_ERR(0, 2866, __pyx_L91_except_error)
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_12);
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_1 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_12, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L91_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_25 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_t_1, NULL);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2866, __pyx_L91_except_error)
            __Pyx_GOTREF(__pyx_t_25);
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_25);
            __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
            if (__pyx_t_8 < 0) __PYX_ERR(0, 2866, __pyx_L91_except_error)
            __pyx_t_6 = (!__pyx_t_8);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_12);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_12, __pyx_t_9);
              __pyx_t_2 = 0; __pyx_t_12 = 0; __pyx_t_9 = 0; 
              __PYX_ERR(0, 2866, __pyx_L91_except_error)
            }
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L90_exception_handled;
          }
          __pyx_L91_except_error:;
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          goto __pyx_L1_error;
          __pyx_L90_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          __pyx_L94_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_21) {
            __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_21, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2866, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_22);
            __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
          }
          goto __pyx_L88;
        }
        __pyx_L88:;
      }
      goto __pyx_L116;
      __pyx_L85_error:;
      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
      goto __pyx_L1_error;
      __pyx_L116:;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2865
 *                         for key, value in list_item.items():
 *                             stock_wave_down_dict[key].append(value)
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L37:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2880
 *                             stock_wave_down_dict[key].append(value)
 * 
 *         stock_wave_up_df = pd.DataFrame(stock_wave_up_dict)             # <<<<<<<<<<<<<<
 *         sorted_df = stock_wave_up_df.sort_values(by='wave_ratio', ascending=False, ignore_index=True)
 *         stock_wave_up = sorted_df.head(num_tr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pd); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_stock_wave_up_dict};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_stock_wave_up_df = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2881
 * 
 *         stock_wave_up_df = pd.DataFrame(stock_wave_up_dict)
 *         sorted_df = stock_wave_up_df.sort_values(by='wave_ratio', ascending=False, ignore_index=True)             # <<<<<<<<<<<<<<
 *         stock_wave_up = sorted_df.head(num_tr)
 *         stock_wave_up.index = stock_wave_up.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_up_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_by, __pyx_n_s_wave_ratio) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 2881, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_sorted_df = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2882
 *         stock_wave_up_df = pd.DataFrame(stock_wave_up_dict)
 *         sorted_df = stock_wave_up_df.sort_values(by='wave_ratio', ascending=False, ignore_index=True)
 *         stock_wave_up = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         stock_wave_up.index = stock_wave_up.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         stock_wave_up_dict = stock_wave_up.to_dict()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_num_tr};
    __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_stock_wave_up = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2883
 *         sorted_df = stock_wave_up_df.sort_values(by='wave_ratio', ascending=False, ignore_index=True)
 *         stock_wave_up = sorted_df.head(num_tr)
 *         stock_wave_up.index = stock_wave_up.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_wave_up_dict = stock_wave_up.to_dict()
 * 
 */
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_up, __pyx_n_s_apply); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_lambda5, 0, __pyx_n_s_publishStrategy_getStockWavePric, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 2883, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_stock_wave_up, __pyx_n_s_index, __pyx_t_1) < 0) __PYX_ERR(0, 2883, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2884
 *         stock_wave_up = sorted_df.head(num_tr)
 *         stock_wave_up.index = stock_wave_up.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         stock_wave_up_dict = stock_wave_up.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         stock_wave_down_df = pd.DataFrame(stock_wave_down_dict)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_up, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_stock_wave_up_dict, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2886
 *         stock_wave_up_dict = stock_wave_up.to_dict()
 * 
 *         stock_wave_down_df = pd.DataFrame(stock_wave_down_dict)             # <<<<<<<<<<<<<<
 *         sorted_df = stock_wave_down_df.sort_values(by='wave_ratio', ascending=True, ignore_index=True)
 *         stock_wave_down = sorted_df.head(num_tr)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_wave_down_dict};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_stock_wave_down_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2887
 * 
 *         stock_wave_down_df = pd.DataFrame(stock_wave_down_dict)
 *         sorted_df = stock_wave_down_df.sort_values(by='wave_ratio', ascending=True, ignore_index=True)             # <<<<<<<<<<<<<<
 *         stock_wave_down = sorted_df.head(num_tr)
 *         stock_wave_down.index = stock_wave_down.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_down_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_by, __pyx_n_s_wave_ratio) < 0) __PYX_ERR(0, 2887, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ascending, Py_True) < 0) __PYX_ERR(0, 2887, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 2887, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_sorted_df, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2888
 *         stock_wave_down_df = pd.DataFrame(stock_wave_down_dict)
 *         sorted_df = stock_wave_down_df.sort_values(by='wave_ratio', ascending=True, ignore_index=True)
 *         stock_wave_down = sorted_df.head(num_tr)             # <<<<<<<<<<<<<<
 *         stock_wave_down.index = stock_wave_down.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         stock_wave_down_dict = stock_wave_down.to_dict()
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sorted_df, __pyx_n_s_head); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_num_tr};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_stock_wave_down = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2889
 *         sorted_df = stock_wave_down_df.sort_values(by='wave_ratio', ascending=True, ignore_index=True)
 *         stock_wave_down = sorted_df.head(num_tr)
 *         stock_wave_down.index = stock_wave_down.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)             # <<<<<<<<<<<<<<
 *         stock_wave_down_dict = stock_wave_down.to_dict()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_down, __pyx_n_s_apply); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22getStockWavePriceRatio_1lambda6, 0, __pyx_n_s_publishStrategy_getStockWavePric, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_9);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9)) __PYX_ERR(0, 2889, __pyx_L1_error);
  __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 2889, __pyx_L1_error)
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_stock_wave_down, __pyx_n_s_index, __pyx_t_12) < 0) __PYX_ERR(0, 2889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2890
 *         stock_wave_down = sorted_df.head(num_tr)
 *         stock_wave_down.index = stock_wave_down.apply(lambda row: self.getStockNameByCode(row['code']), axis=1)
 *         stock_wave_down_dict = stock_wave_down.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_wave_down, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_stock_wave_down_dict, __pyx_t_12);
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2893
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_wave_up_dict['updated'] = True
 *             stock_wave_up_dict['day_len'] = trade_day_len
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2893, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2894
 *         # json
 *         if save_file:
 *             stock_wave_up_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             stock_wave_up_dict['day_len'] = trade_day_len
 *             stock_wave_down_dict['updated'] = True
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_wave_up_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2894, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2895
 *         if save_file:
 *             stock_wave_up_dict['updated'] = True
 *             stock_wave_up_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             stock_wave_down_dict['updated'] = True
 *             stock_wave_down_dict['day_len'] = trade_day_len
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_wave_up_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2895, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2896
 *             stock_wave_up_dict['updated'] = True
 *             stock_wave_up_dict['day_len'] = trade_day_len
 *             stock_wave_down_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             stock_wave_down_dict['day_len'] = trade_day_len
 *             self.strategy_json[strategy_key_name1] = stock_wave_up_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_wave_down_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2896, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2897
 *             stock_wave_up_dict['day_len'] = trade_day_len
 *             stock_wave_down_dict['updated'] = True
 *             stock_wave_down_dict['day_len'] = trade_day_len             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name1] = stock_wave_up_dict
 *             self.strategy_json[strategy_key_name2] = stock_wave_down_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_wave_down_dict, __pyx_n_s_day_len, __pyx_v_trade_day_len) < 0))) __PYX_ERR(0, 2897, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2898
 *             stock_wave_down_dict['updated'] = True
 *             stock_wave_down_dict['day_len'] = trade_day_len
 *             self.strategy_json[strategy_key_name1] = stock_wave_up_dict             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name2] = stock_wave_down_dict
 *             self.dumpJsonToFile()
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2898, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_v_strategy_key_name1, __pyx_v_stock_wave_up_dict) < 0))) __PYX_ERR(0, 2898, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2899
 *             stock_wave_down_dict['day_len'] = trade_day_len
 *             self.strategy_json[strategy_key_name1] = stock_wave_up_dict
 *             self.strategy_json[strategy_key_name2] = stock_wave_down_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return stock_wave_up, stock_wave_down
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_v_strategy_key_name2, __pyx_v_stock_wave_down_dict) < 0))) __PYX_ERR(0, 2899, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2900
 *             self.strategy_json[strategy_key_name1] = stock_wave_up_dict
 *             self.strategy_json[strategy_key_name2] = stock_wave_down_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return stock_wave_up, stock_wave_down
 * 
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2900, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2893
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_wave_up_dict['updated'] = True
 *             stock_wave_up_dict['day_len'] = trade_day_len
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2901
 *             self.strategy_json[strategy_key_name2] = stock_wave_down_dict
 *             self.dumpJsonToFile()
 *         return stock_wave_up, stock_wave_down             # <<<<<<<<<<<<<<
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_v_stock_wave_up);
  __Pyx_GIVEREF(__pyx_v_stock_wave_up);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_stock_wave_up)) __PYX_ERR(0, 2901, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_stock_wave_down);
  __Pyx_GIVEREF(__pyx_v_stock_wave_down);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_stock_wave_down)) __PYX_ERR(0, 2901, __pyx_L1_error);
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name1);
  __Pyx_XDECREF(__pyx_v_strategy_key_name2);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_key_list);
  __Pyx_XDECREF(__pyx_v_stock_wave_down_dict);
  __Pyx_XDECREF(__pyx_v_stock_wave_up_dict);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_wave_up_ratio_record);
  __Pyx_XDECREF(__pyx_v_wave_down_ratio_record);
  __Pyx_XDECREF(__pyx_v_list_item);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_stock_wave_up_df);
  __Pyx_XDECREF(__pyx_v_sorted_df);
  __Pyx_XDECREF(__pyx_v_stock_wave_up);
  __Pyx_XDECREF(__pyx_v_stock_wave_down_df);
  __Pyx_XDECREF(__pyx_v_stock_wave_down);
  __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_15getSingleStockWavePriceRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_14getSingleStockWavePriceRatio, "\n\n        :param stock_code:\n        :param start_date:\n        :param end_date:\n        :param max_depth:\n        :param multi_type: 'single'->\345\215\225\347\272\277\347\250\213; 'thread'->\345\244\232\347\272\277\347\250\213; 'process'->\345\244\232\350\277\233\347\250\213\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_15getSingleStockWavePriceRatio = {"getSingleStockWavePriceRatio", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_15getSingleStockWavePriceRatio, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_14getSingleStockWavePriceRatio};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_15getSingleStockWavePriceRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_max_depth = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSingleStockWavePriceRatio (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_max_depth,&__pyx_n_s_multi_type,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_1)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleStockWavePriceRatio", 0, 4, 6, 1); __PYX_ERR(0, 2903, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleStockWavePriceRatio", 0, 4, 6, 2); __PYX_ERR(0, 2903, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleStockWavePriceRatio", 0, 4, 6, 3); __PYX_ERR(0, 2903, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_depth);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2903, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getSingleStockWavePriceRatio") < 0)) __PYX_ERR(0, 2903, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
    __pyx_v_max_depth = values[4];
    __pyx_v_multi_type = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getSingleStockWavePriceRatio", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 2903, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_14getSingleStockWavePriceRatio(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_max_depth, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2941
 *         stock_close_price_df = stock_data[['date', 'close']]
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):             # <<<<<<<<<<<<<<
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_1getOneWaveRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_1getOneWaveRatio = {"getOneWaveRatio", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_1getOneWaveRatio, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_1getOneWaveRatio(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_close_price_df = 0;
  PyObject *__pyx_v_wave_up_rank_list = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_depth = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOneWaveRatio (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_close_price_df,&__pyx_n_s_wave_up_rank_list,&__pyx_n_s_mode,&__pyx_n_s_depth,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_up)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_close_price_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2941, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_wave_up_rank_list)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2941, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getOneWaveRatio", 0, 2, 4, 1); __PYX_ERR(0, 2941, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2941, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_depth);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2941, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getOneWaveRatio") < 0)) __PYX_ERR(0, 2941, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stock_close_price_df = values[0];
    __pyx_v_wave_up_rank_list = ((PyObject*)values[1]);
    __pyx_v_mode = values[2];
    __pyx_v_depth = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getOneWaveRatio", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 2941, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.getOneWaveRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wave_up_rank_list), (&PyList_Type), 0, "wave_up_rank_list", 1))) __PYX_ERR(0, 2941, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_getOneWaveRatio(__pyx_self, __pyx_v_stock_close_price_df, __pyx_v_wave_up_rank_list, __pyx_v_mode, __pyx_v_depth);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_getOneWaveRatio(PyObject *__pyx_self, PyObject *__pyx_v_stock_close_price_df, PyObject *__pyx_v_wave_up_rank_list, PyObject *__pyx_v_mode, PyObject *__pyx_v_depth) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *__pyx_outer_scope;
  PyObject *__pyx_v_row_num = NULL;
  PyObject *__pyx_v_max_item_down = NULL;
  PyObject *__pyx_v_max_item_up = NULL;
  PyObject *__pyx_v_max_price_index = NULL;
  PyObject *__pyx_v_max_price_date = NULL;
  PyObject *__pyx_v_max_price = NULL;
  PyObject *__pyx_v_min_price_index = NULL;
  PyObject *__pyx_v_min_price_date = NULL;
  PyObject *__pyx_v_min_price = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_current_date = NULL;
  PyObject *__pyx_v_current_price = NULL;
  PyObject *__pyx_v_price_up_ratio = NULL;
  PyObject *__pyx_v_item_up = NULL;
  PyObject *__pyx_v_price_down_ratio = NULL;
  PyObject *__pyx_v_item_down = NULL;
  PyObject *__pyx_v_index_left = NULL;
  PyObject *__pyx_v_index_right = NULL;
  PyObject *__pyx_v_df_left = NULL;
  PyObject *__pyx_v_df_right = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getOneWaveRatio", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/tradeStrategy/stockStrategy.py":2942
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):
 *             row_num = stock_close_price_df.shape[0]             # <<<<<<<<<<<<<<
 *             if row_num == 1 or depth >= max_depth:
 *                 return
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_row_num = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2943
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:             # <<<<<<<<<<<<<<
 *                 return
 *             max_item_down = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 */
  __pyx_t_4 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_row_num, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2943, __pyx_L1_error)
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_max_depth)) { __Pyx_RaiseClosureNameError("max_depth"); __PYX_ERR(0, 2943, __pyx_L1_error) }
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_depth, __pyx_cur_scope->__pyx_v_max_depth, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2944
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:
 *                 return             # <<<<<<<<<<<<<<
 *             max_item_down = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 *             max_item_up = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2943
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:             # <<<<<<<<<<<<<<
 *                 return
 *             max_item_down = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2945
 *             if row_num == 1 or depth >= max_depth:
 *                 return
 *             max_item_down = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}             # <<<<<<<<<<<<<<
 *             max_item_up = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_stock_code)) { __Pyx_RaiseClosureNameError("stock_code"); __PYX_ERR(0, 2945, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wave_ratio, Py_None) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_start, Py_None) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_end, Py_None) < 0) __PYX_ERR(0, 2945, __pyx_L1_error)
  __pyx_v_max_item_down = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2946
 *                 return
 *             max_item_down = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 *             max_item_up = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}             # <<<<<<<<<<<<<<
 * 
 *             max_price_index = 0
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(!__pyx_cur_scope->__pyx_v_stock_code)) { __Pyx_RaiseClosureNameError("stock_code"); __PYX_ERR(0, 2946, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2946, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wave_ratio, Py_None) < 0) __PYX_ERR(0, 2946, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_start, Py_None) < 0) __PYX_ERR(0, 2946, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_end, Py_None) < 0) __PYX_ERR(0, 2946, __pyx_L1_error)
  __pyx_v_max_item_up = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2948
 *             max_item_up = {'code': stock_code, 'wave_ratio': None, 'date_start': None, 'date_end': None}
 * 
 *             max_price_index = 0             # <<<<<<<<<<<<<<
 *             max_price_date = datetime(1900, 1, 1)
 *             max_price = 0
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_max_price_index = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2949
 * 
 *             max_price_index = 0
 *             max_price_date = datetime(1900, 1, 1)             # <<<<<<<<<<<<<<
 *             max_price = 0
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_max_price_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2950
 *             max_price_index = 0
 *             max_price_date = datetime(1900, 1, 1)
 *             max_price = 0             # <<<<<<<<<<<<<<
 * 
 *             min_price_index = 0
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_max_price = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2952
 *             max_price = 0
 * 
 *             min_price_index = 0             # <<<<<<<<<<<<<<
 *             min_price_date = datetime(1900, 1, 1)
 *             min_price = 0
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_min_price_index = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2953
 * 
 *             min_price_index = 0
 *             min_price_date = datetime(1900, 1, 1)             # <<<<<<<<<<<<<<
 *             min_price = 0
 *             for i in range(0, row_num - 1):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_min_price_date = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2954
 *             min_price_index = 0
 *             min_price_date = datetime(1900, 1, 1)
 *             min_price = 0             # <<<<<<<<<<<<<<
 *             for i in range(0, row_num - 1):
 *                 current_date = stock_close_price_df.loc[i, 'date']
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_min_price = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2955
 *             min_price_date = datetime(1900, 1, 1)
 *             min_price = 0
 *             for i in range(0, row_num - 1):             # <<<<<<<<<<<<<<
 *                 current_date = stock_close_price_df.loc[i, 'date']
 *                 current_price = stock_close_price_df.loc[i, 'close']
 */
  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_row_num, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 2955, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2955, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2955, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2955, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2955, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2955, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2955, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2955, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2956
 *             min_price = 0
 *             for i in range(0, row_num - 1):
 *                 current_date = stock_close_price_df.loc[i, 'date']             # <<<<<<<<<<<<<<
 *                 current_price = stock_close_price_df.loc[i, 'close']
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_i)) __PYX_ERR(0, 2956, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_date);
    __Pyx_GIVEREF(__pyx_n_s_date);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_date)) __PYX_ERR(0, 2956, __pyx_L1_error);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2956, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_current_date, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2957
 *             for i in range(0, row_num - 1):
 *                 current_date = stock_close_price_df.loc[i, 'date']
 *                 current_price = stock_close_price_df.loc[i, 'close']             # <<<<<<<<<<<<<<
 * 
 *                 if mode == 'up':
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_i)) __PYX_ERR(0, 2957, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_close);
    __Pyx_GIVEREF(__pyx_n_s_close);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_close)) __PYX_ERR(0, 2957, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_current_price, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2959
 *                 current_price = stock_close_price_df.loc[i, 'close']
 * 
 *                 if mode == 'up':             # <<<<<<<<<<<<<<
 *                     if max_price_index == 0 or i >= max_price_index:
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 */
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_up, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2959, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2960
 * 
 *                 if mode == 'up':
 *                     if max_price_index == 0 or i >= max_price_index:             # <<<<<<<<<<<<<<
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']
 */
      __pyx_t_4 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_max_price_index, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2960, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_max_price_index, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2960, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2960, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __pyx_t_4;
      __pyx_L10_bool_binop_done:;
      if (__pyx_t_3) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2961
 *                 if mode == 'up':
 *                     if max_price_index == 0 or i >= max_price_index:
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()             # <<<<<<<<<<<<<<
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PySlice_New(__pyx_t_8, Py_None, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_close);
        __Pyx_GIVEREF(__pyx_n_s_close);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_close)) __PYX_ERR(0, 2961, __pyx_L1_error);
        __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_idxmax); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2961, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_max_price_index, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2962
 *                     if max_price_index == 0 or i >= max_price_index:
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']             # <<<<<<<<<<<<<<
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']
 *                     price_up_ratio = max_price / current_price
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2962, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2962, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_max_price_index);
        __Pyx_GIVEREF(__pyx_v_max_price_index);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_max_price_index)) __PYX_ERR(0, 2962, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_date);
        __Pyx_GIVEREF(__pyx_n_s_date);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_date)) __PYX_ERR(0, 2962, __pyx_L1_error);
        __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2962, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_max_price_date, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2963
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']             # <<<<<<<<<<<<<<
 *                     price_up_ratio = max_price / current_price
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_max_price_index);
        __Pyx_GIVEREF(__pyx_v_max_price_index);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_max_price_index)) __PYX_ERR(0, 2963, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_close);
        __Pyx_GIVEREF(__pyx_n_s_close);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_close)) __PYX_ERR(0, 2963, __pyx_L1_error);
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_max_price, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2960
 * 
 *                 if mode == 'up':
 *                     if max_price_index == 0 or i >= max_price_index:             # <<<<<<<<<<<<<<
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2964
 *                         max_price_date = stock_close_price_df.loc[max_price_index, 'date']
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']
 *                     price_up_ratio = max_price / current_price             # <<<<<<<<<<<<<<
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 */
      __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_max_price, __pyx_v_current_price); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_price_up_ratio, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2965
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']
 *                     price_up_ratio = max_price / current_price
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):             # <<<<<<<<<<<<<<
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                    'date_end': max_price_date.strftime('%Y%m%d')}
 */
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_price_up_ratio, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_max_item_up, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (__pyx_t_2 == Py_None);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_max_item_up, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_price_up_ratio, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2965, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __pyx_t_4;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_3) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2966
 *                     price_up_ratio = max_price / current_price
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),             # <<<<<<<<<<<<<<
 *                                    'date_end': max_price_date.strftime('%Y%m%d')}
 *                         max_item_up = item_up
 */
        __pyx_t_8 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(!__pyx_cur_scope->__pyx_v_stock_code)) { __Pyx_RaiseClosureNameError("stock_code"); __PYX_ERR(0, 2966, __pyx_L1_error) }
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_price_up_ratio);
        __Pyx_GIVEREF(__pyx_v_price_up_ratio);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_price_up_ratio)) __PYX_ERR(0, 2966, __pyx_L1_error);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_4)) __PYX_ERR(0, 2966, __pyx_L1_error);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_wave_ratio, __pyx_t_9) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_s_Y_m_d};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2966, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_date_start, __pyx_t_9) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2967
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                    'date_end': max_price_date.strftime('%Y%m%d')}             # <<<<<<<<<<<<<<
 *                         max_item_up = item_up
 *                 else:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_price_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2967, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_s_Y_m_d};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2967, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_date_end, __pyx_t_9) < 0) __PYX_ERR(0, 2966, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF_SET(__pyx_v_item_up, ((PyObject*)__pyx_t_8));
        __pyx_t_8 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2968
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                    'date_end': max_price_date.strftime('%Y%m%d')}
 *                         max_item_up = item_up             # <<<<<<<<<<<<<<
 *                 else:
 *                     if min_price_index == 0 or i >= min_price_index:
 */
        __Pyx_INCREF(__pyx_v_item_up);
        __Pyx_DECREF_SET(__pyx_v_max_item_up, __pyx_v_item_up);

        /* "tbstock/tradeStrategy/stockStrategy.py":2965
 *                         max_price = stock_close_price_df.loc[max_price_index, 'close']
 *                     price_up_ratio = max_price / current_price
 *                     if price_up_ratio > 1 and (max_item_up['wave_ratio'] is None or price_up_ratio > max_item_up['wave_ratio']):             # <<<<<<<<<<<<<<
 *                         item_up = {'code': stock_code, 'wave_ratio': round(price_up_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                    'date_end': max_price_date.strftime('%Y%m%d')}
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2959
 *                 current_price = stock_close_price_df.loc[i, 'close']
 * 
 *                 if mode == 'up':             # <<<<<<<<<<<<<<
 *                     if max_price_index == 0 or i >= max_price_index:
 *                         max_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmax()
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2970
 *                         max_item_up = item_up
 *                 else:
 *                     if min_price_index == 0 or i >= min_price_index:             # <<<<<<<<<<<<<<
 *                         min_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmin()
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']
 */
    /*else*/ {
      __pyx_t_4 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_min_price_index, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2970, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_i, __pyx_v_min_price_index, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2970, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2970, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __pyx_t_4;
      __pyx_L17_bool_binop_done:;
      if (__pyx_t_3) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2971
 *                 else:
 *                     if min_price_index == 0 or i >= min_price_index:
 *                         min_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmin()             # <<<<<<<<<<<<<<
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PySlice_New(__pyx_t_2, Py_None, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_7);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_close);
        __Pyx_GIVEREF(__pyx_n_s_close);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_close)) __PYX_ERR(0, 2971, __pyx_L1_error);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_idxmin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_min_price_index, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2972
 *                     if min_price_index == 0 or i >= min_price_index:
 *                         min_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmin()
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']             # <<<<<<<<<<<<<<
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']
 *                     price_down_ratio = min_price / current_price
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_min_price_index);
        __Pyx_GIVEREF(__pyx_v_min_price_index);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_min_price_index)) __PYX_ERR(0, 2972, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_date);
        __Pyx_GIVEREF(__pyx_n_s_date);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_date)) __PYX_ERR(0, 2972, __pyx_L1_error);
        __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_min_price_date, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2973
 *                         min_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmin()
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']             # <<<<<<<<<<<<<<
 *                     price_down_ratio = min_price / current_price
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_min_price_index);
        __Pyx_GIVEREF(__pyx_v_min_price_index);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_min_price_index)) __PYX_ERR(0, 2973, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_close);
        __Pyx_GIVEREF(__pyx_n_s_close);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_close)) __PYX_ERR(0, 2973, __pyx_L1_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_min_price, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2970
 *                         max_item_up = item_up
 *                 else:
 *                     if min_price_index == 0 or i >= min_price_index:             # <<<<<<<<<<<<<<
 *                         min_price_index = stock_close_price_df.loc[i + 1:, 'close'].idxmin()
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":2974
 *                         min_price_date = stock_close_price_df.loc[min_price_index, 'date']
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']
 *                     price_down_ratio = min_price / current_price             # <<<<<<<<<<<<<<
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 */
      __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v_min_price, __pyx_v_current_price); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_price_down_ratio, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2975
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']
 *                     price_down_ratio = min_price / current_price
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):             # <<<<<<<<<<<<<<
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                      'date_end': min_price_date.strftime('%Y%m%d')}
 */
      __pyx_t_8 = PyObject_RichCompare(__pyx_v_price_down_ratio, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2975, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2975, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_max_item_down, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_4 = (__pyx_t_8 == Py_None);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_max_item_down, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2975, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_price_down_ratio, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2975, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2975, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __pyx_t_4;
      __pyx_L20_bool_binop_done:;
      if (__pyx_t_3) {

        /* "tbstock/tradeStrategy/stockStrategy.py":2976
 *                     price_down_ratio = min_price / current_price
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),             # <<<<<<<<<<<<<<
 *                                      'date_end': min_price_date.strftime('%Y%m%d')}
 *                         max_item_down = item_down
 */
        __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(!__pyx_cur_scope->__pyx_v_stock_code)) { __Pyx_RaiseClosureNameError("stock_code"); __PYX_ERR(0, 2976, __pyx_L1_error) }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_code, __pyx_cur_scope->__pyx_v_stock_code) < 0) __PYX_ERR(0, 2976, __pyx_L1_error)
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_price_down_ratio);
        __Pyx_GIVEREF(__pyx_v_price_down_ratio);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_price_down_ratio)) __PYX_ERR(0, 2976, __pyx_L1_error);
        __Pyx_INCREF(__pyx_int_4);
        __Pyx_GIVEREF(__pyx_int_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_4)) __PYX_ERR(0, 2976, __pyx_L1_error);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wave_ratio, __pyx_t_7) < 0) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_current_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_Y_m_d};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2976, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_start, __pyx_t_7) < 0) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2977
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                      'date_end': min_price_date.strftime('%Y%m%d')}             # <<<<<<<<<<<<<<
 *                         max_item_down = item_down
 * 
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_min_price_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2977, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_10 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_Y_m_d};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2977, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_date_end, __pyx_t_7) < 0) __PYX_ERR(0, 2976, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_item_down, ((PyObject*)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":2978
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                      'date_end': min_price_date.strftime('%Y%m%d')}
 *                         max_item_down = item_down             # <<<<<<<<<<<<<<
 * 
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:
 */
        __Pyx_INCREF(__pyx_v_item_down);
        __Pyx_DECREF_SET(__pyx_v_max_item_down, __pyx_v_item_down);

        /* "tbstock/tradeStrategy/stockStrategy.py":2975
 *                         min_price = stock_close_price_df.loc[min_price_index, 'close']
 *                     price_down_ratio = min_price / current_price
 *                     if price_down_ratio < 1 and (max_item_down['wave_ratio'] is None or price_down_ratio < max_item_down['wave_ratio']):             # <<<<<<<<<<<<<<
 *                         item_down = {'code': stock_code, 'wave_ratio': round(price_down_ratio, 4), 'date_start': current_date.strftime('%Y%m%d'),
 *                                      'date_end': min_price_date.strftime('%Y%m%d')}
 */
      }
    }
    __pyx_L8:;

    /* "tbstock/tradeStrategy/stockStrategy.py":2955
 *             min_price_date = datetime(1900, 1, 1)
 *             min_price = 0
 *             for i in range(0, row_num - 1):             # <<<<<<<<<<<<<<
 *                 current_date = stock_close_price_df.loc[i, 'date']
 *                 current_price = stock_close_price_df.loc[i, 'close']
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2980
 *                         max_item_down = item_down
 * 
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:             # <<<<<<<<<<<<<<
 *                 wave_up_rank_list.append(max_item_up)
 *                 if max_depth <= 1:
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_up, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2980, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_max_item_up, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_4;
  __pyx_L25_bool_binop_done:;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2981
 * 
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_up)             # <<<<<<<<<<<<<<
 *                 if max_depth <= 1:
 *                     return
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_wave_up_rank_list, __pyx_v_max_item_up); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2981, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2982
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_up)
 *                 if max_depth <= 1:             # <<<<<<<<<<<<<<
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_max_depth)) { __Pyx_RaiseClosureNameError("max_depth"); __PYX_ERR(0, 2982, __pyx_L1_error) }
    __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_max_depth, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2983
 *                 wave_up_rank_list.append(max_item_up)
 *                 if max_depth <= 1:
 *                     return             # <<<<<<<<<<<<<<
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_end']].tolist()[0]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2982
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_up)
 *                 if max_depth <= 1:             # <<<<<<<<<<<<<<
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2984
 *                 if max_depth <= 1:
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]             # <<<<<<<<<<<<<<
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_close_price_df, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_max_item_up, __pyx_n_s_date_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tolist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_index_left = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2985
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_end']].tolist()[0]             # <<<<<<<<<<<<<<
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_close_price_df, __pyx_n_s_date); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_max_item_up, __pyx_n_s_date_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tolist); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_index_right = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2986
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]             # <<<<<<<<<<<<<<
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth + 1)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_v_index_left, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PySlice_New(__pyx_int_0, __pyx_t_9, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error);
    __Pyx_INCREF(__pyx_slice__73);
    __Pyx_GIVEREF(__pyx_slice__73);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_slice__73)) __PYX_ERR(0, 2986, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_df_left = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2987
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_up['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)             # <<<<<<<<<<<<<<
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_left, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 2987, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2987, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2987, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2988
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth + 1)             # <<<<<<<<<<<<<<
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)
 */
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_depth, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (unlikely(!__pyx_cur_scope->__pyx_v_getOneWaveRatio)) { __Pyx_RaiseClosureNameError("getOneWaveRatio"); __PYX_ERR(0, 2988, __pyx_L1_error) }
    __pyx_t_9 = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_getOneWaveRatio(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_v_df_left, __pyx_v_wave_up_rank_list, __pyx_v_mode, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2988, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2989
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]             # <<<<<<<<<<<<<<
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_index_right, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = PySlice_New(__pyx_t_7, Py_None, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error);
    __Pyx_INCREF(__pyx_slice__73);
    __Pyx_GIVEREF(__pyx_slice__73);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_slice__73)) __PYX_ERR(0, 2989, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_df_right = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2990
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)             # <<<<<<<<<<<<<<
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)
 *             elif max_item_down['wave_ratio'] is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_right, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 2990, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2990, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2990, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2991
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)             # <<<<<<<<<<<<<<
 *             elif max_item_down['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_down)
 */
    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_depth, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(!__pyx_cur_scope->__pyx_v_getOneWaveRatio)) { __Pyx_RaiseClosureNameError("getOneWaveRatio"); __PYX_ERR(0, 2991, __pyx_L1_error) }
    __pyx_t_7 = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_getOneWaveRatio(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_v_df_right, __pyx_v_wave_up_rank_list, __pyx_v_mode, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2980
 *                         max_item_down = item_down
 * 
 *             if mode == 'up' and max_item_up['wave_ratio'] is not None:             # <<<<<<<<<<<<<<
 *                 wave_up_rank_list.append(max_item_up)
 *                 if max_depth <= 1:
 */
    goto __pyx_L24;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2992
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)
 *             elif max_item_down['wave_ratio'] is not None:             # <<<<<<<<<<<<<<
 *                 wave_up_rank_list.append(max_item_down)
 *                 if max_depth <= 1:
 */
  __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_max_item_down, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = (__pyx_t_7 != Py_None);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2993
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)
 *             elif max_item_down['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_down)             # <<<<<<<<<<<<<<
 *                 if max_depth <= 1:
 *                     return
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_wave_up_rank_list, __pyx_v_max_item_down); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2993, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":2994
 *             elif max_item_down['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_down)
 *                 if max_depth <= 1:             # <<<<<<<<<<<<<<
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_max_depth)) { __Pyx_RaiseClosureNameError("max_depth"); __PYX_ERR(0, 2994, __pyx_L1_error) }
    __pyx_t_7 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_max_depth, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2994, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2994, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_3) {

      /* "tbstock/tradeStrategy/stockStrategy.py":2995
 *                 wave_up_rank_list.append(max_item_down)
 *                 if max_depth <= 1:
 *                     return             # <<<<<<<<<<<<<<
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_end']].tolist()[0]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":2994
 *             elif max_item_down['wave_ratio'] is not None:
 *                 wave_up_rank_list.append(max_item_down)
 *                 if max_depth <= 1:             # <<<<<<<<<<<<<<
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":2996
 *                 if max_depth <= 1:
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]             # <<<<<<<<<<<<<<
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_close_price_df, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_max_item_down, __pyx_n_s_date_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_tolist); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_index_left = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2997
 *                     return
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_end']].tolist()[0]             # <<<<<<<<<<<<<<
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_close_price_df, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_max_item_down, __pyx_n_s_date_end); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_tolist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_index_right = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2998
 *                 index_left = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_start']].tolist()[0]
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]             # <<<<<<<<<<<<<<
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth=depth + 1)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_index_left, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PySlice_New(__pyx_int_0, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 2998, __pyx_L1_error);
    __Pyx_INCREF(__pyx_slice__73);
    __Pyx_GIVEREF(__pyx_slice__73);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__73)) __PYX_ERR(0, 2998, __pyx_L1_error);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_df_left = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2999
 *                 index_right = stock_close_price_df.index[stock_close_price_df['date'] == max_item_down['date_end']].tolist()[0]
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)             # <<<<<<<<<<<<<<
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth=depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_left, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 2999, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2999, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3000
 *                 df_left = stock_close_price_df.loc[0:index_left - 1, :]
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth=depth + 1)             # <<<<<<<<<<<<<<
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_getOneWaveRatio)) { __Pyx_RaiseClosureNameError("getOneWaveRatio"); __PYX_ERR(0, 3000, __pyx_L1_error) }
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_df_left);
    __Pyx_GIVEREF(__pyx_v_df_left);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_df_left)) __PYX_ERR(0, 3000, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_wave_up_rank_list);
    __Pyx_GIVEREF(__pyx_v_wave_up_rank_list);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_wave_up_rank_list)) __PYX_ERR(0, 3000, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_mode)) __PYX_ERR(0, 3000, __pyx_L1_error);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_depth, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_depth, __pyx_t_9) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3001
 *                 df_left.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth=depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]             # <<<<<<<<<<<<<<
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth=depth + 1)
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_close_price_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_index_right, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = PySlice_New(__pyx_t_8, Py_None, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 3001, __pyx_L1_error);
    __Pyx_INCREF(__pyx_slice__73);
    __Pyx_GIVEREF(__pyx_slice__73);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__73)) __PYX_ERR(0, 3001, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_df_right = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3002
 *                 getOneWaveRatio(df_left, wave_up_rank_list, mode, depth=depth + 1)
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)             # <<<<<<<<<<<<<<
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth=depth + 1)
 *             else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_right, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 3002, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 3002, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3002, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3003
 *                 df_right = stock_close_price_df.loc[index_right + 1:, :]
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth=depth + 1)             # <<<<<<<<<<<<<<
 *             else:
 *                 return
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_getOneWaveRatio)) { __Pyx_RaiseClosureNameError("getOneWaveRatio"); __PYX_ERR(0, 3003, __pyx_L1_error) }
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_df_right);
    __Pyx_GIVEREF(__pyx_v_df_right);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_df_right)) __PYX_ERR(0, 3003, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_wave_up_rank_list);
    __Pyx_GIVEREF(__pyx_v_wave_up_rank_list);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_wave_up_rank_list)) __PYX_ERR(0, 3003, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_mode);
    __Pyx_GIVEREF(__pyx_v_mode);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_mode)) __PYX_ERR(0, 3003, __pyx_L1_error);
    __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_depth, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_depth, __pyx_t_2) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2992
 *                 df_right.reset_index(drop=True, inplace=True)
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth + 1)
 *             elif max_item_down['wave_ratio'] is not None:             # <<<<<<<<<<<<<<
 *                 wave_up_rank_list.append(max_item_down)
 *                 if max_depth <= 1:
 */
    goto __pyx_L24;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3005
 *                 getOneWaveRatio(df_right, wave_up_rank_list, mode, depth=depth + 1)
 *             else:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }
  __pyx_L24:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2941
 *         stock_close_price_df = stock_data[['date', 'close']]
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):             # <<<<<<<<<<<<<<
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.getOneWaveRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_row_num);
  __Pyx_XDECREF(__pyx_v_max_item_down);
  __Pyx_XDECREF(__pyx_v_max_item_up);
  __Pyx_XDECREF(__pyx_v_max_price_index);
  __Pyx_XDECREF(__pyx_v_max_price_date);
  __Pyx_XDECREF(__pyx_v_max_price);
  __Pyx_XDECREF(__pyx_v_min_price_index);
  __Pyx_XDECREF(__pyx_v_min_price_date);
  __Pyx_XDECREF(__pyx_v_min_price);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_current_date);
  __Pyx_XDECREF(__pyx_v_current_price);
  __Pyx_XDECREF(__pyx_v_price_up_ratio);
  __Pyx_XDECREF(__pyx_v_item_up);
  __Pyx_XDECREF(__pyx_v_price_down_ratio);
  __Pyx_XDECREF(__pyx_v_item_down);
  __Pyx_XDECREF(__pyx_v_index_left);
  __Pyx_XDECREF(__pyx_v_index_right);
  __Pyx_XDECREF(__pyx_v_df_left);
  __Pyx_XDECREF(__pyx_v_df_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3009
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)
 *         if max_depth > 1:
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #             # <<<<<<<<<<<<<<
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_2lambda7(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_2lambda7 = {"lambda7", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_2lambda7, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_2lambda7(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda7 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3009, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda7") < 0)) __PYX_ERR(0, 3009, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda7", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3009, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda7(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda7", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_x, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3012
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #             # <<<<<<<<<<<<<<
 *         if TIMI_COUNT:
 *             end5 = time.time()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_3lambda8(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_3lambda8 = {"lambda8", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_3lambda8, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_3lambda8(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda8 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3012, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda8") < 0)) __PYX_ERR(0, 3012, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda8", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3012, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda8(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda8(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda8", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_x, __pyx_n_s_wave_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_14getSingleStockWavePriceRatio(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_max_depth, PyObject *__pyx_v_multi_type) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *__pyx_cur_scope;
  int __pyx_v_TIMI_COUNT;
  PyObject *__pyx_v_wave_up_ratio_record = NULL;
  PyObject *__pyx_v_wave_down_ratio_record = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_engine = NULL;
  PyObject *__pyx_v_session = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_end1 = NULL;
  PyObject *__pyx_v_stock_close_price_df = NULL;
  PyObject *__pyx_v_end5 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getSingleStockWavePriceRatio", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2903, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_stock_code = __pyx_v_stock_code;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stock_code);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stock_code);
  __pyx_cur_scope->__pyx_v_max_depth = __pyx_v_max_depth;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_max_depth);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_max_depth);

  /* "tbstock/tradeStrategy/stockStrategy.py":2913
 *         :return:
 *         '''
 *         TIMI_COUNT = False             # <<<<<<<<<<<<<<
 *         wave_up_ratio_record = []
 *         wave_down_ratio_record = []
 */
  __pyx_v_TIMI_COUNT = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2914
 *         '''
 *         TIMI_COUNT = False
 *         wave_up_ratio_record = []             # <<<<<<<<<<<<<<
 *         wave_down_ratio_record = []
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wave_up_ratio_record = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2915
 *         TIMI_COUNT = False
 *         wave_up_ratio_record = []
 *         wave_down_ratio_record = []             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wave_down_ratio_record = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2918
 * 
 *         #
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             start = time.time()
 * 
 */
  if (__pyx_v_TIMI_COUNT) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2919
 *         #
 *         if TIMI_COUNT:
 *             start = time.time()             # <<<<<<<<<<<<<<
 * 
 *         if multi_type == 'process':
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2919, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_start = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2918
 * 
 *         #
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             start = time.time()
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2921
 *             start = time.time()
 * 
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2921, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2922
 * 
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()             # <<<<<<<<<<<<<<
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2922, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2922, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_session = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2923
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)             # <<<<<<<<<<<<<<
 *             session.remove()
 *             engine.dispose()
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_session};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2923, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2923, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2923, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2924
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()             # <<<<<<<<<<<<<<
 *             engine.dispose()
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2925
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 *             session.remove()
 *             engine.dispose()             # <<<<<<<<<<<<<<
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2921
 *             start = time.time()
 * 
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             engine, session = create_engine_session()
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date, session)
 */
    goto __pyx_L4;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2927
 *             engine.dispose()
 *         else:
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)             # <<<<<<<<<<<<<<
 * 
 *         if not res:
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoFq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_stock_code, __pyx_n_s_qfq, __pyx_v_start_date, __pyx_v_end_date};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2927, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2927, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L10_unpacking_done;
      __pyx_L9_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2927, __pyx_L1_error)
      __pyx_L10_unpacking_done:;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_stock_data = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "tbstock/tradeStrategy/stockStrategy.py":2929
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}: failed to getStockTradeDayInfoFq.")
 *             return wave_up_ratio_record, wave_down_ratio_record
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2929, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_5);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2930
 * 
 *         if not res:
 *             utils.logger.error(f"{stock_code}: failed to getStockTradeDayInfoFq.")             # <<<<<<<<<<<<<<
 *             return wave_up_ratio_record, wave_down_ratio_record
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_kp_u_failed_to_getStockTradeDayInfoF_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2931
 *         if not res:
 *             utils.logger.error(f"{stock_code}: failed to getStockTradeDayInfoFq.")
 *             return wave_up_ratio_record, wave_down_ratio_record             # <<<<<<<<<<<<<<
 * 
 *         if TIMI_COUNT:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_wave_up_ratio_record);
    __Pyx_GIVEREF(__pyx_v_wave_up_ratio_record);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_wave_up_ratio_record)) __PYX_ERR(0, 2931, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_wave_down_ratio_record);
    __Pyx_GIVEREF(__pyx_v_wave_down_ratio_record);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_wave_down_ratio_record)) __PYX_ERR(0, 2931, __pyx_L1_error);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2929
 *             res, stock_data = self.dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 * 
 *         if not res:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code}: failed to getStockTradeDayInfoFq.")
 *             return wave_up_ratio_record, wave_down_ratio_record
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2933
 *             return wave_up_ratio_record, wave_down_ratio_record
 * 
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             end1 = time.time()
 *             print(f" time cost = {end1 - start} s.")
 */
  if (__pyx_v_TIMI_COUNT) {

    /* "tbstock/tradeStrategy/stockStrategy.py":2934
 * 
 *         if TIMI_COUNT:
 *             end1 = time.time()             # <<<<<<<<<<<<<<
 *             print(f" time cost = {end1 - start} s.")
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_end1 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2935
 *         if TIMI_COUNT:
 *             end1 = time.time()
 *             print(f" time cost = {end1 - start} s.")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_time_cost);
    __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
    __pyx_t_9 += 17;
    __Pyx_GIVEREF(__pyx_kp_u_time_cost);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_time_cost);
    if (unlikely(!__pyx_v_start)) { __Pyx_RaiseUnboundLocalError("start"); __PYX_ERR(0, 2935, __pyx_L1_error) }
    __pyx_t_6 = PyNumber_Subtract(__pyx_v_end1, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_s);
    __pyx_t_9 += 3;
    __Pyx_GIVEREF(__pyx_kp_u_s);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_s);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":2933
 *             return wave_up_ratio_record, wave_down_ratio_record
 * 
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             end1 = time.time()
 *             print(f" time cost = {end1 - start} s.")
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":2938
 * 
 *         #
 *         stock_data = stock_data.sort_values(by='date', ascending=True)             # <<<<<<<<<<<<<<
 *         stock_close_price_df = stock_data[['date', 'close']]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_by, __pyx_n_s_date) < 0) __PYX_ERR(0, 2938, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ascending, Py_True) < 0) __PYX_ERR(0, 2938, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_data, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2939
 *         #
 *         stock_data = stock_data.sort_values(by='date', ascending=True)
 *         stock_close_price_df = stock_data[['date', 'close']]             # <<<<<<<<<<<<<<
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):
 */
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_date)) __PYX_ERR(0, 2939, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_close);
  __Pyx_GIVEREF(__pyx_n_s_close);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_close)) __PYX_ERR(0, 2939, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_stock_data, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_stock_close_price_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2941
 *         stock_close_price_df = stock_data[['date', 'close']]
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):             # <<<<<<<<<<<<<<
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_stock_close_price_df, __pyx_kp_s_pd_DataFrame) < 0) __PYX_ERR(0, 2941, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wave_up_rank_list, __pyx_n_s_list) < 0) __PYX_ERR(0, 2941, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_1getOneWaveRatio, 0, __pyx_n_s_publishStrategy_getSingleStockWa, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__127);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_cur_scope->__pyx_v_getOneWaveRatio = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3007
 *                 return
 * 
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)             # <<<<<<<<<<<<<<
 *         if max_depth > 1:
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_stock_close_price_df);
  __Pyx_GIVEREF(__pyx_v_stock_close_price_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stock_close_price_df)) __PYX_ERR(0, 3007, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_wave_up_ratio_record);
  __Pyx_GIVEREF(__pyx_v_wave_up_ratio_record);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_wave_up_ratio_record)) __PYX_ERR(0, 3007, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_up) < 0) __PYX_ERR(0, 3007, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_depth, __pyx_int_0) < 0) __PYX_ERR(0, 3007, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3008
 * 
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)
 *         if max_depth > 1:             # <<<<<<<<<<<<<<
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_max_depth, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3008, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3009
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)
 *         if max_depth > 1:
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #             # <<<<<<<<<<<<<<
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wave_up_ratio_record, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reverse, Py_True) < 0) __PYX_ERR(0, 3009, __pyx_L1_error)
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_2lambda7, 0, __pyx_n_s_publishStrategy_getSingleStockWa_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_6) < 0) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3008
 * 
 *         getOneWaveRatio(stock_close_price_df, wave_up_ratio_record, mode='up', depth=0)
 *         if max_depth > 1:             # <<<<<<<<<<<<<<
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3010
 *         if max_depth > 1:
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)             # <<<<<<<<<<<<<<
 *         if max_depth > 1:
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_stock_close_price_df);
  __Pyx_GIVEREF(__pyx_v_stock_close_price_df);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_stock_close_price_df)) __PYX_ERR(0, 3010, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_wave_down_ratio_record);
  __Pyx_GIVEREF(__pyx_v_wave_down_ratio_record);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_wave_down_ratio_record)) __PYX_ERR(0, 3010, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_down) < 0) __PYX_ERR(0, 3010, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_depth, __pyx_int_0) < 0) __PYX_ERR(0, 3010, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_getOneWaveRatio, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3011
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:             # <<<<<<<<<<<<<<
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 *         if TIMI_COUNT:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_max_depth, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3011, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3012
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #             # <<<<<<<<<<<<<<
 *         if TIMI_COUNT:
 *             end5 = time.time()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wave_down_ratio_record, __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reverse, Py_False) < 0) __PYX_ERR(0, 3012, __pyx_L1_error)
    __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getSingleStockWavePriceRatio_3lambda8, 0, __pyx_n_s_publishStrategy_getSingleStockWa_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_6) < 0) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3012, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3011
 *             wave_up_ratio_record.sort(reverse=True, key=lambda x: x['wave_ratio'])  #
 *         getOneWaveRatio(stock_close_price_df, wave_down_ratio_record, mode='down', depth=0)
 *         if max_depth > 1:             # <<<<<<<<<<<<<<
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 *         if TIMI_COUNT:
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3013
 *         if max_depth > 1:
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             end5 = time.time()
 *             print(f"getSingleStockWavePriceRatio time cost = {end5 - start} s.")
 */
  if (__pyx_v_TIMI_COUNT) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3014
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 *         if TIMI_COUNT:
 *             end5 = time.time()             # <<<<<<<<<<<<<<
 *             print(f"getSingleStockWavePriceRatio time cost = {end5 - start} s.")
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3014, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_end5 = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3015
 *         if TIMI_COUNT:
 *             end5 = time.time()
 *             print(f"getSingleStockWavePriceRatio time cost = {end5 - start} s.")             # <<<<<<<<<<<<<<
 * 
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 */
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = 0;
    __pyx_t_10 = 127;
    __Pyx_INCREF(__pyx_kp_u_getSingleStockWavePriceRatio_tim);
    __pyx_t_9 += 41;
    __Pyx_GIVEREF(__pyx_kp_u_getSingleStockWavePriceRatio_tim);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_getSingleStockWavePriceRatio_tim);
    if (unlikely(!__pyx_v_start)) { __Pyx_RaiseUnboundLocalError("start"); __PYX_ERR(0, 3015, __pyx_L1_error) }
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_end5, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_s);
    __pyx_t_9 += 3;
    __Pyx_GIVEREF(__pyx_kp_u_s);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_s);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3015, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3013
 *         if max_depth > 1:
 *             wave_down_ratio_record.sort(reverse=False, key=lambda x: x['wave_ratio'])  #
 *         if TIMI_COUNT:             # <<<<<<<<<<<<<<
 *             end5 = time.time()
 *             print(f"getSingleStockWavePriceRatio time cost = {end5 - start} s.")
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3017
 *             print(f"getSingleStockWavePriceRatio time cost = {end5 - start} s.")
 * 
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]             # <<<<<<<<<<<<<<
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_max_depth);
  __pyx_t_6 = __pyx_cur_scope->__pyx_v_max_depth;
  __pyx_t_8 = (__pyx_t_6 == Py_None);
  if (__pyx_t_8) {
    __pyx_t_9 = PY_SSIZE_T_MAX;
  } else {
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3017, __pyx_L1_error)
    __pyx_t_9 = __pyx_t_11;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyList_GetSlice(__pyx_v_wave_up_ratio_record, 0, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_max_depth);
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_max_depth;
  __pyx_t_8 = (__pyx_t_2 == Py_None);
  if (__pyx_t_8) {
    __pyx_t_9 = PY_SSIZE_T_MAX;
  } else {
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3017, __pyx_L1_error)
    __pyx_t_9 = __pyx_t_11;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_wave_down_ratio_record, 0, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6)) __PYX_ERR(0, 3017, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getSingleStockWavePriceRatio", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wave_up_ratio_record);
  __Pyx_XDECREF(__pyx_v_wave_down_ratio_record);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_engine);
  __Pyx_XDECREF(__pyx_v_session);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_end1);
  __Pyx_XDECREF(__pyx_v_stock_close_price_df);
  __Pyx_XDECREF(__pyx_v_end5);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getTradeDistributionTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_16getTradeDistributionTable, "\n        TODO: \351\234\200\350\246\201\344\274\230\345\214\226\357\274\214\344\270\215\344\275\277\347\224\250\351\201\215\345\216\206\350\202\241\347\245\250\347\232\204\346\226\271\345\274\217\357\274\214\347\233\264\346\216\245\345\257\271dataframe\346\225\260\346\215\256\350\241\250\346\223\215\344\275\234\n        \346\257\217\346\227\245\344\272\244\346\230\223\346\203\205\345\206\265\350\241\250\n        - \346\257\217\344\270\252\346\266\250\350\267\214\345\214\272\351\227\264\347\232\204\350\202\241\347\245\250\346\225\260\351\207\217\n        - \346\257\217\346\227\245\346\266\250\345\201\234\345\222\214\350\247\246\345\217\212\346\266\250\345\201\234\350\202\241\347\245\250\345\210\206\346\236\220\357\274\210\346\230\257\345\220\246\351\246\226\346\235\277\357\274\214\346\266\250\345\201\234\350\202\241\347\245\250\350\241\214\344\270\232\357\274\214\345\270\202\345\200\274\345\210\206\346\236\220\357\274\214\347\202\270\346\235\277\347\216\207\345\210\206\346\236\220\357\274\211\n        :param multi_thread:\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getTradeDistributionTable = {"getTradeDistributionTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getTradeDistributionTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_16getTradeDistributionTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getTradeDistributionTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTradeDistributionTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getTradeDistributionTable") < 0)) __PYX_ERR(0, 3019, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
    __pyx_v_save_file = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTradeDistributionTable", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3019, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_16getTradeDistributionTable(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3059
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):             # <<<<<<<<<<<<<<
 *             res = False
 *             stock_data = pd.DataFrame()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_1updateRateHist(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_1updateRateHist = {"updateRateHist", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_1updateRateHist, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_1updateRateHist(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_prev_date = 0;
  PyObject *__pyx_v_new_date = 0;
  PyObject *__pyx_v_rate_hist_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateRateHist (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_stock_name,&__pyx_n_s_prev_date,&__pyx_n_s_new_date,&__pyx_n_s_rate_hist_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist", 1, 5, 5, 1); __PYX_ERR(0, 3059, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_prev_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist", 1, 5, 5, 2); __PYX_ERR(0, 3059, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist", 1, 5, 5, 3); __PYX_ERR(0, 3059, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rate_hist_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3059, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist", 1, 5, 5, 4); __PYX_ERR(0, 3059, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateRateHist") < 0)) __PYX_ERR(0, 3059, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 5)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
      values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
    }
    __pyx_v_stock_code = values[0];
    __pyx_v_stock_name = values[1];
    __pyx_v_prev_date = values[2];
    __pyx_v_new_date = values[3];
    __pyx_v_rate_hist_dict = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateRateHist", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 3059, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable.updateRateHist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_updateRateHist(__pyx_self, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_prev_date, __pyx_v_new_date, __pyx_v_rate_hist_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_updateRateHist(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_prev_date, PyObject *__pyx_v_new_date, PyObject *__pyx_v_rate_hist_dict) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_outer_scope;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_up_limit = NULL;
  PyObject *__pyx_v_qfq_up_rate = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateRateHist", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/tradeStrategy/stockStrategy.py":3060
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):
 *             res = False             # <<<<<<<<<<<<<<
 *             stock_data = pd.DataFrame()
 *             if stock_code not in self.suspended_stock_list:
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_res = Py_False;

  /* "tbstock/tradeStrategy/stockStrategy.py":3061
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):
 *             res = False
 *             stock_data = pd.DataFrame()             # <<<<<<<<<<<<<<
 *             if stock_code not in self.suspended_stock_list:
 *                 res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3062
 *             res = False
 *             stock_data = pd.DataFrame()
 *             if stock_code not in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                 res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             else:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3062, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3063
 *             stock_data = pd.DataFrame()
 *             if stock_code not in self.suspended_stock_list:
 *                 res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)             # <<<<<<<<<<<<<<
 *             else:
 *                 utils.logger.warning(f"{stock_code} has suspended at {new_date}.")
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3063, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_stock_code, __pyx_v_prev_date, __pyx_v_new_date};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3063, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 3063, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3063, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_stock_data, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3062
 *             res = False
 *             stock_data = pd.DataFrame()
 *             if stock_code not in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                 res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3065
 *                 res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             else:
 *                 utils.logger.warning(f"{stock_code} has suspended at {new_date}.")             # <<<<<<<<<<<<<<
 * 
 *             if not res or stock_data.shape[0] < 1:
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u_has_suspended_at);
    __pyx_t_8 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_has_suspended_at);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_has_suspended_at);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_new_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__92);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__92);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__92);
    __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3067
 *                 utils.logger.warning(f"{stock_code} has suspended at {new_date}.")
 * 
 *             if not res or stock_data.shape[0] < 1:             # <<<<<<<<<<<<<<
 *                 rate_hist_dict['0'].append(stock_code)
 *             else:
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3067, __pyx_L1_error)
  __pyx_t_11 = (!__pyx_t_10);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_5 = __pyx_t_11;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_11;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3068
 * 
 *             if not res or stock_data.shape[0] < 1:
 *                 rate_hist_dict['0'].append(stock_code)             # <<<<<<<<<<<<<<
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3068, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3067
 *                 utils.logger.warning(f"{stock_code} has suspended at {new_date}.")
 * 
 *             if not res or stock_data.shape[0] < 1:             # <<<<<<<<<<<<<<
 *                 rate_hist_dict['0'].append(stock_code)
 *             else:
 */
    goto __pyx_L6;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3070
 *                 rate_hist_dict['0'].append(stock_code)
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)             # <<<<<<<<<<<<<<
 *                 if stock_data.iloc[0]['pre_close'] == 0:
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockLimitUp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_stock_code, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3070, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_up_limit = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3071
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 *                 if stock_data.iloc[0]['pre_close'] == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")
 *                     return
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3071, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3072
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 *                 if stock_data.iloc[0]['pre_close'] == 0:
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")             # <<<<<<<<<<<<<<
 *                     return
 *                 qfq_up_rate = (stock_data.iloc[0]['close'] - stock_data.iloc[0]['pre_close']) / stock_data.iloc[0]['pre_close'] * 100
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_pre_close_equal_zero_when_date);
      __pyx_t_8 += 34;
      __Pyx_GIVEREF(__pyx_kp_u_pre_close_equal_zero_when_date);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_pre_close_equal_zero_when_date);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_new_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3072, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3072, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3073
 *                 if stock_data.iloc[0]['pre_close'] == 0:
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")
 *                     return             # <<<<<<<<<<<<<<
 *                 qfq_up_rate = (stock_data.iloc[0]['close'] - stock_data.iloc[0]['pre_close']) / stock_data.iloc[0]['pre_close'] * 100
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3071
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 *                 if stock_data.iloc[0]['pre_close'] == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")
 *                     return
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3074
 *                     utils.logger.error(f"{stock_code} pre_close equal zero when date = {new_date}")
 *                     return
 *                 qfq_up_rate = (stock_data.iloc[0]['close'] - stock_data.iloc[0]['pre_close']) / stock_data.iloc[0]['pre_close'] * 100             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_MultiplyObjC(__pyx_t_1, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_qfq_up_rate = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3077
 * 
 *                 #
 *                 if qfq_up_rate < -9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_neg_9_85, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3077, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3077, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3078
 *                 #
 *                 if qfq_up_rate < -9.85:
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_9_85); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3078, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3078, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3077
 * 
 *                 #
 *                 if qfq_up_rate < -9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3079
 *                 if qfq_up_rate < -9.85:
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_neg_9_85, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3079, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_5, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3079, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3080
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_9_85_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3080, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3079
 *                 if qfq_up_rate < -9.85:
 *                     rate_hist_dict['(~,-9.85)'].append(stock_code)
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3081
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_5, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3081, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3081, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3081, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3081, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L13_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3082
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_5_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3082, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3082, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3081
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     rate_hist_dict['[-9.85,-5)'].append(stock_code)
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3083
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 *                 elif qfq_up_rate == 0:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_1, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3083, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3083, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3083, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3083, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3084
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     rate_hist_dict['[-1,0)'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate == 0:
 *                     rate_hist_dict['0'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_1_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3084, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3084, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3083
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     rate_hist_dict['[-5,-1)'].append(stock_code)
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 *                 elif qfq_up_rate == 0:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3085
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 *                 elif qfq_up_rate == 0:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['0'].append(stock_code)
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 */
    __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_qfq_up_rate, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3085, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3086
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 *                 elif qfq_up_rate == 0:
 *                     rate_hist_dict['0'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3086, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3086, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3085
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     rate_hist_dict['[-1,0)'].append(stock_code)
 *                 elif qfq_up_rate == 0:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['0'].append(stock_code)
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3087
 *                 elif qfq_up_rate == 0:
 *                     rate_hist_dict['0'].append(stock_code)
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3087, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3087, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3088
 *                     rate_hist_dict['0'].append(stock_code)
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     rate_hist_dict['(0,1]'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_0_1_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3088, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3087
 *                 elif qfq_up_rate == 0:
 *                     rate_hist_dict['0'].append(stock_code)
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3089
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3089, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_5, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3089, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L19_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3090
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     rate_hist_dict['(1,5]'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_1_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3090, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3089
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     rate_hist_dict['(0,1]'].append(stock_code)
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3091
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 *                 elif qfq_up_rate > 9.85:
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_5, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3091, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_9_85, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3091, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3092
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 9.85:
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_5_9_85); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3092, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3091
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     rate_hist_dict['(1,5]'].append(stock_code)
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 *                 elif qfq_up_rate > 9.85:
 */
      goto __pyx_L10;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3093
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 *                 elif qfq_up_rate > 9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)
 * 
 */
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_9_85, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3093, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3094
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 *                 elif qfq_up_rate > 9.85:
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)             # <<<<<<<<<<<<<<
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 2) and (qfq_up_rate > -up_limit * 100 + 2):
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s_9_85_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3094, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3094, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3093
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     rate_hist_dict['(5,9.85]'].append(stock_code)
 *                 elif qfq_up_rate > 9.85:             # <<<<<<<<<<<<<<
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)
 * 
 */
    }
    __pyx_L10:;

    /* "tbstock/tradeStrategy/stockStrategy.py":3096
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 2) and (qfq_up_rate > -up_limit * 100 + 2):             # <<<<<<<<<<<<<<
 *                     return
 * 
 */
    __pyx_t_6 = __Pyx_PyInt_MultiplyObjC(__pyx_v_up_limit, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_11) {
    } else {
      __pyx_t_5 = __pyx_t_11;
      goto __pyx_L24_bool_binop_done;
    }
    __pyx_t_6 = PyNumber_Negative(__pyx_v_up_limit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyInt_MultiplyObjC(__pyx_t_6, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 3096, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_11;
    __pyx_L24_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3097
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 2) and (qfq_up_rate > -up_limit * 100 + 2):
 *                     return             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3096
 *                     rate_hist_dict['(9.85,~]'].append(stock_code)
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 2) and (qfq_up_rate > -up_limit * 100 + 2):             # <<<<<<<<<<<<<<
 *                     return
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3100
 * 
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     rate_hist_dict[''].append(stock_code)
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3100, __pyx_L1_error) }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isUpLimit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_13, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_13, __pyx_v_stock_code, __pyx_t_2, __pyx_t_3, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3101
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 *                     rate_hist_dict[''].append(stock_code)             # <<<<<<<<<<<<<<
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s__128); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3101, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3100
 * 
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     rate_hist_dict[''].append(stock_code)
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3103
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     rate_hist_dict[''].append(stock_code)
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3103, __pyx_L1_error) }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isDownLimit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_13, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_13, __pyx_v_stock_code, __pyx_t_3, __pyx_t_2, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3104
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 *                     rate_hist_dict[''].append(stock_code)             # <<<<<<<<<<<<<<
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s__129); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 3104, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3103
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     rate_hist_dict[''].append(stock_code)
 * 
 */
    }
  }
  __pyx_L6:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3059
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):             # <<<<<<<<<<<<<<
 *             res = False
 *             stock_data = pd.DataFrame()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable.updateRateHist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_up_limit);
  __Pyx_XDECREF(__pyx_v_qfq_up_rate);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3106
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):             # <<<<<<<<<<<<<<
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_3updateRateHist_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_3updateRateHist_ = {"updateRateHist_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_3updateRateHist_, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_3updateRateHist_(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_prev_date = 0;
  PyObject *__pyx_v_new_date = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateRateHist_ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_stock_name,&__pyx_n_s_prev_date,&__pyx_n_s_new_date,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist_", 1, 4, 4, 1); __PYX_ERR(0, 3106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_prev_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist_", 1, 4, 4, 2); __PYX_ERR(0, 3106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateRateHist_", 1, 4, 4, 3); __PYX_ERR(0, 3106, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateRateHist_") < 0)) __PYX_ERR(0, 3106, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_stock_code = values[0];
    __pyx_v_stock_name = values[1];
    __pyx_v_prev_date = values[2];
    __pyx_v_new_date = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateRateHist_", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3106, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable.updateRateHist_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_2updateRateHist_(__pyx_self, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_prev_date, __pyx_v_new_date);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_2updateRateHist_(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_prev_date, PyObject *__pyx_v_new_date) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_outer_scope;
  PyObject *__pyx_v_res_list = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_stock_data = NULL;
  PyObject *__pyx_v_up_limit = NULL;
  PyObject *__pyx_v_qfq_up_rate = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateRateHist_", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/tradeStrategy/stockStrategy.py":3107
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):
 *             res_list = {}             # <<<<<<<<<<<<<<
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             if not res or stock_data.shape[0] < 1:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3108
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)             # <<<<<<<<<<<<<<
 *             if not res or stock_data.shape[0] < 1:
 *                 res_list['0'] = stock_code
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3108, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockTradeDayInfoSqlalchemy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_stock_code, __pyx_v_prev_date, __pyx_v_new_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3108, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 3108, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3108, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_stock_data = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3109
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             if not res or stock_data.shape[0] < 1:             # <<<<<<<<<<<<<<
 *                 res_list['0'] = stock_code
 *             else:
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3109, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_8);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_7 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3110
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             if not res or stock_data.shape[0] < 1:
 *                 res_list['0'] = stock_code             # <<<<<<<<<<<<<<
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 */
    if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_0, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3110, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3109
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 *             if not res or stock_data.shape[0] < 1:             # <<<<<<<<<<<<<<
 *                 res_list['0'] = stock_code
 *             else:
 */
    goto __pyx_L5;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3112
 *                 res_list['0'] = stock_code
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)             # <<<<<<<<<<<<<<
 *                 qfq_up_rate = (stock_data.iloc[0]['close'] - stock_data.iloc[0]['pre_close']) / stock_data.iloc[0]['pre_close'] * 100
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getStockLimitUp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_stock_code, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_up_limit = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3113
 *             else:
 *                 up_limit = utils.getStockLimitUp(stock_code, stock_name)
 *                 qfq_up_rate = (stock_data.iloc[0]['close'] - stock_data.iloc[0]['pre_close']) / stock_data.iloc[0]['pre_close'] * 100             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_MultiplyObjC(__pyx_t_1, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_qfq_up_rate = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3116
 * 
 *                 #
 *                 if qfq_up_rate < -9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(~,-9.85)'] = stock_code
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_neg_9_85, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3116, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3116, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3117
 *                 #
 *                 if qfq_up_rate < -9.85:
 *                     res_list['(~,-9.85)'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     res_list['[-9.85,-5)'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_9_85, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3117, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3116
 * 
 *                 #
 *                 if qfq_up_rate < -9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(~,-9.85)'] = stock_code
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3118
 *                 if qfq_up_rate < -9.85:
 *                     res_list['(~,-9.85)'] = stock_code
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:             # <<<<<<<<<<<<<<
 *                     res_list['[-9.85,-5)'] = stock_code
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_neg_9_85, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3118, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3118, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3118, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3119
 *                     res_list['(~,-9.85)'] = stock_code
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     res_list['[-9.85,-5)'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     res_list['[-5,-1)'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_9_85_5, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3119, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3118
 *                 if qfq_up_rate < -9.85:
 *                     res_list['(~,-9.85)'] = stock_code
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:             # <<<<<<<<<<<<<<
 *                     res_list['[-9.85,-5)'] = stock_code
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3120
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     res_list['[-9.85,-5)'] = stock_code
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:             # <<<<<<<<<<<<<<
 *                     res_list['[-5,-1)'] = stock_code
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_5, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3120, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3120, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3120, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3121
 *                     res_list['[-9.85,-5)'] = stock_code
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     res_list['[-5,-1)'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     res_list['[-1,0)'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_5_1, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3121, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3120
 *                 elif qfq_up_rate >= -9.85 and qfq_up_rate < -5:
 *                     res_list['[-9.85,-5)'] = stock_code
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:             # <<<<<<<<<<<<<<
 *                     res_list['[-5,-1)'] = stock_code
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3122
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     res_list['[-5,-1)'] = stock_code
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:             # <<<<<<<<<<<<<<
 *                     res_list['[-1,0)'] = stock_code
 *                 elif qfq_up_rate == 0:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_neg_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L13_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3123
 *                     res_list['[-5,-1)'] = stock_code
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     res_list['[-1,0)'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate == 0:
 *                     res_list['0'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_1_0, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3123, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3122
 *                 elif qfq_up_rate >= -5 and qfq_up_rate < -1:
 *                     res_list['[-5,-1)'] = stock_code
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:             # <<<<<<<<<<<<<<
 *                     res_list['[-1,0)'] = stock_code
 *                 elif qfq_up_rate == 0:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3124
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     res_list['[-1,0)'] = stock_code
 *                 elif qfq_up_rate == 0:             # <<<<<<<<<<<<<<
 *                     res_list['0'] = stock_code
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 */
    __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_qfq_up_rate, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3124, __pyx_L1_error)
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3125
 *                     res_list['[-1,0)'] = stock_code
 *                 elif qfq_up_rate == 0:
 *                     res_list['0'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     res_list['(0,1]'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_0, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3125, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3124
 *                 elif qfq_up_rate >= -1 and qfq_up_rate < 0:
 *                     res_list['[-1,0)'] = stock_code
 *                 elif qfq_up_rate == 0:             # <<<<<<<<<<<<<<
 *                     res_list['0'] = stock_code
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3126
 *                 elif qfq_up_rate == 0:
 *                     res_list['0'] = stock_code
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:             # <<<<<<<<<<<<<<
 *                     res_list['(0,1]'] = stock_code
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3126, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3126, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L15_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3126, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3126, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L15_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3127
 *                     res_list['0'] = stock_code
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     res_list['(0,1]'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     res_list['(1,5]'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_0_1_2, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3127, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3126
 *                 elif qfq_up_rate == 0:
 *                     res_list['0'] = stock_code
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:             # <<<<<<<<<<<<<<
 *                     res_list['(0,1]'] = stock_code
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3128
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     res_list['(0,1]'] = stock_code
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:             # <<<<<<<<<<<<<<
 *                     res_list['(1,5]'] = stock_code
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3128, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L17_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_5, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3128, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3128, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L17_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3129
 *                     res_list['(0,1]'] = stock_code
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     res_list['(1,5]'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     res_list['(5,9.85]'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_1_5, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3129, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3128
 *                 elif qfq_up_rate > 0 and qfq_up_rate <= 1:
 *                     res_list['(0,1]'] = stock_code
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:             # <<<<<<<<<<<<<<
 *                     res_list['(1,5]'] = stock_code
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3130
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     res_list['(1,5]'] = stock_code
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(5,9.85]'] = stock_code
 *                 elif qfq_up_rate > 9.85:
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_int_5, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_9_85, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L19_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3131
 *                     res_list['(1,5]'] = stock_code
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     res_list['(5,9.85]'] = stock_code             # <<<<<<<<<<<<<<
 *                 elif qfq_up_rate > 9.85:
 *                     res_list['(9.85,~]'] = stock_code
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_5_9_85, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3131, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3130
 *                 elif qfq_up_rate > 1 and qfq_up_rate <= 5:
 *                     res_list['(1,5]'] = stock_code
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(5,9.85]'] = stock_code
 *                 elif qfq_up_rate > 9.85:
 */
      goto __pyx_L8;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3132
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     res_list['(5,9.85]'] = stock_code
 *                 elif qfq_up_rate > 9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(9.85,~]'] = stock_code
 * 
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_float_9_85, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3132, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3133
 *                     res_list['(5,9.85]'] = stock_code
 *                 elif qfq_up_rate > 9.85:
 *                     res_list['(9.85,~]'] = stock_code             # <<<<<<<<<<<<<<
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 0.4) and (qfq_up_rate > -up_limit * 100 + 0.4):
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s_9_85_2, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3133, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3132
 *                 elif qfq_up_rate > 5 and qfq_up_rate <= 9.85:
 *                     res_list['(5,9.85]'] = stock_code
 *                 elif qfq_up_rate > 9.85:             # <<<<<<<<<<<<<<
 *                     res_list['(9.85,~]'] = stock_code
 * 
 */
    }
    __pyx_L8:;

    /* "tbstock/tradeStrategy/stockStrategy.py":3135
 *                     res_list['(9.85,~]'] = stock_code
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 0.4) and (qfq_up_rate > -up_limit * 100 + 0.4):             # <<<<<<<<<<<<<<
 *                     return res_list
 * 
 */
    __pyx_t_3 = __Pyx_PyInt_MultiplyObjC(__pyx_v_up_limit, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyFloat_SubtractObjC(__pyx_t_3, __pyx_float_0_4, 0.4, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L22_bool_binop_done;
    }
    __pyx_t_3 = PyNumber_Negative(__pyx_v_up_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyInt_MultiplyObjC(__pyx_t_3, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyFloat_AddObjC(__pyx_t_1, __pyx_float_0_4, 0.4, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_qfq_up_rate, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3135, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_t_9;
    __pyx_L22_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3136
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 0.4) and (qfq_up_rate > -up_limit * 100 + 0.4):
 *                     return res_list             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_res_list);
      __pyx_r = __pyx_v_res_list;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3135
 *                     res_list['(9.85,~]'] = stock_code
 * 
 *                 if qfq_up_rate < (up_limit * 100 - 0.4) and (qfq_up_rate > -up_limit * 100 + 0.4):             # <<<<<<<<<<<<<<
 *                     return res_list
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3139
 * 
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     res_list[''] = stock_code
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3139, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isUpLimit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_stock_code, __pyx_t_2, __pyx_t_5, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3140
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 *                     res_list[''] = stock_code             # <<<<<<<<<<<<<<
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s__128, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3140, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3139
 * 
 *                 #
 *                 if self.isUpLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     res_list[''] = stock_code
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3142
 *                     res_list[''] = stock_code
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     res_list[''] = stock_code
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3142, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_isDownLimit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_data, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_10, __pyx_v_stock_code, __pyx_t_5, __pyx_t_2, __pyx_v_stock_name};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3142, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3143
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):
 *                     res_list[''] = stock_code             # <<<<<<<<<<<<<<
 * 
 *             return res_list
 */
      if (unlikely((PyDict_SetItem(__pyx_v_res_list, __pyx_kp_s__129, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 3143, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3142
 *                     res_list[''] = stock_code
 * 
 *                 if self.isDownLimit(stock_code, stock_data.iloc[0]['close'], stock_data.iloc[0]['pre_close'], stock_name):             # <<<<<<<<<<<<<<
 *                     res_list[''] = stock_code
 * 
 */
    }
  }
  __pyx_L5:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3145
 *                     res_list[''] = stock_code
 * 
 *             return res_list             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res_list);
  __pyx_r = __pyx_v_res_list;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3106
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):             # <<<<<<<<<<<<<<
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable.updateRateHist_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res_list);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_stock_data);
  __Pyx_XDECREF(__pyx_v_up_limit);
  __Pyx_XDECREF(__pyx_v_qfq_up_rate);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_16getTradeDistributionTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers, PyObject *__pyx_v_save_file) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_cur_scope;
  PyObject *__pyx_v_strategy_key_name1 = NULL;
  PyObject *__pyx_v_strategy_key_name2 = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_rate_hist_list = NULL;
  PyObject *__pyx_v_rate_hist_dict = NULL;
  PyObject *__pyx_v_new_date = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_prev_date = NULL;
  PyObject *__pyx_v_updateRateHist = 0;
  CYTHON_UNUSED PyObject *__pyx_v_updateRateHist_ = 0;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_rate_hist_dict_len = NULL;
  PyObject *__pyx_9genexpr17__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr18__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr18__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  int __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTradeDistributionTable", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3019, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "tbstock/tradeStrategy/stockStrategy.py":3029
 *         :return:
 *         '''
 *         strategy_key_name1 = 'trade_distribution_code'             # <<<<<<<<<<<<<<
 *         strategy_key_name2 = 'trade_distribution_len'
 *         fun_name = sys._getframe().f_code.co_name
 */
  __Pyx_INCREF(__pyx_n_s_trade_distribution_code);
  __pyx_v_strategy_key_name1 = __pyx_n_s_trade_distribution_code;

  /* "tbstock/tradeStrategy/stockStrategy.py":3030
 *         '''
 *         strategy_key_name1 = 'trade_distribution_code'
 *         strategy_key_name2 = 'trade_distribution_len'             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 * 
 */
  __Pyx_INCREF(__pyx_n_s_trade_distribution_len);
  __pyx_v_strategy_key_name2 = __pyx_n_s_trade_distribution_len;

  /* "tbstock/tradeStrategy/stockStrategy.py":3031
 *         strategy_key_name1 = 'trade_distribution_code'
 *         strategy_key_name2 = 'trade_distribution_len'
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3034
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 3034, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3035
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_5 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3035, __pyx_L1_error)
      #endif
      if (__pyx_t_5 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3035, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3036
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = (!__pyx_t_7);
    __pyx_t_6 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3037
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_warning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_10 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_10 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_firstly);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_12};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3038
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3036
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3035
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3041
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name1 in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3041, __pyx_L1_error)
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_6 = __pyx_t_8;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name1, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_8;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3042
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name1 in self.strategy_json):
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.use_date, self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {
    } else {
      __pyx_t_6 = __pyx_t_8;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3042, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __pyx_t_8;
    __pyx_L14_bool_binop_done:;
    if (__pyx_t_6) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3043
 *         if save_file and self.has_strategy_file and (strategy_key_name1 in self.strategy_json):
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.use_date, self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_5 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name1, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_and_2);
      __pyx_t_5 += 5;
      __Pyx_GIVEREF(__pyx_kp_u_and_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_and_2);
      __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name2, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_11;
      __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_5 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_12};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3044
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.use_date, self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strategy_key_name1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strategy_key_name2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 3044, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_12)) __PYX_ERR(0, 3044, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 3044, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_12 = 0;
      __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3042
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name1 in self.strategy_json):
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 *                 return self.use_date, self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3041
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name1 in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name1]['updated'] and self.strategy_json[strategy_key_name2]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name1} and {strategy_key_name2} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3046
 *                 return self.use_date, self.strategy_json[strategy_key_name1], self.strategy_json[strategy_key_name2]
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         rate_hist_list = ['', '(~,-9.85)', '[-9.85,-5)', '[-5,-1)', '[-1,0)', '0', '(0,1]', '(1,5]', '(5,9.85]', '(9.85,~]', '']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3048
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 *         rate_hist_list = ['', '(~,-9.85)', '[-9.85,-5)', '[-5,-1)', '[-1,0)', '0', '(0,1]', '(1,5]', '(5,9.85]', '(9.85,~]', '']             # <<<<<<<<<<<<<<
 *         rate_hist_dict = {key: [] for key in rate_hist_list}
 * 
 */
  __pyx_t_3 = PyList_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s__129);
  __Pyx_GIVEREF(__pyx_kp_s__129);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s__129)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_9_85);
  __Pyx_GIVEREF(__pyx_kp_s_9_85);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_9_85)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_9_85_5);
  __Pyx_GIVEREF(__pyx_kp_s_9_85_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_kp_s_9_85_5)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_5_1);
  __Pyx_GIVEREF(__pyx_kp_s_5_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_kp_s_5_1)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_1_0);
  __Pyx_GIVEREF(__pyx_kp_s_1_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_kp_s_1_0)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_0);
  __Pyx_GIVEREF(__pyx_kp_s_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_kp_s_0)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_0_1_2);
  __Pyx_GIVEREF(__pyx_kp_s_0_1_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_kp_s_0_1_2)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_1_5);
  __Pyx_GIVEREF(__pyx_kp_s_1_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_kp_s_1_5)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_5_9_85);
  __Pyx_GIVEREF(__pyx_kp_s_5_9_85);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_kp_s_5_9_85)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_9_85_2);
  __Pyx_GIVEREF(__pyx_kp_s_9_85_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_kp_s_9_85_2)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__128);
  __Pyx_GIVEREF(__pyx_kp_s__128);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_kp_s__128)) __PYX_ERR(0, 3048, __pyx_L1_error);
  __pyx_v_rate_hist_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3049
 * 
 *         rate_hist_list = ['', '(~,-9.85)', '[-9.85,-5)', '[-5,-1)', '[-1,0)', '0', '(0,1]', '(1,5]', '(5,9.85]', '(9.85,~]', '']
 *         rate_hist_dict = {key: [] for key in rate_hist_list}             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __pyx_v_rate_hist_list; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3049, __pyx_L18_error)
        #endif
        if (__pyx_t_5 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3049, __pyx_L18_error)
      #else
      __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_9genexpr17__pyx_v_key, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3049, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_key); __pyx_9genexpr17__pyx_v_key = 0;
    goto __pyx_L22_exit_scope;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_key); __pyx_9genexpr17__pyx_v_key = 0;
    goto __pyx_L1_error;
    __pyx_L22_exit_scope:;
  } /* exit inner scope */
  __pyx_v_rate_hist_dict = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3052
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             new_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3052, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = (!__pyx_t_6);
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3053
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):
 *             new_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         else:
 *             new_date = self.use_date
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_date_to_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_12, __pyx_n_s_previous};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strftime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Y_m_d};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3053, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_new_date = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3052
 * 
 *         #
 *         if not utils.sh_calendar.is_session(self.use_date):             # <<<<<<<<<<<<<<
 *             new_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *         else:
 */
    goto __pyx_L23;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3055
 *             new_date = utils.sh_calendar.date_to_session(self.use_date, 'previous').strftime('%Y%m%d')
 *         else:
 *             new_date = self.use_date             # <<<<<<<<<<<<<<
 * 
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_new_date = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L23:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3057
 *             new_date = self.use_date
 * 
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_new_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_prev_date = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3059
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):             # <<<<<<<<<<<<<<
 *             res = False
 *             stock_data = pd.DataFrame()
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_1updateRateHist, 0, __pyx_n_s_publishStrategy_getTradeDistribu, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_updateRateHist = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3106
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):             # <<<<<<<<<<<<<<
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_3updateRateHist_, 0, __pyx_n_s_publishStrategy_getTradeDistribu_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_updateRateHist_ = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3148
 * 
 *         #
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3148, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_8);
  if (__pyx_t_6) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3150
 *         if not multi_thread:
 *             #
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):             # <<<<<<<<<<<<<<
 *                 stock_code = row['code']
 *                 stock_name = row['name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_stock_code_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 3150, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_stock_code_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total, __pyx_t_1) < 0) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3150, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3150, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3150, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3150, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3150, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_13(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3150, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3150, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
        index = 0; __pyx_t_12 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_12)) goto __pyx_L27_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_12);
        index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L27_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < 0) __PYX_ERR(0, 3150, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L28_unpacking_done;
        __pyx_L27_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3150, __pyx_L1_error)
        __pyx_L28_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_12);
      __pyx_t_12 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3151
 *             #
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):
 *                 stock_code = row['code']             # <<<<<<<<<<<<<<
 *                 stock_name = row['name']
 *                 updateRateHist(stock_code, stock_name, new_date, new_date, rate_hist_dict)
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3152
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):
 *                 stock_code = row['code']
 *                 stock_name = row['name']             # <<<<<<<<<<<<<<
 *                 updateRateHist(stock_code, stock_name, new_date, new_date, rate_hist_dict)
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3153
 *                 stock_code = row['code']
 *                 stock_name = row['name']
 *                 updateRateHist(stock_code, stock_name, new_date, new_date, rate_hist_dict)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
      __pyx_t_1 = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDistributionTable_updateRateHist(__pyx_v_updateRateHist, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_new_date, __pyx_v_new_date, __pyx_v_rate_hist_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3150
 *         if not multi_thread:
 *             #
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):             # <<<<<<<<<<<<<<
 *                 stock_code = row['code']
 *                 stock_name = row['name']
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3148
 * 
 *         #
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             for index, row in tqdm(self.stock_code_name.iterrows(), desc=fun_name, total=self.stock_code_name.shape[0]):
 */
    goto __pyx_L24;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3157
 *         else:
 *             ## 1
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for index, row in self.stock_code_name.iterrows():
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 3157, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3157, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_18);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":3158
 *             ## 1
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for index, row in self.stock_code_name.iterrows():
 *                     # if index >= 100:
 */
            __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3158, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_v_futures = ((PyObject*)__pyx_t_2);
            __pyx_t_2 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":3159
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for index, row in self.stock_code_name.iterrows():             # <<<<<<<<<<<<<<
 *                     # if index >= 100:
 *                     #     break
 */
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_stock_code_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_5 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3159, __pyx_L34_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3159, __pyx_L34_error)
                    #endif
                    if (__pyx_t_5 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3159, __pyx_L34_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L34_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3159, __pyx_L34_error)
                    #endif
                    if (__pyx_t_5 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3159, __pyx_L34_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L34_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_13(__pyx_t_1);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 3159, __pyx_L34_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 3159, __pyx_L34_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_12);
                #else
                __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L34_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3159, __pyx_L34_error)
                __Pyx_GOTREF(__pyx_t_12);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3159, __pyx_L34_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
                index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L42_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_3);
                index = 1; __pyx_t_12 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_12)) goto __pyx_L42_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_12);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < 0) __PYX_ERR(0, 3159, __pyx_L34_error)
                __pyx_t_14 = NULL;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                goto __pyx_L43_unpacking_done;
                __pyx_L42_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __pyx_t_14 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 3159, __pyx_L34_error)
                __pyx_L43_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_3);
              __pyx_t_3 = 0;
              __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_12);
              __pyx_t_12 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3162
 *                     # if index >= 100:
 *                     #     break
 *                     stock_code = row['code']             # <<<<<<<<<<<<<<
 *                     stock_name = row['name']
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)
 */
              __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3162, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3163
 *                     #     break
 *                     stock_code = row['code']
 *                     stock_name = row['name']             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)
 *                     futures.append(future)
 */
              __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3163, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3164
 *                     stock_code = row['code']
 *                     stock_name = row['name']
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):  #
 */
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3164, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[7] = {__pyx_t_3, __pyx_v_updateRateHist, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_new_date, __pyx_v_new_date, __pyx_v_rate_hist_dict};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 6+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3164, __pyx_L34_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3165
 *                     stock_name = row['name']
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):  #
 *                     res = future.result()  #
 */
              __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 3165, __pyx_L34_error)

              /* "tbstock/tradeStrategy/stockStrategy.py":3159
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for index, row in self.stock_code_name.iterrows():             # <<<<<<<<<<<<<<
 *                     # if index >= 100:
 *                     #     break
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":3166
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     res = future.result()  #
 * 
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_futures};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GIVEREF(__pyx_t_2);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L34_error);
            __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 3166, __pyx_L34_error)
            __pyx_t_5 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3166, __pyx_L34_error)
            __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_total, __pyx_t_3) < 0) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L34_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
              __pyx_t_5 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3166, __pyx_L34_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                if (likely(PyList_CheckExact(__pyx_t_2))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3166, __pyx_L34_error)
                    #endif
                    if (__pyx_t_5 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3166, __pyx_L34_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L34_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3166, __pyx_L34_error)
                    #endif
                    if (__pyx_t_5 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 3166, __pyx_L34_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L34_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_13(__pyx_t_2);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 3166, __pyx_L34_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3167
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):  #
 *                     res = future.result()  #             # <<<<<<<<<<<<<<
 * 
 *             ## 2
 */
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3167, __pyx_L34_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3167, __pyx_L34_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/tradeStrategy/stockStrategy.py":3166
 *                     future = executor.submit(updateRateHist, stock_code, stock_name, new_date, new_date, rate_hist_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):  #             # <<<<<<<<<<<<<<
 *                     res = future.result()  #
 * 
 */
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/tradeStrategy/stockStrategy.py":3157
 *         else:
 *             ## 1
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for index, row in self.stock_code_name.iterrows():
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L39_try_end;
          __pyx_L34_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_12) < 0) __PYX_ERR(0, 3157, __pyx_L36_except_error)
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_12);
            __pyx_t_1 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L36_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 3157, __pyx_L36_except_error)
            __Pyx_GOTREF(__pyx_t_20);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_20);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 3157, __pyx_L36_except_error)
            __pyx_t_8 = (!__pyx_t_6);
            if (unlikely(__pyx_t_8)) {
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_12);
              __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_12);
              __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_12 = 0; 
              __PYX_ERR(0, 3157, __pyx_L36_except_error)
            }
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L35_exception_handled;
          }
          __pyx_L36_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          goto __pyx_L1_error;
          __pyx_L35_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);
          __pyx_L39_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_15) {
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__109, NULL);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3157, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          }
          goto __pyx_L33;
        }
        __pyx_L33:;
      }
      goto __pyx_L51;
      __pyx_L30_error:;
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      goto __pyx_L1_error;
      __pyx_L51:;
    }
  }
  __pyx_L24:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3185
 *             #             rate_hist_dict[key].append(value)
 * 
 *         rate_hist_dict_len = {key: len(value) for key, value in rate_hist_dict.items()}             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  { /* enter inner scope */
    __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3185, __pyx_L54_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_rate_hist_dict, 1, __pyx_n_s_items, (&__pyx_t_10), (&__pyx_t_21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L54_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_2;
    __pyx_t_2 = 0;
    while (1) {
      __pyx_t_22 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_10, &__pyx_t_5, &__pyx_t_2, &__pyx_t_1, NULL, __pyx_t_21);
      if (unlikely(__pyx_t_22 == 0)) break;
      if (unlikely(__pyx_t_22 == -1)) __PYX_ERR(0, 3185, __pyx_L54_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_value, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_23 = PyObject_Length(__pyx_9genexpr18__pyx_v_value); if (unlikely(__pyx_t_23 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3185, __pyx_L54_error)
      __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_23); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3185, __pyx_L54_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_t_12, (PyObject*)__pyx_9genexpr18__pyx_v_key, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3185, __pyx_L54_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_key); __pyx_9genexpr18__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_value); __pyx_9genexpr18__pyx_v_value = 0;
    goto __pyx_L57_exit_scope;
    __pyx_L54_error:;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_key); __pyx_9genexpr18__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_value); __pyx_9genexpr18__pyx_v_value = 0;
    goto __pyx_L1_error;
    __pyx_L57_exit_scope:;
  } /* exit inner scope */
  __pyx_v_rate_hist_dict_len = ((PyObject*)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3188
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             rate_hist_dict['updated'] = True
 *             rate_hist_dict_len['updated'] = True
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3188, __pyx_L1_error)
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3189
 *         # json
 *         if save_file:
 *             rate_hist_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             rate_hist_dict_len['updated'] = True
 *             self.strategy_json[strategy_key_name1] = rate_hist_dict
 */
    if (unlikely((PyDict_SetItem(__pyx_v_rate_hist_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3189, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3190
 *         if save_file:
 *             rate_hist_dict['updated'] = True
 *             rate_hist_dict_len['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name1] = rate_hist_dict
 *             self.strategy_json[strategy_key_name2] = rate_hist_dict_len
 */
    if (unlikely((PyDict_SetItem(__pyx_v_rate_hist_dict_len, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3190, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3191
 *             rate_hist_dict['updated'] = True
 *             rate_hist_dict_len['updated'] = True
 *             self.strategy_json[strategy_key_name1] = rate_hist_dict             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name2] = rate_hist_dict_len
 *             self.dumpJsonToFile()
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_v_strategy_key_name1, __pyx_v_rate_hist_dict) < 0))) __PYX_ERR(0, 3191, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3192
 *             rate_hist_dict_len['updated'] = True
 *             self.strategy_json[strategy_key_name1] = rate_hist_dict
 *             self.strategy_json[strategy_key_name2] = rate_hist_dict_len             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 * 
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (unlikely((PyObject_SetItem(__pyx_t_12, __pyx_v_strategy_key_name2, __pyx_v_rate_hist_dict_len) < 0))) __PYX_ERR(0, 3192, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3193
 *             self.strategy_json[strategy_key_name1] = rate_hist_dict
 *             self.strategy_json[strategy_key_name2] = rate_hist_dict_len
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *         return new_date, rate_hist_dict, rate_hist_dict_len
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3188
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             rate_hist_dict['updated'] = True
 *             rate_hist_dict_len['updated'] = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3195
 *             self.dumpJsonToFile()
 * 
 *         return new_date, rate_hist_dict, rate_hist_dict_len             # <<<<<<<<<<<<<<
 * 
 *     def getStockLadderTable(self, use_st_stock=False, ladder_max=7, save_file=True) -> (int, dict):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_v_new_date);
  __Pyx_GIVEREF(__pyx_v_new_date);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_new_date)) __PYX_ERR(0, 3195, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_rate_hist_dict);
  __Pyx_GIVEREF(__pyx_v_rate_hist_dict);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_rate_hist_dict)) __PYX_ERR(0, 3195, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_rate_hist_dict_len);
  __Pyx_GIVEREF(__pyx_v_rate_hist_dict_len);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_v_rate_hist_dict_len)) __PYX_ERR(0, 3195, __pyx_L1_error);
  __pyx_r = __pyx_t_12;
  __pyx_t_12 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDistributionTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name1);
  __Pyx_XDECREF(__pyx_v_strategy_key_name2);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_rate_hist_list);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict);
  __Pyx_XDECREF(__pyx_v_new_date);
  __Pyx_XDECREF(__pyx_v_prev_date);
  __Pyx_XDECREF(__pyx_v_updateRateHist);
  __Pyx_XDECREF(__pyx_v_updateRateHist_);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict_len);
  __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_value);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3197
 *         return new_date, rate_hist_dict, rate_hist_dict_len
 * 
 *     def getStockLadderTable(self, use_st_stock=False, ladder_max=7, save_file=True) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_19getStockLadderTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_18getStockLadderTable, "\n        \350\202\241\347\245\250\350\277\236\346\235\277\350\241\250\n        - \350\277\236\347\273\255\346\266\250\345\201\234\350\202\241\347\245\250\350\241\250\357\274\210\345\217\215\346\230\240\345\270\202\345\234\272\344\270\212\346\266\250\346\260\224\346\260\233\357\274\211\n        - \350\277\236\347\273\255\350\267\214\345\201\234\350\202\241\347\245\250\350\241\250\357\274\210\345\217\215\346\230\240\345\270\202\345\234\272\344\270\213\350\267\214\346\260\224\346\260\233\357\274\211\n        \346\225\260\346\215\256\351\234\200\346\261\202\n        - \350\256\241\347\256\227\344\273\212\346\227\245\347\232\204stock_ladder\357\274\214\350\246\201\344\271\210\351\234\200\350\246\201\344\273\212\345\244\251\345\217\212\345\211\215\351\235\242\350\277\236\347\273\255\344\270\200\346\256\265\346\227\266\351\227\264\347\232\204trade_distribution_code\346\225\260\346\215\256\n        - \350\246\201\344\271\210\351\234\200\350\246\201\345\211\215\344\270\200\346\227\245\347\232\204stock_ladder\357\274\214\345\222\214\344\273\212\346\227\245\347\232\204trade_distribution_code\n        :param use_st_stock:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_19getStockLadderTable = {"getStockLadderTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_19getStockLadderTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_18getStockLadderTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_19getStockLadderTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_use_st_stock = 0;
  PyObject *__pyx_v_ladder_max = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockLadderTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_use_st_stock,&__pyx_n_s_ladder_max,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_7)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3197, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_use_st_stock);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3197, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ladder_max);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3197, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3197, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockLadderTable") < 0)) __PYX_ERR(0, 3197, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_use_st_stock = values[1];
    __pyx_v_ladder_max = values[2];
    __pyx_v_save_file = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockLadderTable", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3197, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockLadderTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_18getStockLadderTable(__pyx_self, __pyx_v_self, __pyx_v_use_st_stock, __pyx_v_ladder_max, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_18getStockLadderTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_use_st_stock, PyObject *__pyx_v_ladder_max, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_dependent_table = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_stock_ladder = NULL;
  PyObject *__pyx_v_max_level = NULL;
  PyObject *__pyx_v_first_use_date = NULL;
  PyObject *__pyx_v_use_date = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  PyObject *__pyx_v_stock_ladder_dict = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_new_date = NULL;
  PyObject *__pyx_v_rate_hist_dict = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_rate_hist_dict_len = NULL;
  PyObject *__pyx_v_up_limit_stocks_list = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr19__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr20__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr20__pyx_v_value = NULL;
  PyObject *__pyx_9genexpr21__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockLadderTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3208
 *         :return:
 *         '''
 *         strategy_key_name = 'stock_uplimt_ladder'             # <<<<<<<<<<<<<<
 *         dependent_table = 'trade_distribution_code'
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_uplimt_ladder);
  __pyx_v_strategy_key_name = __pyx_n_s_stock_uplimt_ladder;

  /* "tbstock/tradeStrategy/stockStrategy.py":3209
 *         '''
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         dependent_table = 'trade_distribution_code'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_trade_distribution_code);
  __pyx_v_dependent_table = __pyx_n_s_trade_distribution_code;

  /* "tbstock/tradeStrategy/stockStrategy.py":3212
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 3212, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3213
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3213, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3213, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3214
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3214, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3215
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3216
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3214
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3213
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3219
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3219, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3220
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]['max_level'], self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3220, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3221
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]['max_level'], self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3222
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]['max_level'], self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_max_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 3222, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_11 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3220
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]['max_level'], self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3219
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3224
 *                 return self.strategy_json[strategy_key_name]['max_level'], self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getframe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3225
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         stock_ladder = {}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3227
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 *         stock_ladder = {}             # <<<<<<<<<<<<<<
 *         max_level = 0
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_stock_ladder = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3228
 * 
 *         stock_ladder = {}
 *         max_level = 0             # <<<<<<<<<<<<<<
 * 
 *         first_use_date = self.use_date
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_max_level = __pyx_int_0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3230
 *         max_level = 0
 * 
 *         first_use_date = self.use_date             # <<<<<<<<<<<<<<
 *         use_date = self.use_date
 *         for i in range(0, ladder_max):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_first_use_date = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3231
 * 
 *         first_use_date = self.use_date
 *         use_date = self.use_date             # <<<<<<<<<<<<<<
 *         for i in range(0, ladder_max):
 *             if i > 0:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_use_date = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3232
 *         first_use_date = self.use_date
 *         use_date = self.use_date
 *         for i in range(0, ladder_max):             # <<<<<<<<<<<<<<
 *             if i > 0:
 *                 use_date = utils.sh_calendar.previous_session(use_date).strftime('%Y%m%d')
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 3232, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ladder_max);
  __Pyx_GIVEREF(__pyx_v_ladder_max);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ladder_max)) __PYX_ERR(0, 3232, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3232, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3232, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_13(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3232, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3233
 *         use_date = self.use_date
 *         for i in range(0, ladder_max):
 *             if i > 0:             # <<<<<<<<<<<<<<
 *                 use_date = utils.sh_calendar.previous_session(use_date).strftime('%Y%m%d')
 * 
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3233, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3233, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3234
 *         for i in range(0, ladder_max):
 *             if i > 0:
 *                 use_date = utils.sh_calendar.previous_session(use_date).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *             # strategylog.json
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_use_date};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3234, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3234, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_use_date, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3233
 *         use_date = self.use_date
 *         for i in range(0, ladder_max):
 *             if i > 0:             # <<<<<<<<<<<<<<
 *                 use_date = utils.sh_calendar.previous_session(use_date).strftime('%Y%m%d')
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3237
 * 
 *             # strategylog.json
 *             json_file_name = use_date + '_strategylog.json'             # <<<<<<<<<<<<<<
 *             load_json_file = utils.update_strategy_logs_dir + json_file_name
 *             print('load_json_file = ', load_json_file)
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_use_date, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_json_file_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3238
 *             # strategylog.json
 *             json_file_name = use_date + '_strategylog.json'
 *             load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *             print('load_json_file = ', load_json_file)
 *             has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF_SET(__pyx_v_load_json_file, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3239
 *             json_file_name = use_date + '_strategylog.json'
 *             load_json_file = utils.update_strategy_logs_dir + json_file_name
 *             print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *             has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
    __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3239, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_load_json_file);
    __Pyx_GIVEREF(__pyx_v_load_json_file);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3239, __pyx_L1_error);
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3240
 *             load_json_file = utils.update_strategy_logs_dir + json_file_name
 *             print('load_json_file = ', load_json_file)
 *             has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *             if i == 1 and strategy_key_name in strategy_json:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_load_json_file, __pyx_v_json_file_name};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3240, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_8), 2) < 0) __PYX_ERR(0, 3240, __pyx_L1_error)
      __pyx_t_14 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L18_unpacking_done;
      __pyx_L17_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_14 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3240, __pyx_L1_error)
      __pyx_L18_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_has_strategy_file, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_strategy_json, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3242
 *             has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 *             if i == 1 and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *                 stock_ladder_dict = strategy_json[strategy_key_name]
 *                 max_level, stock_ladder = self.__getStockLadder(stock_ladder_dict, stock_ladder[str(i)])
 */
    __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_i, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3242, __pyx_L1_error)
    if (__pyx_t_7) {
    } else {
      __pyx_t_4 = __pyx_t_7;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3242, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_7;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3243
 * 
 *             if i == 1 and strategy_key_name in strategy_json:
 *                 stock_ladder_dict = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *                 max_level, stock_ladder = self.__getStockLadder(stock_ladder_dict, stock_ladder[str(i)])
 *                 break
 */
      __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_stock_ladder_dict = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3244
 *             if i == 1 and strategy_key_name in strategy_json:
 *                 stock_ladder_dict = strategy_json[strategy_key_name]
 *                 max_level, stock_ladder = self.__getStockLadder(stock_ladder_dict, stock_ladder[str(i)])             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_publishStrategy__getStockLadder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_Str(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_stock_ladder, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_stock_ladder_dict, __pyx_t_8};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
        PyObject* sequence = __pyx_t_11;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3244, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
        index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L22_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L22_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 3244, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L23_unpacking_done;
        __pyx_L22_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3244, __pyx_L1_error)
        __pyx_L23_unpacking_done:;
      }
      __Pyx_DECREF_SET(__pyx_v_max_level, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_stock_ladder, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3245
 *                 stock_ladder_dict = strategy_json[strategy_key_name]
 *                 max_level, stock_ladder = self.__getStockLadder(stock_ladder_dict, stock_ladder[str(i)])
 *                 break             # <<<<<<<<<<<<<<
 * 
 *             if not has_strategy_file or dependent_table not in strategy_json or not strategy_json[dependent_table]['']:
 */
      goto __pyx_L15_break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3242
 *             has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 *             if i == 1 and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *                 stock_ladder_dict = strategy_json[strategy_key_name]
 *                 max_level, stock_ladder = self.__getStockLadder(stock_ladder_dict, stock_ladder[str(i)])
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3247
 *                 break
 * 
 *             if not has_strategy_file or dependent_table not in strategy_json or not strategy_json[dependent_table]['']:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Can't load {dependent_table} [''] in {load_json_file}, begin to create.")
 *                 self.reset(use_date)
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3247, __pyx_L1_error)
    __pyx_t_5 = (!__pyx_t_7);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L25_bool_binop_done;
    }
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_dependent_table, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3247, __pyx_L1_error)
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L25_bool_binop_done;
    }
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_dependent_table); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_kp_s__128); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L25_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3248
 * 
 *             if not has_strategy_file or dependent_table not in strategy_json or not strategy_json[dependent_table]['']:
 *                 utils.logger.error(f"Can't load {dependent_table} [''] in {load_json_file}, begin to create.")             # <<<<<<<<<<<<<<
 *                 self.reset(use_date)
 *                 new_date, rate_hist_dict, rate_hist_dict_len = self.getTradeDistributionTable(multi_thread=True, workers=12, save_file=False)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Can_t_load);
      __pyx_t_9 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_Can_t_load);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Can_t_load);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_dependent_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_in);
      __pyx_t_10 = (65535 > __pyx_t_10) ? 65535 : __pyx_t_10;
      __pyx_t_9 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_in);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_in);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_load_json_file, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_begin_to_create);
      __pyx_t_9 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_begin_to_create);
      PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_begin_to_create);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3249
 *             if not has_strategy_file or dependent_table not in strategy_json or not strategy_json[dependent_table]['']:
 *                 utils.logger.error(f"Can't load {dependent_table} [''] in {load_json_file}, begin to create.")
 *                 self.reset(use_date)             # <<<<<<<<<<<<<<
 *                 new_date, rate_hist_dict, rate_hist_dict_len = self.getTradeDistributionTable(multi_thread=True, workers=12, save_file=False)
 *                 up_limit_stocks_list = rate_hist_dict['']
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_use_date};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3250
 *                 utils.logger.error(f"Can't load {dependent_table} [''] in {load_json_file}, begin to create.")
 *                 self.reset(use_date)
 *                 new_date, rate_hist_dict, rate_hist_dict_len = self.getTradeDistributionTable(multi_thread=True, workers=12, save_file=False)             # <<<<<<<<<<<<<<
 *                 up_limit_stocks_list = rate_hist_dict['']
 *             else:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDistributionTable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 3250, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 3250, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_save_file, Py_False) < 0) __PYX_ERR(0, 3250, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 3250, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); 
        } else {
          __pyx_t_11 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
        }
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_15 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_15);
        index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_15); if (unlikely(!__pyx_t_11)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_11);
        index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 2; __pyx_t_1 = __pyx_t_14(__pyx_t_15); if (unlikely(!__pyx_t_1)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_15), 3) < 0) __PYX_ERR(0, 3250, __pyx_L1_error)
        __pyx_t_14 = NULL;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        goto __pyx_L29_unpacking_done;
        __pyx_L28_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_14 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 3250, __pyx_L1_error)
        __pyx_L29_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_new_date, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_XDECREF_SET(__pyx_v_rate_hist_dict, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_v_rate_hist_dict_len, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3251
 *                 self.reset(use_date)
 *                 new_date, rate_hist_dict, rate_hist_dict_len = self.getTradeDistributionTable(multi_thread=True, workers=12, save_file=False)
 *                 up_limit_stocks_list = rate_hist_dict['']             # <<<<<<<<<<<<<<
 *             else:
 *                 up_limit_stocks_list = strategy_json[dependent_table]['']
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_rate_hist_dict, __pyx_kp_s__128); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_up_limit_stocks_list, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3247
 *                 break
 * 
 *             if not has_strategy_file or dependent_table not in strategy_json or not strategy_json[dependent_table]['']:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Can't load {dependent_table} [''] in {load_json_file}, begin to create.")
 *                 self.reset(use_date)
 */
      goto __pyx_L24;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3253
 *                 up_limit_stocks_list = rate_hist_dict['']
 *             else:
 *                 up_limit_stocks_list = strategy_json[dependent_table]['']             # <<<<<<<<<<<<<<
 * 
 *             # st
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_dependent_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_kp_s__128); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_up_limit_stocks_list, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L24:;

    /* "tbstock/tradeStrategy/stockStrategy.py":3256
 * 
 *             # st
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 up_limit_stocks_list = [x for x in up_limit_stocks_list if not self.isStStock(x)]
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_use_st_stock); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3256, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_4);
    if (__pyx_t_7) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3257
 *             # st
 *             if not use_st_stock:
 *                 up_limit_stocks_list = [x for x in up_limit_stocks_list if not self.isStStock(x)]             # <<<<<<<<<<<<<<
 * 
 *             stock_ladder[str(i + 1)] = []
 */
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3257, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (likely(PyList_CheckExact(__pyx_v_up_limit_stocks_list)) || PyTuple_CheckExact(__pyx_v_up_limit_stocks_list)) {
          __pyx_t_6 = __pyx_v_up_limit_stocks_list; __Pyx_INCREF(__pyx_t_6);
          __pyx_t_9 = 0;
          __pyx_t_16 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_up_limit_stocks_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3257, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3257, __pyx_L33_error)
        }
        for (;;) {
          if (likely(!__pyx_t_16)) {
            if (likely(PyList_CheckExact(__pyx_t_6))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3257, __pyx_L33_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 3257, __pyx_L33_error)
              #else
              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3257, __pyx_L33_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3257, __pyx_L33_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_8); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 3257, __pyx_L33_error)
              #else
              __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3257, __pyx_L33_error)
              __Pyx_GOTREF(__pyx_t_8);
              #endif
            }
          } else {
            __pyx_t_8 = __pyx_t_16(__pyx_t_6);
            if (unlikely(!__pyx_t_8)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 3257, __pyx_L33_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_8);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_x, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isStStock); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3257, __pyx_L33_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_15 = NULL;
          __pyx_t_12 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_15)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_15);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_12 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_9genexpr19__pyx_v_x};
            __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3257, __pyx_L33_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3257, __pyx_L33_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_4 = (!__pyx_t_7);
          if (__pyx_t_4) {
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr19__pyx_v_x))) __PYX_ERR(0, 3257, __pyx_L33_error)
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_x); __pyx_9genexpr19__pyx_v_x = 0;
        goto __pyx_L38_exit_scope;
        __pyx_L33_error:;
        __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_x); __pyx_9genexpr19__pyx_v_x = 0;
        goto __pyx_L1_error;
        __pyx_L38_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_up_limit_stocks_list, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3256
 * 
 *             # st
 *             if not use_st_stock:             # <<<<<<<<<<<<<<
 *                 up_limit_stocks_list = [x for x in up_limit_stocks_list if not self.isStStock(x)]
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3259
 *                 up_limit_stocks_list = [x for x in up_limit_stocks_list if not self.isStStock(x)]
 * 
 *             stock_ladder[str(i + 1)] = []             # <<<<<<<<<<<<<<
 *             # stock_ladder
 *             if i == 0:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyObject_Str(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_stock_ladder, __pyx_t_8, __pyx_t_1) < 0))) __PYX_ERR(0, 3259, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3261
 *             stock_ladder[str(i + 1)] = []
 *             # stock_ladder
 *             if i == 0:             # <<<<<<<<<<<<<<
 *                 stock_ladder[str(i + 1)] = up_limit_stocks_list
 *             else:
 */
    __pyx_t_4 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_i, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3261, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3262
 *             # stock_ladder
 *             if i == 0:
 *                 stock_ladder[str(i + 1)] = up_limit_stocks_list             # <<<<<<<<<<<<<<
 *             else:
 *                 for key in stock_ladder[str(i)]:
 */
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_stock_ladder, __pyx_t_8, __pyx_v_up_limit_stocks_list) < 0))) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3261
 *             stock_ladder[str(i + 1)] = []
 *             # stock_ladder
 *             if i == 0:             # <<<<<<<<<<<<<<
 *                 stock_ladder[str(i + 1)] = up_limit_stocks_list
 *             else:
 */
      goto __pyx_L39;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3264
 *                 stock_ladder[str(i + 1)] = up_limit_stocks_list
 *             else:
 *                 for key in stock_ladder[str(i)]:             # <<<<<<<<<<<<<<
 *                     if key in up_limit_stocks_list:
 *                         stock_ladder[str(i + 1)].append(key)
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_Str(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_8 = __pyx_t_1; __Pyx_INCREF(__pyx_t_8);
        __pyx_t_9 = 0;
        __pyx_t_16 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3264, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_16)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3264, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 3264, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3264, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 3264, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_16(__pyx_t_8);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 3264, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3265
 *             else:
 *                 for key in stock_ladder[str(i)]:
 *                     if key in up_limit_stocks_list:             # <<<<<<<<<<<<<<
 *                         stock_ladder[str(i + 1)].append(key)
 *                 if not stock_ladder[str(i + 1)]:
 */
        __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_v_up_limit_stocks_list, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3265, __pyx_L1_error)
        if (__pyx_t_4) {

          /* "tbstock/tradeStrategy/stockStrategy.py":3266
 *                 for key in stock_ladder[str(i)]:
 *                     if key in up_limit_stocks_list:
 *                         stock_ladder[str(i + 1)].append(key)             # <<<<<<<<<<<<<<
 *                 if not stock_ladder[str(i + 1)]:
 *                     del stock_ladder[str(i + 1)]
 */
          __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_6 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_stock_ladder, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_key); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 3266, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":3265
 *             else:
 *                 for key in stock_ladder[str(i)]:
 *                     if key in up_limit_stocks_list:             # <<<<<<<<<<<<<<
 *                         stock_ladder[str(i + 1)].append(key)
 *                 if not stock_ladder[str(i + 1)]:
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":3264
 *                 stock_ladder[str(i + 1)] = up_limit_stocks_list
 *             else:
 *                 for key in stock_ladder[str(i)]:             # <<<<<<<<<<<<<<
 *                     if key in up_limit_stocks_list:
 *                         stock_ladder[str(i + 1)].append(key)
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3267
 *                     if key in up_limit_stocks_list:
 *                         stock_ladder[str(i + 1)].append(key)
 *                 if not stock_ladder[str(i + 1)]:             # <<<<<<<<<<<<<<
 *                     del stock_ladder[str(i + 1)]
 *                     break
 */
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_stock_ladder, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3267, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_7 = (!__pyx_t_4);
      if (__pyx_t_7) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3268
 *                         stock_ladder[str(i + 1)].append(key)
 *                 if not stock_ladder[str(i + 1)]:
 *                     del stock_ladder[str(i + 1)]             # <<<<<<<<<<<<<<
 *                     break
 *             max_level += 1
 */
        __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely((PyObject_DelItem(__pyx_v_stock_ladder, __pyx_t_1) < 0))) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3269
 *                 if not stock_ladder[str(i + 1)]:
 *                     del stock_ladder[str(i + 1)]
 *                     break             # <<<<<<<<<<<<<<
 *             max_level += 1
 * 
 */
        goto __pyx_L15_break;

        /* "tbstock/tradeStrategy/stockStrategy.py":3267
 *                     if key in up_limit_stocks_list:
 *                         stock_ladder[str(i + 1)].append(key)
 *                 if not stock_ladder[str(i + 1)]:             # <<<<<<<<<<<<<<
 *                     del stock_ladder[str(i + 1)]
 *                     break
 */
      }
    }
    __pyx_L39:;

    /* "tbstock/tradeStrategy/stockStrategy.py":3270
 *                     del stock_ladder[str(i + 1)]
 *                     break
 *             max_level += 1             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_max_level, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_max_level, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3232
 *         first_use_date = self.use_date
 *         use_date = self.use_date
 *         for i in range(0, ladder_max):             # <<<<<<<<<<<<<<
 *             if i > 0:
 *                 use_date = utils.sh_calendar.previous_session(use_date).strftime('%Y%m%d')
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  goto __pyx_L45_for_end;
  __pyx_L15_break:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  goto __pyx_L45_for_end;
  __pyx_L45_for_end:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3273
 * 
 *         #
 *         stock_ladder = {key: {x: self.getStockNameByCode(x) for x in value} for key, value in stock_ladder.items()}             # <<<<<<<<<<<<<<
 *         stock_ladder['max_level'] = max_level
 * 
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L48_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = 0;
    if (unlikely(__pyx_v_stock_ladder == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 3273, __pyx_L48_error)
    }
    __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_stock_ladder, 0, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_18)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3273, __pyx_L48_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_8;
    __pyx_t_8 = 0;
    while (1) {
      __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_2, &__pyx_t_8, &__pyx_t_6, NULL, __pyx_t_18);
      if (unlikely(__pyx_t_19 == 0)) break;
      if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 3273, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_key, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_value, __pyx_t_6);
      __pyx_t_6 = 0;
      { /* enter inner scope */
        __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3273, __pyx_L53_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (likely(PyList_CheckExact(__pyx_9genexpr20__pyx_v_value)) || PyTuple_CheckExact(__pyx_9genexpr20__pyx_v_value)) {
          __pyx_t_8 = __pyx_9genexpr20__pyx_v_value; __Pyx_INCREF(__pyx_t_8);
          __pyx_t_20 = 0;
          __pyx_t_13 = NULL;
        } else {
          __pyx_t_20 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_9genexpr20__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3273, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3273, __pyx_L53_error)
        }
        for (;;) {
          if (likely(!__pyx_t_13)) {
            if (likely(PyList_CheckExact(__pyx_t_8))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3273, __pyx_L53_error)
                #endif
                if (__pyx_t_20 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_20); __Pyx_INCREF(__pyx_t_11); __pyx_t_20++; if (unlikely((0 < 0))) __PYX_ERR(0, 3273, __pyx_L53_error)
              #else
              __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3273, __pyx_L53_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3273, __pyx_L53_error)
                #endif
                if (__pyx_t_20 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_20); __Pyx_INCREF(__pyx_t_11); __pyx_t_20++; if (unlikely((0 < 0))) __PYX_ERR(0, 3273, __pyx_L53_error)
              #else
              __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3273, __pyx_L53_error)
              __Pyx_GOTREF(__pyx_t_11);
              #endif
            }
          } else {
            __pyx_t_11 = __pyx_t_13(__pyx_t_8);
            if (unlikely(!__pyx_t_11)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 3273, __pyx_L53_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_11);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_x, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockNameByCode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3273, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_21 = NULL;
          __pyx_t_12 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_21)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_21);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
              __pyx_t_12 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_9genexpr21__pyx_v_x};
            __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
            __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3273, __pyx_L53_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          if (unlikely(PyDict_SetItem(__pyx_t_6, (PyObject*)__pyx_9genexpr21__pyx_v_x, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 3273, __pyx_L53_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_x); __pyx_9genexpr21__pyx_v_x = 0;
        goto __pyx_L57_exit_scope;
        __pyx_L53_error:;
        __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_x); __pyx_9genexpr21__pyx_v_x = 0;
        goto __pyx_L48_error;
        __pyx_L57_exit_scope:;
      } /* exit inner scope */
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_9genexpr20__pyx_v_key, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 3273, __pyx_L48_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_key); __pyx_9genexpr20__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_value); __pyx_9genexpr20__pyx_v_value = 0;
    goto __pyx_L58_exit_scope;
    __pyx_L48_error:;
    __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_key); __pyx_9genexpr20__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_value); __pyx_9genexpr20__pyx_v_value = 0;
    goto __pyx_L1_error;
    __pyx_L58_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_stock_ladder, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3274
 *         #
 *         stock_ladder = {key: {x: self.getStockNameByCode(x) for x in value} for key, value in stock_ladder.items()}
 *         stock_ladder['max_level'] = max_level             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  if (unlikely((PyObject_SetItem(__pyx_v_stock_ladder, __pyx_n_s_max_level, __pyx_v_max_level) < 0))) __PYX_ERR(0, 3274, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3277
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_ladder['updated'] = True
 *             self.reset(first_use_date)
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3277, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3278
 *         # json
 *         if save_file:
 *             stock_ladder['updated'] = True             # <<<<<<<<<<<<<<
 *             self.reset(first_use_date)
 *             self.strategy_json[strategy_key_name] = stock_ladder
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_ladder, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3278, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3279
 *         if save_file:
 *             stock_ladder['updated'] = True
 *             self.reset(first_use_date)             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = stock_ladder
 *             self.dumpJsonToFile()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_first_use_date};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3280
 *             stock_ladder['updated'] = True
 *             self.reset(first_use_date)
 *             self.strategy_json[strategy_key_name] = stock_ladder             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return max_level, stock_ladder
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_strategy_key_name, __pyx_v_stock_ladder) < 0))) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3281
 *             self.reset(first_use_date)
 *             self.strategy_json[strategy_key_name] = stock_ladder
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return max_level, stock_ladder
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3277
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_ladder['updated'] = True
 *             self.reset(first_use_date)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3282
 *             self.strategy_json[strategy_key_name] = stock_ladder
 *             self.dumpJsonToFile()
 *         return max_level, stock_ladder             # <<<<<<<<<<<<<<
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_max_level);
  __Pyx_GIVEREF(__pyx_v_max_level);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_max_level)) __PYX_ERR(0, 3282, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_stock_ladder);
  __Pyx_GIVEREF(__pyx_v_stock_ladder);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_stock_ladder)) __PYX_ERR(0, 3282, __pyx_L1_error);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3197
 *         return new_date, rate_hist_dict, rate_hist_dict_len
 * 
 *     def getStockLadderTable(self, use_st_stock=False, ladder_max=7, save_file=True) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockLadderTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_dependent_table);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_stock_ladder);
  __Pyx_XDECREF(__pyx_v_max_level);
  __Pyx_XDECREF(__pyx_v_first_use_date);
  __Pyx_XDECREF(__pyx_v_use_date);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_stock_ladder_dict);
  __Pyx_XDECREF(__pyx_v_new_date);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict);
  __Pyx_XDECREF(__pyx_v_rate_hist_dict_len);
  __Pyx_XDECREF(__pyx_v_up_limit_stocks_list);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_value);
  __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3284
 *         return max_level, stock_ladder
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_21getStockHoldNumberChangeTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_20getStockHoldNumberChangeTable, "\n        \350\202\241\344\270\234\346\210\267\346\225\260\350\241\250\n        - \350\202\241\344\270\234\344\272\272\346\225\260\346\266\250\345\271\205\350\241\250\357\274\210\345\211\21510\347\232\204\350\202\241\347\245\250\357\274\211\357\274\214\351\231\204\345\270\246\346\234\200\346\226\260\350\202\241\344\270\234\344\272\272\346\225\260\346\233\264\346\226\260\346\227\245\346\234\237\357\274\214\344\272\272\345\235\207\346\214\201\350\202\241\351\207\221\351\242\235\n        - \350\202\241\344\270\234\344\272\272\346\225\260\351\231\215\345\271\205\350\241\250\357\274\210\345\211\21510\347\232\204\350\202\241\347\245\250\357\274\211\357\274\214\351\231\204\345\270\246\346\234\200\346\226\260\350\202\241\344\270\234\344\272\272\346\225\260\346\233\264\346\226\260\346\227\245\346\234\237\357\274\214\344\272\272\345\235\207\346\214\201\350\202\241\351\207\221\351\242\235\n\n        :param day_len:\n        :param new_date_len: =-1\350\241\250\345\220\215\350\257\245\345\217\202\346\225\260\344\270\215\350\265\267\344\275\234\347\224\250\n        :param quantile_tr:\n        :param save_file:\n        :param input_codes:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_21getStockHoldNumberChangeTable = {"getStockHoldNumberChangeTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_21getStockHoldNumberChangeTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_20getStockHoldNumberChangeTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_21getStockHoldNumberChangeTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_day_len = 0;
  PyObject *__pyx_v_new_date_len = 0;
  PyObject *__pyx_v_quantile_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  PyObject *__pyx_v_input_codes = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockHoldNumberChangeTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_day_len,&__pyx_n_s_new_date_len,&__pyx_n_s_quantile_tr,&__pyx_n_s_save_file,&__pyx_n_s_input_codes,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_90)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_neg_1)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_0_1)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_day_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_date_len);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quantile_tr);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_codes);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockHoldNumberChangeTable") < 0)) __PYX_ERR(0, 3284, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_day_len = values[1];
    __pyx_v_new_date_len = values[2];
    __pyx_v_quantile_tr = values[3];
    __pyx_v_save_file = values[4];
    __pyx_v_input_codes = ((PyObject*)values[5]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockHoldNumberChangeTable", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 3284, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_codes), (&PyList_Type), 1, "input_codes", 1))) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_20getStockHoldNumberChangeTable(__pyx_self, __pyx_v_self, __pyx_v_day_len, __pyx_v_new_date_len, __pyx_v_quantile_tr, __pyx_v_save_file, __pyx_v_input_codes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3329
 * 
 *         # 2
 *         df_filtered = data.groupby('code').filter(lambda x: len(x) > 2)             # <<<<<<<<<<<<<<
 * 
 *         # 'name''date'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_lambda9(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_lambda9 = {"lambda9", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_lambda9, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_lambda9(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda9 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3329, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda9") < 0)) __PYX_ERR(0, 3329, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda9", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3329, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda9", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda9(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda9(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda9", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3329, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_t_1 > 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda9", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3333
 *         # 'name''date'
 *         df_filtered = df_filtered.sort_values(by=['code', 'date'], ascending=[True, False])
 *         df_filtered['decrease_ratio'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: x.iloc[0] / x.iloc[-1])             # <<<<<<<<<<<<<<
 *         df_filtered['num_quantile'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: (x - x.min()) / (x.max() - x.min()))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_1lambda10(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_1lambda10 = {"lambda10", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_1lambda10, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_1lambda10(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda10 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3333, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda10") < 0)) __PYX_ERR(0, 3333, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda10", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3333, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda10", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda10(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda10(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda10", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda10", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3334
 *         df_filtered = df_filtered.sort_values(by=['code', 'date'], ascending=[True, False])
 *         df_filtered['decrease_ratio'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: x.iloc[0] / x.iloc[-1])
 *         df_filtered['num_quantile'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: (x - x.min()) / (x.max() - x.min()))             # <<<<<<<<<<<<<<
 * 
 *         # 'date'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_2lambda11(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_2lambda11 = {"lambda11", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_2lambda11, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_2lambda11(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda11 (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x_2,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3334, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda11") < 0)) __PYX_ERR(0, 3334, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda11", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3334, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda11", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda11(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda11(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda11", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_x, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_min); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable.lambda11", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3284
 *         return max_level, stock_ladder
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_20getStockHoldNumberChangeTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_day_len, PyObject *__pyx_v_new_date_len, PyObject *__pyx_v_quantile_tr, PyObject *__pyx_v_save_file, PyObject *__pyx_v_input_codes) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_now_datetime = NULL;
  PyObject *__pyx_v_start_datetime = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_df_filtered = NULL;
  PyObject *__pyx_v_new_datetime_threshold = NULL;
  PyObject *__pyx_v_return_df = NULL;
  PyObject *__pyx_v_stock_hold_num_table = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockHoldNumberChangeTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3298
 *         '''
 * 
 *         strategy_key_name = 'hold_number_decrease'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hold_number_decrease);
  __pyx_v_strategy_key_name = __pyx_n_s_hold_number_decrease;

  /* "tbstock/tradeStrategy/stockStrategy.py":3301
 * 
 *         #
 *         need_database_tables = ['stock_hold_number']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_hold_number);
  __Pyx_GIVEREF(__pyx_n_s_stock_hold_number);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_hold_number)) __PYX_ERR(0, 3301, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3302
 *         #
 *         need_database_tables = ['stock_hold_number']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3302, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3302, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3303
 *         need_database_tables = ['stock_hold_number']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3303, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3304
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3304, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3305
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3303
 *         need_database_tables = ['stock_hold_number']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3302
 *         #
 *         need_database_tables = ['stock_hold_number']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3307
 *                 return False
 * 
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3307, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3308
 * 
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3308, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3309
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3310
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3308
 * 
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3307
 *                 return False
 * 
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3312
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3313
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3315
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         start_datetime = utils.sh_calendar.session_offset(self.use_date, -(day_len - 1))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_now_datetime = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3316
 * 
 *         now_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 *         start_datetime = utils.sh_calendar.session_offset(self.use_date, -(day_len - 1))             # <<<<<<<<<<<<<<
 * 
 *         data = self.dataproc.loadTableContentByDate('stock_hold_number', start_datetime, now_datetime)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_day_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_t_8};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3316, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_start_datetime = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3318
 *         start_datetime = utils.sh_calendar.session_offset(self.use_date, -(day_len - 1))
 * 
 *         data = self.dataproc.loadTableContentByDate('stock_hold_number', start_datetime, now_datetime)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_loadTableContentByDate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_n_s_stock_hold_number, __pyx_v_start_datetime, __pyx_v_now_datetime};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_v_data = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3321
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             data = data[(data['code'].isin(input_codes))]
 * 
 */
  __pyx_t_4 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3322
 *         #
 *         if input_codes:
 *             data = data[(data['code'].isin(input_codes))]             # <<<<<<<<<<<<<<
 * 
 *         #  + ST +
 */
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_input_codes};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3322, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3321
 * 
 *         #
 *         if input_codes:             # <<<<<<<<<<<<<<
 *             data = data[(data['code'].isin(input_codes))]
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3325
 * 
 *         #  + ST +
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys()) + list(self.new_stock_dict.keys())             # <<<<<<<<<<<<<<
 *         data = data[~(data['code'].isin(exclude_codes))]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_t_8 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_8, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_exclude_codes = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3326
 *         #  + ST +
 *         exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys()) + list(self.new_stock_dict.keys())
 *         data = data[~(data['code'].isin(exclude_codes))]             # <<<<<<<<<<<<<<
 * 
 *         # 2
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_data, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isin); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_exclude_codes};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyNumber_Invert(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_data, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF_SET(__pyx_v_data, __pyx_t_11);
  __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3329
 * 
 *         # 2
 *         df_filtered = data.groupby('code').filter(lambda x: len(x) > 2)             # <<<<<<<<<<<<<<
 * 
 *         # 'name''date'
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_groupby); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_code};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_filter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_lambda9, 0, __pyx_n_s_publishStrategy_getStockHoldNumb, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_df_filtered = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3332
 * 
 *         # 'name''date'
 *         df_filtered = df_filtered.sort_values(by=['code', 'date'], ascending=[True, False])             # <<<<<<<<<<<<<<
 *         df_filtered['decrease_ratio'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: x.iloc[0] / x.iloc[-1])
 *         df_filtered['num_quantile'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: (x - x.min()) / (x.max() - x.min()))
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_code)) __PYX_ERR(0, 3332, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_date)) __PYX_ERR(0, 3332, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_by, __pyx_t_6) < 0) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, Py_True)) __PYX_ERR(0, 3332, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, Py_False)) __PYX_ERR(0, 3332, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ascending, __pyx_t_6) < 0) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_df_filtered, __pyx_t_6);
  __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3333
 *         # 'name''date'
 *         df_filtered = df_filtered.sort_values(by=['code', 'date'], ascending=[True, False])
 *         df_filtered['decrease_ratio'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: x.iloc[0] / x.iloc[-1])             # <<<<<<<<<<<<<<
 *         df_filtered['num_quantile'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: (x - x.min()) / (x.max() - x.min()))
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_groupby); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_code};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_holder_num); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_1lambda10, 0, __pyx_n_s_publishStrategy_getStockHoldNumb, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df_filtered, __pyx_n_s_decrease_ratio, __pyx_t_6) < 0))) __PYX_ERR(0, 3333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3334
 *         df_filtered = df_filtered.sort_values(by=['code', 'date'], ascending=[True, False])
 *         df_filtered['decrease_ratio'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: x.iloc[0] / x.iloc[-1])
 *         df_filtered['num_quantile'] = df_filtered.groupby('code')['holder_num'].transform(lambda x: (x - x.min()) / (x.max() - x.min()))             # <<<<<<<<<<<<<<
 * 
 *         # 'date'
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_groupby); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_code};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_holder_num); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_transform); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getStockHoldNumberChangeTable_2lambda11, 0, __pyx_n_s_publishStrategy_getStockHoldNumb, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_df_filtered, __pyx_n_s_num_quantile, __pyx_t_6) < 0))) __PYX_ERR(0, 3334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3337
 * 
 *         # 'date'
 *         df_filtered = df_filtered.drop_duplicates(subset='code', keep='first')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_drop_duplicates); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_subset, __pyx_n_s_code) < 0) __PYX_ERR(0, 3337, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_keep, __pyx_n_s_first) < 0) __PYX_ERR(0, 3337, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_df_filtered, __pyx_t_11);
  __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3340
 * 
 *         #
 *         if new_date_len != -1:             # <<<<<<<<<<<<<<
 *             new_datetime_threshold = utils.sh_calendar.session_offset(self.use_date, -(new_date_len - 1))
 *             df_filtered = df_filtered[df_filtered['date'] > new_datetime_threshold.date()]
 */
  __pyx_t_4 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_new_date_len, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3340, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3341
 *         #
 *         if new_date_len != -1:
 *             new_datetime_threshold = utils.sh_calendar.session_offset(self.use_date, -(new_date_len - 1))             # <<<<<<<<<<<<<<
 *             df_filtered = df_filtered[df_filtered['date'] > new_datetime_threshold.date()]
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_new_date_len, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyNumber_Negative(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_new_datetime_threshold = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3342
 *         if new_date_len != -1:
 *             new_datetime_threshold = utils.sh_calendar.session_offset(self.use_date, -(new_date_len - 1))
 *             df_filtered = df_filtered[df_filtered['date'] > new_datetime_threshold.date()]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df_filtered, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_datetime_threshold, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_11, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_df_filtered, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_df_filtered, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3340
 * 
 *         #
 *         if new_date_len != -1:             # <<<<<<<<<<<<<<
 *             new_datetime_threshold = utils.sh_calendar.session_offset(self.use_date, -(new_date_len - 1))
 *             df_filtered = df_filtered[df_filtered['date'] > new_datetime_threshold.date()]
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3345
 * 
 *         #
 *         if not input_codes:             # <<<<<<<<<<<<<<
 *             df_filtered = df_filtered[df_filtered['num_quantile'] < quantile_tr]
 *             # df_filtered = df_filtered.sort_values(by=['decrease_ratio', 'num_quantile'], ascending=[True, True])
 */
  __pyx_t_4 = (__pyx_v_input_codes != Py_None)&&(PyList_GET_SIZE(__pyx_v_input_codes) != 0);
  __pyx_t_7 = (!__pyx_t_4);
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3346
 *         #
 *         if not input_codes:
 *             df_filtered = df_filtered[df_filtered['num_quantile'] < quantile_tr]             # <<<<<<<<<<<<<<
 *             # df_filtered = df_filtered.sort_values(by=['decrease_ratio', 'num_quantile'], ascending=[True, True])
 *             # df_filtered = df_filtered.sort_values(by='decrease_ratio', ascending=True)
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df_filtered, __pyx_n_s_num_quantile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_quantile_tr, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3346, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_df_filtered, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3346, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_df_filtered, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3349
 *             # df_filtered = df_filtered.sort_values(by=['decrease_ratio', 'num_quantile'], ascending=[True, True])
 *             # df_filtered = df_filtered.sort_values(by='decrease_ratio', ascending=True)
 *             df_filtered = df_filtered.sort_values(by='avg_amount_pa', ascending=False)             # <<<<<<<<<<<<<<
 * 
 *         return_df = df_filtered.reset_index(drop=True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_by, __pyx_n_s_avg_amount_pa) < 0) __PYX_ERR(0, 3349, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 3349, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_df_filtered, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3345
 * 
 *         #
 *         if not input_codes:             # <<<<<<<<<<<<<<
 *             df_filtered = df_filtered[df_filtered['num_quantile'] < quantile_tr]
 *             # df_filtered = df_filtered.sort_values(by=['decrease_ratio', 'num_quantile'], ascending=[True, True])
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3351
 *             df_filtered = df_filtered.sort_values(by='avg_amount_pa', ascending=False)
 * 
 *         return_df = df_filtered.reset_index(drop=True)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_filtered, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 3351, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_return_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3354
 * 
 *         # json
 *         return_df = return_df[['name', 'code', 'date', 'holder_num', 'avg_amount_pa', 'decrease_ratio', 'num_quantile']]             # <<<<<<<<<<<<<<
 *         return_df['date'] = pd.to_datetime(return_df['date']).dt.strftime('%Y%m%d')
 *         return_df = return_df.set_index(['name'])
 */
  __pyx_t_3 = PyList_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_name)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_code)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_date)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_holder_num);
  __Pyx_GIVEREF(__pyx_n_s_holder_num);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_s_holder_num)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_avg_amount_pa);
  __Pyx_GIVEREF(__pyx_n_s_avg_amount_pa);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_s_avg_amount_pa)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_decrease_ratio);
  __Pyx_GIVEREF(__pyx_n_s_decrease_ratio);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_s_decrease_ratio)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_num_quantile);
  __Pyx_GIVEREF(__pyx_n_s_num_quantile);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_s_num_quantile)) __PYX_ERR(0, 3354, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_return_df, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_return_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3355
 *         # json
 *         return_df = return_df[['name', 'code', 'date', 'holder_num', 'avg_amount_pa', 'decrease_ratio', 'num_quantile']]
 *         return_df['date'] = pd.to_datetime(return_df['date']).dt.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         return_df = return_df.set_index(['name'])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_pd); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_return_df, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_8 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_return_df, __pyx_n_s_date, __pyx_t_1) < 0))) __PYX_ERR(0, 3355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3356
 *         return_df = return_df[['name', 'code', 'date', 'holder_num', 'avg_amount_pa', 'decrease_ratio', 'num_quantile']]
 *         return_df['date'] = pd.to_datetime(return_df['date']).dt.strftime('%Y%m%d')
 *         return_df = return_df.set_index(['name'])             # <<<<<<<<<<<<<<
 * 
 *         if save_file:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_return_df, __pyx_n_s_set_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_name)) __PYX_ERR(0, 3356, __pyx_L1_error);
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_return_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3358
 *         return_df = return_df.set_index(['name'])
 * 
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_hold_num_table = return_df.to_dict()
 *             stock_hold_num_table['updated'] = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3358, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3359
 * 
 *         if save_file:
 *             stock_hold_num_table = return_df.to_dict()             # <<<<<<<<<<<<<<
 *             stock_hold_num_table['updated'] = True
 *             stock_hold_num_table['day_len'] = day_len
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_return_df, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_stock_hold_num_table = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3360
 *         if save_file:
 *             stock_hold_num_table = return_df.to_dict()
 *             stock_hold_num_table['updated'] = True             # <<<<<<<<<<<<<<
 *             stock_hold_num_table['day_len'] = day_len
 *             self.strategy_json[strategy_key_name] = stock_hold_num_table
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_hold_num_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3360, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3361
 *             stock_hold_num_table = return_df.to_dict()
 *             stock_hold_num_table['updated'] = True
 *             stock_hold_num_table['day_len'] = day_len             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = stock_hold_num_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_stock_hold_num_table, __pyx_n_s_day_len, __pyx_v_day_len) < 0))) __PYX_ERR(0, 3361, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3362
 *             stock_hold_num_table['updated'] = True
 *             stock_hold_num_table['day_len'] = day_len
 *             self.strategy_json[strategy_key_name] = stock_hold_num_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return return_df
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_strategy_key_name, __pyx_v_stock_hold_num_table) < 0))) __PYX_ERR(0, 3362, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3363
 *             stock_hold_num_table['day_len'] = day_len
 *             self.strategy_json[strategy_key_name] = stock_hold_num_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return return_df
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3358
 *         return_df = return_df.set_index(['name'])
 * 
 *         if save_file:             # <<<<<<<<<<<<<<
 *             stock_hold_num_table = return_df.to_dict()
 *             stock_hold_num_table['updated'] = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3364
 *             self.strategy_json[strategy_key_name] = stock_hold_num_table
 *             self.dumpJsonToFile()
 *         return return_df             # <<<<<<<<<<<<<<
 * 
 *     def __getStockLadder(self, stock_ladder_dict_yesterday: dict, stock_up_limit_list_today: list) -> (int, dict):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_return_df);
  __pyx_r = __pyx_v_return_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3284
 *         return max_level, stock_ladder
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHoldNumberChangeTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_now_datetime);
  __Pyx_XDECREF(__pyx_v_start_datetime);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_df_filtered);
  __Pyx_XDECREF(__pyx_v_new_datetime_threshold);
  __Pyx_XDECREF(__pyx_v_return_df);
  __Pyx_XDECREF(__pyx_v_stock_hold_num_table);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3366
 *         return return_df
 * 
 *     def __getStockLadder(self, stock_ladder_dict_yesterday: dict, stock_up_limit_list_today: list) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 *          stock_uplimt_ladder  stock_uplimt_ladder
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_23__getStockLadder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22__getStockLadder, "\n        \346\240\271\346\215\256\345\211\215\344\270\200\346\227\245\347\232\204 stock_uplimt_ladder \350\241\250\345\222\214\345\275\223\346\227\245\347\232\204\346\266\250\345\201\234\350\241\250\357\274\214\350\256\241\347\256\227\345\275\223\346\227\245\347\232\204 stock_uplimt_ladder \350\241\250\n        :param stock_ladder_dict_yesterday:\n        :param stock_up_limit_list_today:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_23__getStockLadder = {"__getStockLadder", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_23__getStockLadder, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22__getStockLadder};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_23__getStockLadder(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_ladder_dict_yesterday = 0;
  PyObject *__pyx_v_stock_up_limit_list_today = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getStockLadder (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_ladder_dict_yesterday,&__pyx_n_s_stock_up_limit_list_today,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_ladder_dict_yesterday)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getStockLadder", 1, 3, 3, 1); __PYX_ERR(0, 3366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_up_limit_list_today)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getStockLadder", 1, 3, 3, 2); __PYX_ERR(0, 3366, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__getStockLadder") < 0)) __PYX_ERR(0, 3366, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_ladder_dict_yesterday = ((PyObject*)values[1]);
    __pyx_v_stock_up_limit_list_today = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getStockLadder", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3366, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.__getStockLadder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_ladder_dict_yesterday), (&PyDict_Type), 0, "stock_ladder_dict_yesterday", 1))) __PYX_ERR(0, 3366, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_up_limit_list_today), (&PyList_Type), 0, "stock_up_limit_list_today", 1))) __PYX_ERR(0, 3366, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22__getStockLadder(__pyx_self, __pyx_v_self, __pyx_v_stock_ladder_dict_yesterday, __pyx_v_stock_up_limit_list_today);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_22__getStockLadder(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_ladder_dict_yesterday, PyObject *__pyx_v_stock_up_limit_list_today) {
  PyObject *__pyx_v_stock_ladder = NULL;
  int __pyx_v_is_get_max_level;
  PyObject *__pyx_v_max_level = NULL;
  PyObject *__pyx_v_level = NULL;
  PyObject *__pyx_v_level_code_list = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getStockLadder", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3373
 *         :return:
 *         '''
 *         stock_ladder = {}             # <<<<<<<<<<<<<<
 *         is_get_max_level = False
 *         max_level = stock_ladder_dict_yesterday['max_level']
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_stock_ladder = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3374
 *         '''
 *         stock_ladder = {}
 *         is_get_max_level = False             # <<<<<<<<<<<<<<
 *         max_level = stock_ladder_dict_yesterday['max_level']
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):
 */
  __pyx_v_is_get_max_level = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3375
 *         stock_ladder = {}
 *         is_get_max_level = False
 *         max_level = stock_ladder_dict_yesterday['max_level']             # <<<<<<<<<<<<<<
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):
 *             stock_ladder[str(level + 1)] = []
 */
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder_dict_yesterday, __pyx_n_s_max_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_max_level = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3376
 *         is_get_max_level = False
 *         max_level = stock_ladder_dict_yesterday['max_level']
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):             # <<<<<<<<<<<<<<
 *             stock_ladder[str(level + 1)] = []
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 */
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder_dict_yesterday, __pyx_n_s_max_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3376, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(0, 3376, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_neg_1)) __PYX_ERR(0, 3376, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3376, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3376, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 3376, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3376, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 3376, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3376, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3376, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_level, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3377
 *         max_level = stock_ladder_dict_yesterday['max_level']
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):
 *             stock_ladder[str(level + 1)] = []             # <<<<<<<<<<<<<<
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 *             for x in level_code_list:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_level, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Str(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely((PyDict_SetItem(__pyx_v_stock_ladder, __pyx_t_6, __pyx_t_1) < 0))) __PYX_ERR(0, 3377, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3378
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):
 *             stock_ladder[str(level + 1)] = []
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())             # <<<<<<<<<<<<<<
 *             for x in level_code_list:
 *                 if x in stock_up_limit_list_today:
 */
    __pyx_t_6 = __Pyx_PyObject_Str(__pyx_v_level); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder_dict_yesterday, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_level_code_list, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3379
 *             stock_ladder[str(level + 1)] = []
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 *             for x in level_code_list:             # <<<<<<<<<<<<<<
 *                 if x in stock_up_limit_list_today:
 *                     if not is_get_max_level:
 */
    __pyx_t_6 = __pyx_v_level_code_list; __Pyx_INCREF(__pyx_t_6);
    __pyx_t_8 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3379, __pyx_L1_error)
        #endif
        if (__pyx_t_8 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 3379, __pyx_L1_error)
      #else
      __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3379, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3380
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 *             for x in level_code_list:
 *                 if x in stock_up_limit_list_today:             # <<<<<<<<<<<<<<
 *                     if not is_get_max_level:
 *                         max_level = level + 1
 */
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_x, __pyx_v_stock_up_limit_list_today, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3380, __pyx_L1_error)
      if (__pyx_t_9) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3381
 *             for x in level_code_list:
 *                 if x in stock_up_limit_list_today:
 *                     if not is_get_max_level:             # <<<<<<<<<<<<<<
 *                         max_level = level + 1
 *                         is_get_max_level = True
 */
        __pyx_t_9 = (!__pyx_v_is_get_max_level);
        if (__pyx_t_9) {

          /* "tbstock/tradeStrategy/stockStrategy.py":3382
 *                 if x in stock_up_limit_list_today:
 *                     if not is_get_max_level:
 *                         max_level = level + 1             # <<<<<<<<<<<<<<
 *                         is_get_max_level = True
 *                     stock_ladder[str(level + 1)].append(x)
 */
          __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_level, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3382, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF_SET(__pyx_v_max_level, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":3383
 *                     if not is_get_max_level:
 *                         max_level = level + 1
 *                         is_get_max_level = True             # <<<<<<<<<<<<<<
 *                     stock_ladder[str(level + 1)].append(x)
 *             if not stock_ladder[str(level + 1)]:
 */
          __pyx_v_is_get_max_level = 1;

          /* "tbstock/tradeStrategy/stockStrategy.py":3381
 *             for x in level_code_list:
 *                 if x in stock_up_limit_list_today:
 *                     if not is_get_max_level:             # <<<<<<<<<<<<<<
 *                         max_level = level + 1
 *                         is_get_max_level = True
 */
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":3384
 *                         max_level = level + 1
 *                         is_get_max_level = True
 *                     stock_ladder[str(level + 1)].append(x)             # <<<<<<<<<<<<<<
 *             if not stock_ladder[str(level + 1)]:
 *                 del stock_ladder[str(level + 1)]
 */
        __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_level, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_x); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3384, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3380
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 *             for x in level_code_list:
 *                 if x in stock_up_limit_list_today:             # <<<<<<<<<<<<<<
 *                     if not is_get_max_level:
 *                         max_level = level + 1
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3379
 *             stock_ladder[str(level + 1)] = []
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 *             for x in level_code_list:             # <<<<<<<<<<<<<<
 *                 if x in stock_up_limit_list_today:
 *                     if not is_get_max_level:
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3385
 *                         is_get_max_level = True
 *                     stock_ladder[str(level + 1)].append(x)
 *             if not stock_ladder[str(level + 1)]:             # <<<<<<<<<<<<<<
 *                 del stock_ladder[str(level + 1)]
 *         stock_ladder['1'] = stock_up_limit_list_today
 */
    __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_level, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_stock_ladder, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3385, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = (!__pyx_t_9);
    if (__pyx_t_11) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3386
 *                     stock_ladder[str(level + 1)].append(x)
 *             if not stock_ladder[str(level + 1)]:
 *                 del stock_ladder[str(level + 1)]             # <<<<<<<<<<<<<<
 *         stock_ladder['1'] = stock_up_limit_list_today
 * 
 */
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_level, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely((PyDict_DelItem(__pyx_v_stock_ladder, __pyx_t_1) < 0))) __PYX_ERR(0, 3386, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3385
 *                         is_get_max_level = True
 *                     stock_ladder[str(level + 1)].append(x)
 *             if not stock_ladder[str(level + 1)]:             # <<<<<<<<<<<<<<
 *                 del stock_ladder[str(level + 1)]
 *         stock_ladder['1'] = stock_up_limit_list_today
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3376
 *         is_get_max_level = False
 *         max_level = stock_ladder_dict_yesterday['max_level']
 *         for level in range(stock_ladder_dict_yesterday['max_level'], 0, -1):             # <<<<<<<<<<<<<<
 *             stock_ladder[str(level + 1)] = []
 *             level_code_list = list(stock_ladder_dict_yesterday[str(level)].keys())
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3387
 *             if not stock_ladder[str(level + 1)]:
 *                 del stock_ladder[str(level + 1)]
 *         stock_ladder['1'] = stock_up_limit_list_today             # <<<<<<<<<<<<<<
 * 
 *         return max_level, stock_ladder
 */
  if (unlikely((PyDict_SetItem(__pyx_v_stock_ladder, __pyx_kp_s_1, __pyx_v_stock_up_limit_list_today) < 0))) __PYX_ERR(0, 3387, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3389
 *         stock_ladder['1'] = stock_up_limit_list_today
 * 
 *         return max_level, stock_ladder             # <<<<<<<<<<<<<<
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_max_level);
  __Pyx_GIVEREF(__pyx_v_max_level);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_max_level)) __PYX_ERR(0, 3389, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_stock_ladder);
  __Pyx_GIVEREF(__pyx_v_stock_ladder);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_stock_ladder)) __PYX_ERR(0, 3389, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3366
 *         return return_df
 * 
 *     def __getStockLadder(self, stock_ladder_dict_yesterday: dict, stock_up_limit_list_today: list) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 *          stock_uplimt_ladder  stock_uplimt_ladder
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.__getStockLadder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_ladder);
  __Pyx_XDECREF(__pyx_v_max_level);
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XDECREF(__pyx_v_level_code_list);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3391
 *         return max_level, stock_ladder
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):             # <<<<<<<<<<<<<<
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDayChangeRankBetweenDate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDayChangeRankBetweenDate = {"getTradeDayChangeRankBetweenDate", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDayChangeRankBetweenDate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDayChangeRankBetweenDate(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_rank_level = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTradeDayChangeRankBetweenDate (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_name,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_rank_level,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_3)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getTradeDayChangeRankBetweenDate", 0, 4, 5, 1); __PYX_ERR(0, 3391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getTradeDayChangeRankBetweenDate", 0, 4, 5, 2); __PYX_ERR(0, 3391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getTradeDayChangeRankBetweenDate", 0, 4, 5, 3); __PYX_ERR(0, 3391, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rank_level);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3391, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getTradeDayChangeRankBetweenDate") < 0)) __PYX_ERR(0, 3391, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_table_name = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
    __pyx_v_rank_level = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTradeDayChangeRankBetweenDate", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 3391, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDayChangeRankBetweenDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24getTradeDayChangeRankBetweenDate(__pyx_self, __pyx_v_self, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_rank_level);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3417
 * 
 *         # price
 *         def cumulative_product(group):             # <<<<<<<<<<<<<<
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()
 *             return group
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_1cumulative_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_1cumulative_product = {"cumulative_product", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_1cumulative_product, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_1cumulative_product(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_group = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cumulative_product (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_group)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cumulative_product") < 0)) __PYX_ERR(0, 3417, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_group = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cumulative_product", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3417, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDayChangeRankBetweenDate.cumulative_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_cumulative_product(__pyx_self, __pyx_v_group);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_cumulative_product(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_group) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cumulative_product", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3418
 *         # price
 *         def cumulative_product(group):
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()             # <<<<<<<<<<<<<<
 *             return group
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_group, __pyx_n_s_change_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cumprod); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_group, __pyx_n_s_cumprod_change_ratio, __pyx_t_1) < 0))) __PYX_ERR(0, 3418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3419
 *         def cumulative_product(group):
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()
 *             return group             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_group);
  __pyx_r = __pyx_v_group;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3417
 * 
 *         # price
 *         def cumulative_product(group):             # <<<<<<<<<<<<<<
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()
 *             return group
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDayChangeRankBetweenDate.cumulative_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3391
 *         return max_level, stock_ladder
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):             # <<<<<<<<<<<<<<
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 */

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_24getTradeDayChangeRankBetweenDate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_rank_level) {
  PyObject *__pyx_v_trade_day_df = NULL;
  PyObject *__pyx_v_exclude_codes = NULL;
  PyObject *__pyx_v_df_grouped = NULL;
  PyObject *__pyx_v_cumulative_product = 0;
  PyObject *__pyx_v_result_df = NULL;
  PyObject *__pyx_v_head_tail_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTradeDayChangeRankBetweenDate", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3392
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)             # <<<<<<<<<<<<<<
 *         if table_name == 'stock_industry_trade_day':
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTableContentByDate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_end_date};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_trade_day_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3393
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':             # <<<<<<<<<<<<<<
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name == 'stock_concept_trade_day':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_table_name, __pyx_n_s_stock_industry_trade_day, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3393, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3394
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1             # <<<<<<<<<<<<<<
 *         elif table_name == 'stock_concept_trade_day':
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_1, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio, __pyx_t_1) < 0))) __PYX_ERR(0, 3394, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3393
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':             # <<<<<<<<<<<<<<
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name == 'stock_concept_trade_day':
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3395
 *         if table_name == 'stock_industry_trade_day':
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name == 'stock_concept_trade_day':             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_table_name, __pyx_n_s_stock_concept_trade_day, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3395, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3396
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name == 'stock_concept_trade_day':
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #             # <<<<<<<<<<<<<<
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name.startswith("stock_trade_day"):
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_exclude_concepts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_trade_day_df, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_trade_day_df, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3397
 *         elif table_name == 'stock_concept_trade_day':
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1             # <<<<<<<<<<<<<<
 *         elif table_name.startswith("stock_trade_day"):
 *             #  + ST +
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_1, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio, __pyx_t_1) < 0))) __PYX_ERR(0, 3397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3395
 *         if table_name == 'stock_industry_trade_day':
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name == 'stock_concept_trade_day':             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3398
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name.startswith("stock_trade_day"):             # <<<<<<<<<<<<<<
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys())  # + list(self.new_stock_dict.keys())
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_table_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_n_s_stock_trade_day};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3400
 *         elif table_name.startswith("stock_trade_day"):
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys())  # + list(self.new_stock_dict.keys())             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Add(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_exclude_codes = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3401
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys())  # + list(self.new_stock_dict.keys())
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_exclude_codes};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_trade_day_df, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_trade_day_df, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3402
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys())  # + list(self.new_stock_dict.keys())
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]             # <<<<<<<<<<<<<<
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_trade_day_df, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_trade_day_df, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3403
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']             # <<<<<<<<<<<<<<
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio, __pyx_t_3) < 0))) __PYX_ERR(0, 3403, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3398
 *             trade_day_df = trade_day_df[~(trade_day_df['code'].isin(list(self.exclude_concepts.keys())))]  #
 *             trade_day_df['change_ratio'] = trade_day_df['change_ratio'] / 100.0 + 1
 *         elif table_name.startswith("stock_trade_day"):             # <<<<<<<<<<<<<<
 *             #  + ST +
 *             exclude_codes = list(self.delist_stock_dict.keys()) + list(self.st_stock_dict.keys())  # + list(self.new_stock_dict.keys())
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3404
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         elif table_name in ['future_trade_day', 'index_trade_day']:             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             if table_name == 'index_trade_day':
 */
  __Pyx_INCREF(__pyx_v_table_name);
  __pyx_t_3 = __pyx_v_table_name;
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_future_trade_day, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3404, __pyx_L1_error)
  if (!__pyx_t_8) {
  } else {
    __pyx_t_5 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_index_trade_day, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3404, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __pyx_t_5;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3405
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]             # <<<<<<<<<<<<<<
 *             if table_name == 'index_trade_day':
 *                 exclude_codes = list(self.exclude_indexes.keys())
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_trade_day_df, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_trade_day_df, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3406
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             if table_name == 'index_trade_day':             # <<<<<<<<<<<<<<
 *                 exclude_codes = list(self.exclude_indexes.keys())
 *                 trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 */
    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_table_name, __pyx_n_s_index_trade_day, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3406, __pyx_L1_error)
    if (__pyx_t_8) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3407
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             if table_name == 'index_trade_day':
 *                 exclude_codes = list(self.exclude_indexes.keys())             # <<<<<<<<<<<<<<
 *                 trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_exclude_indexes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3407, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_exclude_codes = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3408
 *             if table_name == 'index_trade_day':
 *                 exclude_codes = list(self.exclude_indexes.keys())
 *                 trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]             # <<<<<<<<<<<<<<
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         else:
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isin); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_exclude_codes};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3408, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_trade_day_df, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_trade_day_df, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3406
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             if table_name == 'index_trade_day':             # <<<<<<<<<<<<<<
 *                 exclude_codes = list(self.exclude_indexes.keys())
 *                 trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3409
 *                 exclude_codes = list(self.exclude_indexes.keys())
 *                 trade_day_df = trade_day_df[~(trade_day_df['code'].isin(exclude_codes))]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']             # <<<<<<<<<<<<<<
 *         else:
 *             return pd.DataFrame()
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_trade_day_df, __pyx_n_s_pre_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely((PyObject_SetItem(__pyx_v_trade_day_df, __pyx_n_s_change_ratio, __pyx_t_3) < 0))) __PYX_ERR(0, 3409, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3404
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         elif table_name in ['future_trade_day', 'index_trade_day']:             # <<<<<<<<<<<<<<
 *             trade_day_df = trade_day_df[trade_day_df['pre_close'] != 0]
 *             if table_name == 'index_trade_day':
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3411
 *             trade_day_df['change_ratio'] = trade_day_df['close'] / trade_day_df['pre_close']
 *         else:
 *             return pd.DataFrame()             # <<<<<<<<<<<<<<
 * 
 *         # codedate
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3411, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3414
 * 
 *         # codedate
 *         df_grouped = trade_day_df.sort_values(by=['code', 'date'], ascending=[True, True])             # <<<<<<<<<<<<<<
 * 
 *         # price
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_trade_day_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_code);
  __Pyx_GIVEREF(__pyx_n_s_code);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_code)) __PYX_ERR(0, 3414, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_date)) __PYX_ERR(0, 3414, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_by, __pyx_t_7) < 0) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, Py_True)) __PYX_ERR(0, 3414, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, Py_True)) __PYX_ERR(0, 3414, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ascending, __pyx_t_7) < 0) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_df_grouped = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3417
 * 
 *         # price
 *         def cumulative_product(group):             # <<<<<<<<<<<<<<
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()
 *             return group
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getTradeDayChangeRankBetweenDate_1cumulative_product, 0, __pyx_n_s_publishStrategy_getTradeDayChang, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_v_cumulative_product = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3422
 * 
 *         #
 *         df_grouped['group_column'] = df_grouped['code']             # <<<<<<<<<<<<<<
 *         result_df = df_grouped.groupby('group_column', group_keys=False).apply(cumulative_product, include_groups=False)
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_df_grouped, __pyx_n_s_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely((PyObject_SetItem(__pyx_v_df_grouped, __pyx_n_s_group_column, __pyx_t_7) < 0))) __PYX_ERR(0, 3422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3423
 *         #
 *         df_grouped['group_column'] = df_grouped['code']
 *         result_df = df_grouped.groupby('group_column', group_keys=False).apply(cumulative_product, include_groups=False)             # <<<<<<<<<<<<<<
 * 
 *         if result_df['date'].dtype == 'datetime64[ns]':
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_df_grouped, __pyx_n_s_groupby); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_group_keys, Py_False) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__136, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_apply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_cumulative_product);
  __Pyx_GIVEREF(__pyx_v_cumulative_product);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cumulative_product)) __PYX_ERR(0, 3423, __pyx_L1_error);
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_include_groups, Py_False) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_result_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3425
 *         result_df = df_grouped.groupby('group_column', group_keys=False).apply(cumulative_product, include_groups=False)
 * 
 *         if result_df['date'].dtype == 'datetime64[ns]':             # <<<<<<<<<<<<<<
 *             result_df = result_df[result_df['date'] == end_date]
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_df, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_datetime64_ns, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3425, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_8) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3426
 * 
 *         if result_df['date'].dtype == 'datetime64[ns]':
 *             result_df = result_df[result_df['date'] == end_date]             # <<<<<<<<<<<<<<
 *         else:
 *             result_df = result_df[result_df['date'] == end_date.date()]
 */
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_df, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_7, __pyx_v_end_date, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3426, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_result_df, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_result_df, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3425
 *         result_df = df_grouped.groupby('group_column', group_keys=False).apply(cumulative_product, include_groups=False)
 * 
 *         if result_df['date'].dtype == 'datetime64[ns]':             # <<<<<<<<<<<<<<
 *             result_df = result_df[result_df['date'] == end_date]
 *         else:
 */
    goto __pyx_L7;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3428
 *             result_df = result_df[result_df['date'] == end_date]
 *         else:
 *             result_df = result_df[result_df['date'] == end_date.date()]             # <<<<<<<<<<<<<<
 *         result_df = result_df.sort_values(by='cumprod_change_ratio', ascending=False)
 * 
 */
  /*else*/ {
    __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_df, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_end_date, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_result_df, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_result_df, __pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L7:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3429
 *         else:
 *             result_df = result_df[result_df['date'] == end_date.date()]
 *         result_df = result_df.sort_values(by='cumprod_change_ratio', ascending=False)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_df, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_by, __pyx_n_s_cumprod_change_ratio) < 0) __PYX_ERR(0, 3429, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 3429, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_result_df, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3432
 * 
 *         #
 *         head_tail_df = pd.concat([result_df.head(rank_level), result_df.tail(rank_level)], ignore_index=True)             # <<<<<<<<<<<<<<
 *         head_tail_df.reset_index(inplace=True, drop=True)
 *         return head_tail_df
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_concat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_df, __pyx_n_s_head); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_rank_level};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_df, __pyx_n_s_tail); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_rank_level};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3432, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_7)) __PYX_ERR(0, 3432, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 3432, __pyx_L1_error);
  __pyx_t_7 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 3432, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_head_tail_df = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3433
 *         #
 *         head_tail_df = pd.concat([result_df.head(rank_level), result_df.tail(rank_level)], ignore_index=True)
 *         head_tail_df.reset_index(inplace=True, drop=True)             # <<<<<<<<<<<<<<
 *         return head_tail_df
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 3433, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_drop, Py_True) < 0) __PYX_ERR(0, 3433, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3434
 *         head_tail_df = pd.concat([result_df.head(rank_level), result_df.tail(rank_level)], ignore_index=True)
 *         head_tail_df.reset_index(inplace=True, drop=True)
 *         return head_tail_df             # <<<<<<<<<<<<<<
 * 
 *     def update_hot_table(self, table_name: str, trade_date: datetime, hot_table: dict):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_head_tail_df);
  __pyx_r = __pyx_v_head_tail_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3391
 *         return max_level, stock_ladder
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):             # <<<<<<<<<<<<<<
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getTradeDayChangeRankBetweenDate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_trade_day_df);
  __Pyx_XDECREF(__pyx_v_exclude_codes);
  __Pyx_XDECREF(__pyx_v_df_grouped);
  __Pyx_XDECREF(__pyx_v_cumulative_product);
  __Pyx_XDECREF(__pyx_v_result_df);
  __Pyx_XDECREF(__pyx_v_head_tail_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3436
 *         return head_tail_df
 * 
 *     def update_hot_table(self, table_name: str, trade_date: datetime, hot_table: dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_27update_hot_table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_26update_hot_table, "\n        \346\257\217\344\270\252\344\272\244\346\230\223\346\227\245\n        - \346\233\264\346\226\260\344\272\244\346\230\223\346\227\245\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \345\246\202\346\236\234\344\272\244\346\230\223\346\227\245\346\230\257\344\272\244\346\230\223\345\221\250\346\234\200\345\220\216\344\270\200\345\244\251\357\274\214\346\233\264\346\226\260\350\257\245\344\272\244\346\230\223\345\221\250\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \345\246\202\346\236\234\344\272\244\346\230\223\346\227\245\346\230\257\344\272\244\346\230\223\346\234\210\346\234\200\345\220\216\344\270\200\345\244\251\357\274\214\346\233\264\346\226\260\350\257\245\344\272\244\346\230\223\346\234\210\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \345\246\202\346\236\234\344\272\244\346\230\223\346\227\245\346\230\257\344\272\244\346\230\223\345\271\264\346\234\200\345\220\216\344\270\200\345\244\251\357\274\214\346\233\264\346\226\260\350\257\245\344\272\244\346\230\223\345\271\264\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        :param table_name:\n        :param trade_date:\n        :param hot_table:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_27update_hot_table = {"update_hot_table", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_27update_hot_table, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_26update_hot_table};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_27update_hot_table(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_trade_date = 0;
  PyObject *__pyx_v_hot_table = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update_hot_table (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_name,&__pyx_n_s_trade_date,&__pyx_n_s_hot_table,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3436, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3436, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_hot_table", 1, 4, 4, 1); __PYX_ERR(0, 3436, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trade_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3436, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_hot_table", 1, 4, 4, 2); __PYX_ERR(0, 3436, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hot_table)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3436, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("update_hot_table", 1, 4, 4, 3); __PYX_ERR(0, 3436, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "update_hot_table") < 0)) __PYX_ERR(0, 3436, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_table_name = ((PyObject*)values[1]);
    __pyx_v_trade_date = values[2];
    __pyx_v_hot_table = ((PyObject*)values[3]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update_hot_table", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3436, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.update_hot_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyString_Type), 0, "table_name", 1))) __PYX_ERR(0, 3436, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hot_table), (&PyDict_Type), 0, "hot_table", 1))) __PYX_ERR(0, 3436, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_26update_hot_table(__pyx_self, __pyx_v_self, __pyx_v_table_name, __pyx_v_trade_date, __pyx_v_hot_table);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_26update_hot_table(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_trade_date, PyObject *__pyx_v_hot_table) {
  int __pyx_v_update_day_hot_info;
  PyObject *__pyx_v_code_name_table = NULL;
  PyObject *__pyx_v_key = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_hot_table_near_day = NULL;
  PyObject *__pyx_v_near_levels = NULL;
  PyObject *__pyx_v_near_day = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_head_tail_df = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_change_ratio = NULL;
  PyObject *__pyx_v_hot_table_day = NULL;
  PyObject *__pyx_v_hot_table_day_name = NULL;
  PyObject *__pyx_v_day_levels = NULL;
  PyObject *__pyx_v_hot_table_week = NULL;
  PyObject *__pyx_v_week_levels = NULL;
  PyObject *__pyx_v_is_week_last = NULL;
  PyObject *__pyx_v_end_date = NULL;
  PyObject *__pyx_v_hot_table_week_name = NULL;
  PyObject *__pyx_v_hot_table_month = NULL;
  PyObject *__pyx_v_month_levels = NULL;
  PyObject *__pyx_v_is_month_last = NULL;
  PyObject *__pyx_v_hot_table_month_name = NULL;
  PyObject *__pyx_v_hot_table_year = NULL;
  PyObject *__pyx_v_year_levels = NULL;
  PyObject *__pyx_v_is_year_last = NULL;
  PyObject *__pyx_v_hot_table_year_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *(*__pyx_t_18)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update_hot_table", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3448
 *         :return:
 *         '''
 *         update_day_hot_info = True             # <<<<<<<<<<<<<<
 *         if table_name == 'stock_industry_trade_day':
 *             code_name_table = 'stock_industry_basic_info'
 */
  __pyx_v_update_day_hot_info = 1;

  /* "tbstock/tradeStrategy/stockStrategy.py":3449
 *         '''
 *         update_day_hot_info = True
 *         if table_name == 'stock_industry_trade_day':             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_industry_basic_info'
 *         elif table_name == 'stock_concept_trade_day':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_table_name, __pyx_n_s_stock_industry_trade_day, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3449, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3450
 *         update_day_hot_info = True
 *         if table_name == 'stock_industry_trade_day':
 *             code_name_table = 'stock_industry_basic_info'             # <<<<<<<<<<<<<<
 *         elif table_name == 'stock_concept_trade_day':
 *             code_name_table = 'stock_concept_basic_info'
 */
    __Pyx_INCREF(__pyx_n_s_stock_industry_basic_info);
    __pyx_v_code_name_table = __pyx_n_s_stock_industry_basic_info;

    /* "tbstock/tradeStrategy/stockStrategy.py":3449
 *         '''
 *         update_day_hot_info = True
 *         if table_name == 'stock_industry_trade_day':             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_industry_basic_info'
 *         elif table_name == 'stock_concept_trade_day':
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3451
 *         if table_name == 'stock_industry_trade_day':
 *             code_name_table = 'stock_industry_basic_info'
 *         elif table_name == 'stock_concept_trade_day':             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_concept_basic_info'
 *         elif table_name.startswith("stock_trade_day"):
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_table_name, __pyx_n_s_stock_concept_trade_day, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3451, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3452
 *             code_name_table = 'stock_industry_basic_info'
 *         elif table_name == 'stock_concept_trade_day':
 *             code_name_table = 'stock_concept_basic_info'             # <<<<<<<<<<<<<<
 *         elif table_name.startswith("stock_trade_day"):
 *             code_name_table = 'stock_simple_info'
 */
    __Pyx_INCREF(__pyx_n_s_stock_concept_basic_info);
    __pyx_v_code_name_table = __pyx_n_s_stock_concept_basic_info;

    /* "tbstock/tradeStrategy/stockStrategy.py":3451
 *         if table_name == 'stock_industry_trade_day':
 *             code_name_table = 'stock_industry_basic_info'
 *         elif table_name == 'stock_concept_trade_day':             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_concept_basic_info'
 *         elif table_name.startswith("stock_trade_day"):
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3453
 *         elif table_name == 'stock_concept_trade_day':
 *             code_name_table = 'stock_concept_basic_info'
 *         elif table_name.startswith("stock_trade_day"):             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_simple_info'
 *             update_day_hot_info = False
 */
  __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_table_name, __pyx_n_s_stock_trade_day, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3453, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3454
 *             code_name_table = 'stock_concept_basic_info'
 *         elif table_name.startswith("stock_trade_day"):
 *             code_name_table = 'stock_simple_info'             # <<<<<<<<<<<<<<
 *             update_day_hot_info = False
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 */
    __Pyx_INCREF(__pyx_n_s_stock_simple_info);
    __pyx_v_code_name_table = __pyx_n_s_stock_simple_info;

    /* "tbstock/tradeStrategy/stockStrategy.py":3455
 *         elif table_name.startswith("stock_trade_day"):
 *             code_name_table = 'stock_simple_info'
 *             update_day_hot_info = False             # <<<<<<<<<<<<<<
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             code_name_table = ''
 */
    __pyx_v_update_day_hot_info = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3453
 *         elif table_name == 'stock_concept_trade_day':
 *             code_name_table = 'stock_concept_basic_info'
 *         elif table_name.startswith("stock_trade_day"):             # <<<<<<<<<<<<<<
 *             code_name_table = 'stock_simple_info'
 *             update_day_hot_info = False
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3456
 *             code_name_table = 'stock_simple_info'
 *             update_day_hot_info = False
 *         elif table_name in ['future_trade_day', 'index_trade_day']:             # <<<<<<<<<<<<<<
 *             code_name_table = ''
 *             update_day_hot_info = False
 */
  __Pyx_INCREF(__pyx_v_table_name);
  __pyx_t_2 = __pyx_v_table_name;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_future_trade_day, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3456, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_index_trade_day, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3456, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_1;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3457
 *             update_day_hot_info = False
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             code_name_table = ''             # <<<<<<<<<<<<<<
 *             update_day_hot_info = False
 *         else:
 */
    __Pyx_INCREF(__pyx_kp_s__23);
    __pyx_v_code_name_table = __pyx_kp_s__23;

    /* "tbstock/tradeStrategy/stockStrategy.py":3458
 *         elif table_name in ['future_trade_day', 'index_trade_day']:
 *             code_name_table = ''
 *             update_day_hot_info = False             # <<<<<<<<<<<<<<
 *         else:
 *             return
 */
    __pyx_v_update_day_hot_info = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3456
 *             code_name_table = 'stock_simple_info'
 *             update_day_hot_info = False
 *         elif table_name in ['future_trade_day', 'index_trade_day']:             # <<<<<<<<<<<<<<
 *             code_name_table = ''
 *             update_day_hot_info = False
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3460
 *             update_day_hot_info = False
 *         else:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if trade_date == self.use_datetime:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3462
 *             return
 * 
 *         if trade_date == self.use_datetime:             # <<<<<<<<<<<<<<
 *             for key, value in hot_table.items():
 *                 if not key.startswith('near'):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_datetime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_trade_date, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_3) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3463
 * 
 *         if trade_date == self.use_datetime:
 *             for key, value in hot_table.items():             # <<<<<<<<<<<<<<
 *                 if not key.startswith('near'):
 *                     continue
 */
    __pyx_t_6 = 0;
    __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_hot_table, 1, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5);
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_7, &__pyx_t_6, &__pyx_t_4, &__pyx_t_9, NULL, __pyx_t_8);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3464
 *         if trade_date == self.use_datetime:
 *             for key, value in hot_table.items():
 *                 if not key.startswith('near'):             # <<<<<<<<<<<<<<
 *                     continue
 *                 hot_table_near_day = {}
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_n_s_near};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3464, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3464, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_1 = (!__pyx_t_3);
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3465
 *             for key, value in hot_table.items():
 *                 if not key.startswith('near'):
 *                     continue             # <<<<<<<<<<<<<<
 *                 hot_table_near_day = {}
 *                 near_levels = hot_table['num_tr']
 */
        goto __pyx_L7_continue;

        /* "tbstock/tradeStrategy/stockStrategy.py":3464
 *         if trade_date == self.use_datetime:
 *             for key, value in hot_table.items():
 *                 if not key.startswith('near'):             # <<<<<<<<<<<<<<
 *                     continue
 *                 hot_table_near_day = {}
 */
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3466
 *                 if not key.startswith('near'):
 *                     continue
 *                 hot_table_near_day = {}             # <<<<<<<<<<<<<<
 *                 near_levels = hot_table['num_tr']
 *                 near_day = int(key[5:]) - 1
 */
      __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_hot_table_near_day, ((PyObject*)__pyx_t_9));
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3467
 *                     continue
 *                 hot_table_near_day = {}
 *                 near_levels = hot_table['num_tr']             # <<<<<<<<<<<<<<
 *                 near_day = int(key[5:]) - 1
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 */
      __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_near_levels, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3468
 *                 hot_table_near_day = {}
 *                 near_levels = hot_table['num_tr']
 *                 near_day = int(key[5:]) - 1             # <<<<<<<<<<<<<<
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 */
      __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_key, 5, 0, NULL, NULL, &__pyx_slice__137, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_near_day, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3469
 *                 near_levels = hot_table['num_tr']
 *                 near_day = int(key[5:]) - 1
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)             # <<<<<<<<<<<<<<
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 *                 for i in range(0, head_tail_df.shape[0]):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_session_offset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyNumber_Negative(__pyx_v_near_day); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_trade_date, __pyx_t_11};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3469, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_start_date, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3470
 *                 near_day = int(key[5:]) - 1
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)             # <<<<<<<<<<<<<<
 *                 for i in range(0, head_tail_df.shape[0]):
 *                     if code_name_table:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDayChangeRankBetweenDate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_trade_date, __pyx_v_near_levels};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 4+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_head_tail_df, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3471
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 *                 for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                     if code_name_table:
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_0)) __PYX_ERR(0, 3471, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9);
        __pyx_t_14 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3471, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3471, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_15)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3471, __pyx_L1_error)
              #endif
              if (__pyx_t_14 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 3471, __pyx_L1_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3471, __pyx_L1_error)
              #endif
              if (__pyx_t_14 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 3471, __pyx_L1_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3471, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_15(__pyx_t_9);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 3471, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3472
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 *                 for i in range(0, head_tail_df.shape[0]):
 *                     if code_name_table:             # <<<<<<<<<<<<<<
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                     else:
 */
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code_name_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3472, __pyx_L1_error)
        if (__pyx_t_1) {

          /* "tbstock/tradeStrategy/stockStrategy.py":3473
 *                 for i in range(0, head_tail_df.shape[0]):
 *                     if code_name_table:
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])             # <<<<<<<<<<<<<<
 *                     else:
 *                         name = head_tail_df.loc[i, 'name']
 */
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getNameByTableCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_INCREF(__pyx_v_i);
          __Pyx_GIVEREF(__pyx_v_i);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_i)) __PYX_ERR(0, 3473, __pyx_L1_error);
          __Pyx_INCREF(__pyx_n_s_code);
          __Pyx_GIVEREF(__pyx_n_s_code);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_n_s_code)) __PYX_ERR(0, 3473, __pyx_L1_error);
          __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = NULL;
          __pyx_t_12 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_13))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_13);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_13, function);
              __pyx_t_12 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_code_name_table, __pyx_t_17};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3473, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "tbstock/tradeStrategy/stockStrategy.py":3472
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 *                 for i in range(0, head_tail_df.shape[0]):
 *                     if code_name_table:             # <<<<<<<<<<<<<<
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                     else:
 */
          goto __pyx_L12;
        }

        /* "tbstock/tradeStrategy/stockStrategy.py":3475
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                     else:
 *                         name = head_tail_df.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                     change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                     hot_table_near_day[name] = change_ratio
 */
        /*else*/ {
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_INCREF(__pyx_v_i);
          __Pyx_GIVEREF(__pyx_v_i);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3475, __pyx_L1_error);
          __Pyx_INCREF(__pyx_n_s_name);
          __Pyx_GIVEREF(__pyx_n_s_name);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 3475, __pyx_L1_error);
          __pyx_t_17 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3475, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_17);
          __pyx_t_17 = 0;
        }
        __pyx_L12:;

        /* "tbstock/tradeStrategy/stockStrategy.py":3476
 *                     else:
 *                         name = head_tail_df.loc[i, 'name']
 *                     change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']             # <<<<<<<<<<<<<<
 *                     hot_table_near_day[name] = change_ratio
 *                 hot_table[key] = hot_table_near_day
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3476, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3476, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3476, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_cumprod_change_ratio);
        __Pyx_GIVEREF(__pyx_n_s_cumprod_change_ratio);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_cumprod_change_ratio)) __PYX_ERR(0, 3476, __pyx_L1_error);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_17, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3476, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_change_ratio, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3477
 *                         name = head_tail_df.loc[i, 'name']
 *                     change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                     hot_table_near_day[name] = change_ratio             # <<<<<<<<<<<<<<
 *                 hot_table[key] = hot_table_near_day
 * 
 */
        if (unlikely((PyDict_SetItem(__pyx_v_hot_table_near_day, __pyx_v_name, __pyx_v_change_ratio) < 0))) __PYX_ERR(0, 3477, __pyx_L1_error)

        /* "tbstock/tradeStrategy/stockStrategy.py":3471
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 *                 for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                     if code_name_table:
 *                         name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3478
 *                     change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                     hot_table_near_day[name] = change_ratio
 *                 hot_table[key] = hot_table_near_day             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
      if (unlikely((PyDict_SetItem(__pyx_v_hot_table, __pyx_v_key, __pyx_v_hot_table_near_day) < 0))) __PYX_ERR(0, 3478, __pyx_L1_error)
      __pyx_L7_continue:;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3462
 *             return
 * 
 *         if trade_date == self.use_datetime:             # <<<<<<<<<<<<<<
 *             for key, value in hot_table.items():
 *                 if not key.startswith('near'):
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3481
 * 
 *         ##
 *         if update_day_hot_info:             # <<<<<<<<<<<<<<
 *             hot_table_day = {}
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')
 */
  if (__pyx_v_update_day_hot_info) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3482
 *         ##
 *         if update_day_hot_info:
 *             hot_table_day = {}             # <<<<<<<<<<<<<<
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')
 *             day_levels = hot_table['num_tr']
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_hot_table_day = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3483
 *         if update_day_hot_info:
 *             hot_table_day = {}
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             day_levels = hot_table['num_tr']
 *             hot_table['day']['updated'] = False
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_trade_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_Y_m_d};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3483, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_hot_table_day_name = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3484
 *             hot_table_day = {}
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')
 *             day_levels = hot_table['num_tr']             # <<<<<<<<<<<<<<
 *             hot_table['day']['updated'] = False
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_day_levels = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3485
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')
 *             day_levels = hot_table['num_tr']
 *             hot_table['day']['updated'] = False             # <<<<<<<<<<<<<<
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 3485, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3486
 *             day_levels = hot_table['num_tr']
 *             hot_table['day']['updated'] = False
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)             # <<<<<<<<<<<<<<
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDayChangeRankBetweenDate); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_v_table_name, __pyx_v_trade_date, __pyx_v_trade_date, __pyx_v_day_levels};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 4+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_head_tail_df, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3487
 *             hot_table['day']['updated'] = False
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 3487, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9)) __PYX_ERR(0, 3487, __pyx_L1_error);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3487, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3487, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3487, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3487, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_15(__pyx_t_5);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3487, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3488
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code_name_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3488, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3489
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getNameByTableCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_i)) __PYX_ERR(0, 3489, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_code);
        __Pyx_GIVEREF(__pyx_n_s_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_code)) __PYX_ERR(0, 3489, __pyx_L1_error);
        __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_12 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_12 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_v_code_name_table, __pyx_t_16};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3488
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
        goto __pyx_L17;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3491
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_day[name] = change_ratio
 */
      /*else*/ {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3491, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_name);
        __Pyx_GIVEREF(__pyx_n_s_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 3491, __pyx_L1_error);
        __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_16);
        __pyx_t_16 = 0;
      }
      __pyx_L17:;

      /* "tbstock/tradeStrategy/stockStrategy.py":3492
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']             # <<<<<<<<<<<<<<
 *                 hot_table_day[name] = change_ratio
 *             hot_table['day'][hot_table_day_name] = hot_table_day
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3492, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_cumprod_change_ratio);
      __Pyx_GIVEREF(__pyx_n_s_cumprod_change_ratio);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_cumprod_change_ratio)) __PYX_ERR(0, 3492, __pyx_L1_error);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF_SET(__pyx_v_change_ratio, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3493
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_day[name] = change_ratio             # <<<<<<<<<<<<<<
 *             hot_table['day'][hot_table_day_name] = hot_table_day
 *             hot_table['day']['updated'] = True
 */
      if (unlikely((PyDict_SetItem(__pyx_v_hot_table_day, __pyx_v_name, __pyx_v_change_ratio) < 0))) __PYX_ERR(0, 3493, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3487
 *             hot_table['day']['updated'] = False
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, trade_date, trade_date, day_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3494
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_day[name] = change_ratio
 *             hot_table['day'][hot_table_day_name] = hot_table_day             # <<<<<<<<<<<<<<
 *             hot_table['day']['updated'] = True
 * 
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_v_hot_table_day_name, __pyx_v_hot_table_day) < 0))) __PYX_ERR(0, 3494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3495
 *                 hot_table_day[name] = change_ratio
 *             hot_table['day'][hot_table_day_name] = hot_table_day
 *             hot_table['day']['updated'] = True             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
    __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3481
 * 
 *         ##
 *         if update_day_hot_info:             # <<<<<<<<<<<<<<
 *             hot_table_day = {}
 *             hot_table_day_name = trade_date.strftime('%Y%m%d')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3498
 * 
 *         ##
 *         hot_table_week = {}             # <<<<<<<<<<<<<<
 *         week_levels = hot_table['num_tr']
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_hot_table_week = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3499
 *         ##
 *         hot_table_week = {}
 *         week_levels = hot_table['num_tr']             # <<<<<<<<<<<<<<
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)
 *         hot_table['week']['updated'] = False
 */
  __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_week_levels = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3500
 *         hot_table_week = {}
 *         week_levels = hot_table['num_tr']
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)             # <<<<<<<<<<<<<<
 *         hot_table['week']['updated'] = False
 *         if is_week_last:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isWeekLastTradeDay); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_trade_date};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
    PyObject* sequence = __pyx_t_5;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3500, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_16 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_13 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_16 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_16);
    #else
    __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    #endif
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_17 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
    index = 0; __pyx_t_13 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_13)) goto __pyx_L19_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_13);
    index = 1; __pyx_t_9 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_9)) goto __pyx_L19_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 2; __pyx_t_16 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_16)) goto __pyx_L19_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_16);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_17), 3) < 0) __PYX_ERR(0, 3500, __pyx_L1_error)
    __pyx_t_18 = NULL;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    goto __pyx_L20_unpacking_done;
    __pyx_L19_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_18 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3500, __pyx_L1_error)
    __pyx_L20_unpacking_done:;
  }
  __pyx_v_is_week_last = __pyx_t_13;
  __pyx_t_13 = 0;
  __Pyx_XDECREF_SET(__pyx_v_start_date, __pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_v_end_date = __pyx_t_16;
  __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3501
 *         week_levels = hot_table['num_tr']
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)
 *         hot_table['week']['updated'] = False             # <<<<<<<<<<<<<<
 *         if is_week_last:
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 */
  __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_week); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3502
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)
 *         hot_table['week']['updated'] = False
 *         if is_week_last:             # <<<<<<<<<<<<<<
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_week_last); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3502, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3503
 *         hot_table['week']['updated'] = False
 *         if is_week_last:
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_start_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_9 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_16))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_16);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_16, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_Y_m_d};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __pyx_t_16 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__11); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_end_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_13 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_kp_s_Y_m_d};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = PyNumber_Add(__pyx_t_16, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_hot_table_week_name = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3504
 *         if is_week_last:
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)             # <<<<<<<<<<<<<<
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDayChangeRankBetweenDate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_16 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_16, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_week_levels};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_12, 4+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_head_tail_df, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3505
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_0)) __PYX_ERR(0, 3505, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9);
      __pyx_t_7 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3505, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3505, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3505, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3505, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3505, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3505, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_15(__pyx_t_9);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3505, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3506
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code_name_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3506, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3507
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 */
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_getNameByTableCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_i)) __PYX_ERR(0, 3507, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_code);
        __Pyx_GIVEREF(__pyx_n_s_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_code)) __PYX_ERR(0, 3507, __pyx_L1_error);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3507, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_12 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_12 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_v_code_name_table, __pyx_t_4};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3507, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3506
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
        goto __pyx_L24;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3509
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_week[name] = change_ratio
 */
      /*else*/ {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3509, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3509, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3509, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_name);
        __Pyx_GIVEREF(__pyx_n_s_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 3509, __pyx_L1_error);
        __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3509, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;
      }
      __pyx_L24:;

      /* "tbstock/tradeStrategy/stockStrategy.py":3510
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']             # <<<<<<<<<<<<<<
 *                 hot_table_week[name] = change_ratio
 *             hot_table['week'][hot_table_week_name] = hot_table_week
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3510, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_cumprod_change_ratio);
      __Pyx_GIVEREF(__pyx_n_s_cumprod_change_ratio);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_cumprod_change_ratio)) __PYX_ERR(0, 3510, __pyx_L1_error);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF_SET(__pyx_v_change_ratio, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3511
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_week[name] = change_ratio             # <<<<<<<<<<<<<<
 *             hot_table['week'][hot_table_week_name] = hot_table_week
 *             hot_table['week']['updated'] = True
 */
      if (unlikely((PyDict_SetItem(__pyx_v_hot_table_week, __pyx_v_name, __pyx_v_change_ratio) < 0))) __PYX_ERR(0, 3511, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3505
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3512
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_week[name] = change_ratio
 *             hot_table['week'][hot_table_week_name] = hot_table_week             # <<<<<<<<<<<<<<
 *             hot_table['week']['updated'] = True
 * 
 */
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_week); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_hot_table_week_name, __pyx_v_hot_table_week) < 0))) __PYX_ERR(0, 3512, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3513
 *                 hot_table_week[name] = change_ratio
 *             hot_table['week'][hot_table_week_name] = hot_table_week
 *             hot_table['week']['updated'] = True             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_week); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3513, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3502
 *         is_week_last, start_date, end_date = utils.isWeekLastTradeDay(trade_date)
 *         hot_table['week']['updated'] = False
 *         if is_week_last:             # <<<<<<<<<<<<<<
 *             hot_table_week_name = start_date.strftime('%Y%m%d') + '-' + end_date.strftime('%Y%m%d')
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, week_levels)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3516
 * 
 *         ##
 *         hot_table_month = {}             # <<<<<<<<<<<<<<
 *         month_levels = hot_table['num_tr']
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v_hot_table_month = ((PyObject*)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3517
 *         ##
 *         hot_table_month = {}
 *         month_levels = hot_table['num_tr']             # <<<<<<<<<<<<<<
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)
 *         hot_table['month']['updated'] = False
 */
  __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v_month_levels = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3518
 *         hot_table_month = {}
 *         month_levels = hot_table['num_tr']
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)             # <<<<<<<<<<<<<<
 *         hot_table['month']['updated'] = False
 *         if is_month_last:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isMonthLastTradeDay); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_trade_date};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
    PyObject* sequence = __pyx_t_9;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3518, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_13 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_17 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
    index = 0; __pyx_t_13 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_13)) goto __pyx_L26_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_13);
    index = 1; __pyx_t_5 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_5)) goto __pyx_L26_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 2; __pyx_t_4 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_17), 3) < 0) __PYX_ERR(0, 3518, __pyx_L1_error)
    __pyx_t_18 = NULL;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    goto __pyx_L27_unpacking_done;
    __pyx_L26_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_18 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3518, __pyx_L1_error)
    __pyx_L27_unpacking_done:;
  }
  __pyx_v_is_month_last = __pyx_t_13;
  __pyx_t_13 = 0;
  __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_end_date, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3519
 *         month_levels = hot_table['num_tr']
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)
 *         hot_table['month']['updated'] = False             # <<<<<<<<<<<<<<
 *         if is_month_last:
 *             hot_table_month_name = str(trade_date.month)
 */
  __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_month); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 3519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3520
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)
 *         hot_table['month']['updated'] = False
 *         if is_month_last:             # <<<<<<<<<<<<<<
 *             hot_table_month_name = str(trade_date.month)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_month_last); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3520, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3521
 *         hot_table['month']['updated'] = False
 *         if is_month_last:
 *             hot_table_month_name = str(trade_date.month)             # <<<<<<<<<<<<<<
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_trade_date, __pyx_n_s_month); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = __Pyx_PyObject_Str(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_hot_table_month_name = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3522
 *         if is_month_last:
 *             hot_table_month_name = str(trade_date.month)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)             # <<<<<<<<<<<<<<
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDayChangeRankBetweenDate); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_month_levels};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_12, 4+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_head_tail_df, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3523
 *             hot_table_month_name = str(trade_date.month)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(0, 3523, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9)) __PYX_ERR(0, 3523, __pyx_L1_error);
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3523, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3523, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3523, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3523, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3523, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3523, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3523, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_15(__pyx_t_4);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3523, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3524
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code_name_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3524, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3525
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getNameByTableCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_i)) __PYX_ERR(0, 3525, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_code);
        __Pyx_GIVEREF(__pyx_n_s_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_code)) __PYX_ERR(0, 3525, __pyx_L1_error);
        __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_12 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_12 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_v_code_name_table, __pyx_t_16};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3525, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3524
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
        goto __pyx_L31;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3527
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_month[name] = change_ratio
 */
      /*else*/ {
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3527, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_name);
        __Pyx_GIVEREF(__pyx_n_s_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 3527, __pyx_L1_error);
        __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3527, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_16);
        __pyx_t_16 = 0;
      }
      __pyx_L31:;

      /* "tbstock/tradeStrategy/stockStrategy.py":3528
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']             # <<<<<<<<<<<<<<
 *                 hot_table_month[name] = change_ratio
 *             hot_table['month'][hot_table_month_name] = hot_table_month
 */
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3528, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_cumprod_change_ratio);
      __Pyx_GIVEREF(__pyx_n_s_cumprod_change_ratio);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_cumprod_change_ratio)) __PYX_ERR(0, 3528, __pyx_L1_error);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF_SET(__pyx_v_change_ratio, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3529
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_month[name] = change_ratio             # <<<<<<<<<<<<<<
 *             hot_table['month'][hot_table_month_name] = hot_table_month
 *             hot_table['month']['updated'] = True
 */
      if (unlikely((PyDict_SetItem(__pyx_v_hot_table_month, __pyx_v_name, __pyx_v_change_ratio) < 0))) __PYX_ERR(0, 3529, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3523
 *             hot_table_month_name = str(trade_date.month)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3530
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_month[name] = change_ratio
 *             hot_table['month'][hot_table_month_name] = hot_table_month             # <<<<<<<<<<<<<<
 *             hot_table['month']['updated'] = True
 * 
 */
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_v_hot_table_month_name, __pyx_v_hot_table_month) < 0))) __PYX_ERR(0, 3530, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3531
 *                 hot_table_month[name] = change_ratio
 *             hot_table['month'][hot_table_month_name] = hot_table_month
 *             hot_table['month']['updated'] = True             # <<<<<<<<<<<<<<
 * 
 *         ##
 */
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_month); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3531, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3520
 *         is_month_last, start_date, end_date = utils.isMonthLastTradeDay(trade_date)
 *         hot_table['month']['updated'] = False
 *         if is_month_last:             # <<<<<<<<<<<<<<
 *             hot_table_month_name = str(trade_date.month)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, month_levels)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3534
 * 
 *         ##
 *         hot_table_year = {}             # <<<<<<<<<<<<<<
 *         year_levels = hot_table['num_tr']
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_hot_table_year = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3535
 *         ##
 *         hot_table_year = {}
 *         year_levels = hot_table['num_tr']             # <<<<<<<<<<<<<<
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)
 *         hot_table['year']['updated'] = False
 */
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_year_levels = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3536
 *         hot_table_year = {}
 *         year_levels = hot_table['num_tr']
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)             # <<<<<<<<<<<<<<
 *         hot_table['year']['updated'] = False
 *         if is_year_last:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isYearLastTradeDay); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_trade_date};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3536, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_16 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_13 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_16 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_16);
    #else
    __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_17 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_18 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17);
    index = 0; __pyx_t_13 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_13)) goto __pyx_L33_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_13);
    index = 1; __pyx_t_9 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_9)) goto __pyx_L33_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 2; __pyx_t_16 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_16)) goto __pyx_L33_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_16);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_17), 3) < 0) __PYX_ERR(0, 3536, __pyx_L1_error)
    __pyx_t_18 = NULL;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    goto __pyx_L34_unpacking_done;
    __pyx_L33_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __pyx_t_18 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3536, __pyx_L1_error)
    __pyx_L34_unpacking_done:;
  }
  __pyx_v_is_year_last = __pyx_t_13;
  __pyx_t_13 = 0;
  __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_end_date, __pyx_t_16);
  __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3537
 *         year_levels = hot_table['num_tr']
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)
 *         hot_table['year']['updated'] = False             # <<<<<<<<<<<<<<
 *         if is_year_last:
 *             hot_table_year_name = str(trade_date.year)
 */
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 3537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3538
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)
 *         hot_table['year']['updated'] = False
 *         if is_year_last:             # <<<<<<<<<<<<<<
 *             hot_table_year_name = str(trade_date.year)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_year_last); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3538, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3539
 *         hot_table['year']['updated'] = False
 *         if is_year_last:
 *             hot_table_year_name = str(trade_date.year)             # <<<<<<<<<<<<<<
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_trade_date, __pyx_n_s_year); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_PyObject_Str(__pyx_t_4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_hot_table_year_name = __pyx_t_16;
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3540
 *         if is_year_last:
 *             hot_table_year_name = str(trade_date.year)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)             # <<<<<<<<<<<<<<
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getTradeDayChangeRankBetweenDate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_v_table_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_year_levels};
      __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 4+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_head_tail_df, __pyx_t_16);
    __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3541
 *             hot_table_year_name = str(trade_date.year)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_16, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_int_0)) __PYX_ERR(0, 3541, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_16 = __pyx_t_4; __Pyx_INCREF(__pyx_t_16);
      __pyx_t_7 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3541, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_16))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3541, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3541, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_16);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3541, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3541, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_15(__pyx_t_16);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3541, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3542
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_code_name_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3542, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "tbstock/tradeStrategy/stockStrategy.py":3543
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_getNameByTableCode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_i)) __PYX_ERR(0, 3543, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_code);
        __Pyx_GIVEREF(__pyx_n_s_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_n_s_code)) __PYX_ERR(0, 3543, __pyx_L1_error);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_17 = NULL;
        __pyx_t_12 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_12 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_v_code_name_table, __pyx_t_5};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3543, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "tbstock/tradeStrategy/stockStrategy.py":3542
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 *             for i in range(0, head_tail_df.shape[0]):
 *                 if code_name_table:             # <<<<<<<<<<<<<<
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 */
        goto __pyx_L38;
      }

      /* "tbstock/tradeStrategy/stockStrategy.py":3545
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_year[name] = change_ratio
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3545, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_name);
        __Pyx_GIVEREF(__pyx_n_s_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 3545, __pyx_L1_error);
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
        __pyx_t_5 = 0;
      }
      __pyx_L38:;

      /* "tbstock/tradeStrategy/stockStrategy.py":3546
 *                 else:
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']             # <<<<<<<<<<<<<<
 *                 hot_table_year[name] = change_ratio
 *             hot_table['year'][hot_table_year_name] = hot_table_year
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_head_tail_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_i)) __PYX_ERR(0, 3546, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_cumprod_change_ratio);
      __Pyx_GIVEREF(__pyx_n_s_cumprod_change_ratio);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_cumprod_change_ratio)) __PYX_ERR(0, 3546, __pyx_L1_error);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF_SET(__pyx_v_change_ratio, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3547
 *                     name = head_tail_df.loc[i, 'name']
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_year[name] = change_ratio             # <<<<<<<<<<<<<<
 *             hot_table['year'][hot_table_year_name] = hot_table_year
 *             hot_table['year']['updated'] = True
 */
      if (unlikely((PyDict_SetItem(__pyx_v_hot_table_year, __pyx_v_name, __pyx_v_change_ratio) < 0))) __PYX_ERR(0, 3547, __pyx_L1_error)

      /* "tbstock/tradeStrategy/stockStrategy.py":3541
 *             hot_table_year_name = str(trade_date.year)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 *             for i in range(0, head_tail_df.shape[0]):             # <<<<<<<<<<<<<<
 *                 if code_name_table:
 *                     name = self.dataproc.getNameByTableCode(code_name_table, head_tail_df.loc[i, 'code'])
 */
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3548
 *                 change_ratio = head_tail_df.loc[i, 'cumprod_change_ratio']
 *                 hot_table_year[name] = change_ratio
 *             hot_table['year'][hot_table_year_name] = hot_table_year             # <<<<<<<<<<<<<<
 *             hot_table['year']['updated'] = True
 * 
 */
    __pyx_t_16 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_year); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_v_hot_table_year_name, __pyx_v_hot_table_year) < 0))) __PYX_ERR(0, 3548, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3549
 *                 hot_table_year[name] = change_ratio
 *             hot_table['year'][hot_table_year_name] = hot_table_year
 *             hot_table['year']['updated'] = True             # <<<<<<<<<<<<<<
 * 
 *     def getIndustryConceptHotFrequency(self, mode='industry', near_day=5, save_file=True):
 */
    __pyx_t_16 = __Pyx_PyDict_GetItem(__pyx_v_hot_table, __pyx_n_s_year); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3549, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3538
 *         is_year_last, start_date, end_date = utils.isYearLastTradeDay(trade_date)
 *         hot_table['year']['updated'] = False
 *         if is_year_last:             # <<<<<<<<<<<<<<
 *             hot_table_year_name = str(trade_date.year)
 *             head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, end_date, year_levels)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3436
 *         return head_tail_df
 * 
 *     def update_hot_table(self, table_name: str, trade_date: datetime, hot_table: dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.update_hot_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_code_name_table);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_hot_table_near_day);
  __Pyx_XDECREF(__pyx_v_near_levels);
  __Pyx_XDECREF(__pyx_v_near_day);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_head_tail_df);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_change_ratio);
  __Pyx_XDECREF(__pyx_v_hot_table_day);
  __Pyx_XDECREF(__pyx_v_hot_table_day_name);
  __Pyx_XDECREF(__pyx_v_day_levels);
  __Pyx_XDECREF(__pyx_v_hot_table_week);
  __Pyx_XDECREF(__pyx_v_week_levels);
  __Pyx_XDECREF(__pyx_v_is_week_last);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XDECREF(__pyx_v_hot_table_week_name);
  __Pyx_XDECREF(__pyx_v_hot_table_month);
  __Pyx_XDECREF(__pyx_v_month_levels);
  __Pyx_XDECREF(__pyx_v_is_month_last);
  __Pyx_XDECREF(__pyx_v_hot_table_month_name);
  __Pyx_XDECREF(__pyx_v_hot_table_year);
  __Pyx_XDECREF(__pyx_v_year_levels);
  __Pyx_XDECREF(__pyx_v_is_year_last);
  __Pyx_XDECREF(__pyx_v_hot_table_year_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3551
 *             hot_table['year']['updated'] = True
 * 
 *     def getIndustryConceptHotFrequency(self, mode='industry', near_day=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getIndustryConceptHotFrequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getIndustryConceptHotFrequency, "\n\n        :param mode:\n        :param near_day:\n        :param save_file:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getIndustryConceptHotFrequency = {"getIndustryConceptHotFrequency", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getIndustryConceptHotFrequency, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getIndustryConceptHotFrequency};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getIndustryConceptHotFrequency(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_near_day = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndustryConceptHotFrequency (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mode,&__pyx_n_s_near_day,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_industry)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3551, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_near_day);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3551, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3551, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getIndustryConceptHotFrequency") < 0)) __PYX_ERR(0, 3551, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_near_day = values[2];
    __pyx_v_save_file = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndustryConceptHotFrequency", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3551, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndustryConceptHotFrequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getIndustryConceptHotFrequency(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_near_day, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_28getIndustryConceptHotFrequency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_near_day, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_rely_strategy_key_name = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_strategy_data_dict = NULL;
  PyObject *__pyx_v_num_rank = NULL;
  PyObject *__pyx_v_day_hot_dict = NULL;
  PyObject *__pyx_v_day_cold_dict = NULL;
  PyObject *__pyx_v_day_hot_cold_dict = NULL;
  PyObject *__pyx_v_near_day_list = NULL;
  PyObject *__pyx_v_near_day_dict = NULL;
  PyObject *__pyx_v_time_key = NULL;
  PyObject *__pyx_v_time_value = NULL;
  PyObject *__pyx_v_day_hot_frequency_df = NULL;
  PyObject *__pyx_v_use_num_hot = NULL;
  PyObject *__pyx_v_day_cold_frequency_df = NULL;
  PyObject *__pyx_v_use_num_cold = NULL;
  PyObject *__pyx_v_new_row_hot = NULL;
  PyObject *__pyx_v_new_row_cold = NULL;
  PyObject *__pyx_v_day_hot_cold_frequency_df = NULL;
  PyObject *__pyx_v_day_hot_cold_frequency_dict = NULL;
  PyObject *__pyx_9genexpr22__pyx_v_key = NULL;
  PyObject *__pyx_9genexpr23__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getIndustryConceptHotFrequency", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3559
 *         :return:
 *         '''
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             strategy_key_name = 'hot_industry_frequency'
 *             rely_strategy_key_name = 'hot_cold_industry_table'
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3559, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3560
 *         '''
 *         if mode == 'industry':
 *             strategy_key_name = 'hot_industry_frequency'             # <<<<<<<<<<<<<<
 *             rely_strategy_key_name = 'hot_cold_industry_table'
 *         else:
 */
    __Pyx_INCREF(__pyx_n_s_hot_industry_frequency);
    __pyx_v_strategy_key_name = __pyx_n_s_hot_industry_frequency;

    /* "tbstock/tradeStrategy/stockStrategy.py":3561
 *         if mode == 'industry':
 *             strategy_key_name = 'hot_industry_frequency'
 *             rely_strategy_key_name = 'hot_cold_industry_table'             # <<<<<<<<<<<<<<
 *         else:
 *             strategy_key_name = 'hot_concept_frequency'
 */
    __Pyx_INCREF(__pyx_n_s_hot_cold_industry_table);
    __pyx_v_rely_strategy_key_name = __pyx_n_s_hot_cold_industry_table;

    /* "tbstock/tradeStrategy/stockStrategy.py":3559
 *         :return:
 *         '''
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             strategy_key_name = 'hot_industry_frequency'
 *             rely_strategy_key_name = 'hot_cold_industry_table'
 */
    goto __pyx_L3;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3563
 *             rely_strategy_key_name = 'hot_cold_industry_table'
 *         else:
 *             strategy_key_name = 'hot_concept_frequency'             # <<<<<<<<<<<<<<
 *             rely_strategy_key_name = 'hot_cold_concept_table'
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_hot_concept_frequency);
    __pyx_v_strategy_key_name = __pyx_n_s_hot_concept_frequency;

    /* "tbstock/tradeStrategy/stockStrategy.py":3564
 *         else:
 *             strategy_key_name = 'hot_concept_frequency'
 *             rely_strategy_key_name = 'hot_cold_concept_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_INCREF(__pyx_n_s_hot_cold_concept_table);
    __pyx_v_rely_strategy_key_name = __pyx_n_s_hot_cold_concept_table;
  }
  __pyx_L3:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3567
 * 
 *         #
 *         if rely_strategy_key_name not in self.strategy_json or not self.strategy_json[rely_strategy_key_name]['day']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.warning(f"Need to update strategy {rely_strategy_key_name} day info firstly.")
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_rely_strategy_key_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_rely_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_n_s_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_5;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3568
 *         #
 *         if rely_strategy_key_name not in self.strategy_json or not self.strategy_json[rely_strategy_key_name]['day']['updated']:
 *             utils.logger.warning(f"Need to update strategy {rely_strategy_key_name} day info firstly.")             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_Need_to_update_strategy);
    __pyx_t_7 += 24;
    __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_strategy);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Need_to_update_strategy);
    __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_rely_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u_day_info_firstly);
    __pyx_t_7 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_day_info_firstly);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_day_info_firstly);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3568, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3569
 *         if rely_strategy_key_name not in self.strategy_json or not self.strategy_json[rely_strategy_key_name]['day']['updated']:
 *             utils.logger.warning(f"Need to update strategy {rely_strategy_key_name} day info firstly.")
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3567
 * 
 *         #
 *         if rely_strategy_key_name not in self.strategy_json or not self.strategy_json[rely_strategy_key_name]['day']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.warning(f"Need to update strategy {rely_strategy_key_name} day info firstly.")
 *             return False
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3572
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L8_bool_binop_done:;
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3573
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3573, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3574
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_The);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3574, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3575
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3575, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3573
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3572
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3577
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getframe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_fun_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3578
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3581
 * 
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[rely_strategy_key_name])             # <<<<<<<<<<<<<<
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_rely_strategy_key_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_strategy_data_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3582
 *         #
 *         strategy_data_dict = deepcopy(self.strategy_json[rely_strategy_key_name])
 *         num_rank = strategy_data_dict['num_tr']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_num_rank = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3583
 *         strategy_data_dict = deepcopy(self.strategy_json[rely_strategy_key_name])
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']             # <<<<<<<<<<<<<<
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_num_tr) < 0))) __PYX_ERR(0, 3583, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3584
 *         num_rank = strategy_data_dict['num_tr']
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']             # <<<<<<<<<<<<<<
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']
 */
  if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 3584, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3585
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_strategy_img_path, __pyx_v_strategy_data_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3585, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3586
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:
 *             del strategy_data_dict['strategy_img_path']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    if (unlikely((PyObject_DelItem(__pyx_v_strategy_data_dict, __pyx_n_s_strategy_img_path) < 0))) __PYX_ERR(0, 3586, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3585
 *         del strategy_data_dict['num_tr']
 *         del strategy_data_dict['updated']
 *         if 'strategy_img_path' in strategy_data_dict:             # <<<<<<<<<<<<<<
 *             del strategy_data_dict['strategy_img_path']
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3589
 * 
 *         #
 *         day_hot_dict = {}             # <<<<<<<<<<<<<<
 *         day_cold_dict = {}
 *         day_hot_cold_dict = strategy_data_dict['day']
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_hot_dict = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3590
 *         #
 *         day_hot_dict = {}
 *         day_cold_dict = {}             # <<<<<<<<<<<<<<
 *         day_hot_cold_dict = strategy_data_dict['day']
 *         if day_hot_cold_dict:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_cold_dict = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3591
 *         day_hot_dict = {}
 *         day_cold_dict = {}
 *         day_hot_cold_dict = strategy_data_dict['day']             # <<<<<<<<<<<<<<
 *         if day_hot_cold_dict:
 *             del day_hot_cold_dict['updated']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_strategy_data_dict, __pyx_n_s_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_day_hot_cold_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3592
 *         day_cold_dict = {}
 *         day_hot_cold_dict = strategy_data_dict['day']
 *         if day_hot_cold_dict:             # <<<<<<<<<<<<<<
 *             del day_hot_cold_dict['updated']
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_day_hot_cold_dict); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3592, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3593
 *         day_hot_cold_dict = strategy_data_dict['day']
 *         if day_hot_cold_dict:
 *             del day_hot_cold_dict['updated']             # <<<<<<<<<<<<<<
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day
 *             near_day_dict = dict(near_day_list)
 */
    if (unlikely((PyObject_DelItem(__pyx_v_day_hot_cold_dict, __pyx_n_s_updated) < 0))) __PYX_ERR(0, 3593, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3594
 *         if day_hot_cold_dict:
 *             del day_hot_cold_dict['updated']
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day             # <<<<<<<<<<<<<<
 *             near_day_dict = dict(near_day_list)
 *             for time_key, time_value in near_day_dict.items():  # time_key time_value dict
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_day_hot_cold_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Negative(__pyx_v_near_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    if (__pyx_t_1) {
      __pyx_t_7 = 0;
    } else {
      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3594, __pyx_L1_error)
      __pyx_t_7 = __pyx_t_11;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_t_6, __pyx_t_7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_near_day_list = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3595
 *             del day_hot_cold_dict['updated']
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day
 *             near_day_dict = dict(near_day_list)             # <<<<<<<<<<<<<<
 *             for time_key, time_value in near_day_dict.items():  # time_key time_value dict
 *                 day_hot_dict[time_key] = list(time_value.keys())[0:num_rank]
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_near_day_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_near_day_dict = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3596
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day
 *             near_day_dict = dict(near_day_list)
 *             for time_key, time_value in near_day_dict.items():  # time_key time_value dict             # <<<<<<<<<<<<<<
 *                 day_hot_dict[time_key] = list(time_value.keys())[0:num_rank]
 *                 day_cold_dict[time_key] = list(time_value.keys())[-num_rank:]
 */
    __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_near_day_dict, 1, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2);
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;
    while (1) {
      __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_11, &__pyx_t_7, &__pyx_t_6, &__pyx_t_4, NULL, __pyx_t_12);
      if (unlikely(__pyx_t_13 == 0)) break;
      if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3596, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_time_key, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_time_value, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3597
 *             near_day_dict = dict(near_day_list)
 *             for time_key, time_value in near_day_dict.items():  # time_key time_value dict
 *                 day_hot_dict[time_key] = list(time_value.keys())[0:num_rank]             # <<<<<<<<<<<<<<
 *                 day_cold_dict[time_key] = list(time_value.keys())[-num_rank:]
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_time_value, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_v_num_rank);
      __pyx_t_4 = __pyx_v_num_rank;
      __pyx_t_1 = (__pyx_t_4 == Py_None);
      if (__pyx_t_1) {
        __pyx_t_14 = PY_SSIZE_T_MAX;
      } else {
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3597, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_15;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_t_6, 0, __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely((PyDict_SetItem(__pyx_v_day_hot_dict, __pyx_v_time_key, __pyx_t_4) < 0))) __PYX_ERR(0, 3597, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3598
 *             for time_key, time_value in near_day_dict.items():  # time_key time_value dict
 *                 day_hot_dict[time_key] = list(time_value.keys())[0:num_rank]
 *                 day_cold_dict[time_key] = list(time_value.keys())[-num_rank:]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_time_value, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3598, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PySequence_ListKeepNew(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_Negative(__pyx_v_num_rank); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = (__pyx_t_4 == Py_None);
      if (__pyx_t_1) {
        __pyx_t_14 = 0;
      } else {
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3598, __pyx_L1_error)
        __pyx_t_14 = __pyx_t_15;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyList_GetSlice(__pyx_t_6, __pyx_t_14, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely((PyDict_SetItem(__pyx_v_day_cold_dict, __pyx_v_time_key, __pyx_t_4) < 0))) __PYX_ERR(0, 3598, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3592
 *         day_cold_dict = {}
 *         day_hot_cold_dict = strategy_data_dict['day']
 *         if day_hot_cold_dict:             # <<<<<<<<<<<<<<
 *             del day_hot_cold_dict['updated']
 *             near_day_list = list(day_hot_cold_dict.items())[-near_day:]  # near_day
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3601
 * 
 *         #
 *         day_hot_frequency_df = self.strategyCount(day_hot_dict)             # <<<<<<<<<<<<<<
 *         use_num_hot = num_rank if num_rank > (day_hot_frequency_df['sum'] > 1).sum() else (day_hot_frequency_df['sum'] > 1).sum()
 *         day_cold_frequency_df = self.strategyCount(day_cold_dict)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategyCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_day_hot_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_day_hot_frequency_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3602
 *         #
 *         day_hot_frequency_df = self.strategyCount(day_hot_dict)
 *         use_num_hot = num_rank if num_rank > (day_hot_frequency_df['sum'] > 1).sum() else (day_hot_frequency_df['sum'] > 1).sum()             # <<<<<<<<<<<<<<
 *         day_cold_frequency_df = self.strategyCount(day_cold_dict)
 *         use_num_cold = num_rank if num_rank > (day_cold_frequency_df['sum'] > 1).sum() else (day_cold_frequency_df['sum'] > 1).sum()
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_day_hot_frequency_df, __pyx_n_s_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_num_rank, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_v_num_rank);
    __pyx_t_2 = __pyx_v_num_rank;
  } else {
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_day_hot_frequency_df, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3602, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_2 = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_v_use_num_hot = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3603
 *         day_hot_frequency_df = self.strategyCount(day_hot_dict)
 *         use_num_hot = num_rank if num_rank > (day_hot_frequency_df['sum'] > 1).sum() else (day_hot_frequency_df['sum'] > 1).sum()
 *         day_cold_frequency_df = self.strategyCount(day_cold_dict)             # <<<<<<<<<<<<<<
 *         use_num_cold = num_rank if num_rank > (day_cold_frequency_df['sum'] > 1).sum() else (day_cold_frequency_df['sum'] > 1).sum()
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategyCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_day_cold_dict};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_day_cold_frequency_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3604
 *         use_num_hot = num_rank if num_rank > (day_hot_frequency_df['sum'] > 1).sum() else (day_hot_frequency_df['sum'] > 1).sum()
 *         day_cold_frequency_df = self.strategyCount(day_cold_dict)
 *         use_num_cold = num_rank if num_rank > (day_cold_frequency_df['sum'] > 1).sum() else (day_cold_frequency_df['sum'] > 1).sum()             # <<<<<<<<<<<<<<
 * 
 *         new_row_hot = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_day_cold_frequency_df, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_num_rank, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_v_num_rank);
    __pyx_t_2 = __pyx_v_num_rank;
  } else {
    __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_day_cold_frequency_df, __pyx_n_s_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_2 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_v_use_num_cold = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3606
 *         use_num_cold = num_rank if num_rank > (day_cold_frequency_df['sum'] > 1).sum() else (day_cold_frequency_df['sum'] > 1).sum()
 * 
 *         new_row_hot = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])             # <<<<<<<<<<<<<<
 *         new_row_cold = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         day_hot_cold_frequency_df = pd.concat(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  { /* enter inner scope */
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyDict_Keys(__pyx_v_day_hot_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3606, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3606, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3606, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_sum);
    __Pyx_GIVEREF(__pyx_n_s_sum);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_sum)) __PYX_ERR(0, 3606, __pyx_L18_error);
    __pyx_t_16 = PyNumber_Add(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L18_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __pyx_t_16; __Pyx_INCREF(__pyx_t_6);
    __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3606, __pyx_L18_error)
        #endif
        if (__pyx_t_11 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_16 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_16); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 3606, __pyx_L18_error)
      #else
      __pyx_t_16 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_16);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_key, __pyx_t_16);
      __pyx_t_16 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_pd); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_16);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_NA); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3606, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L18_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_9)) __PYX_ERR(0, 3606, __pyx_L18_error);
      __pyx_t_9 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr22__pyx_v_key, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 3606, __pyx_L18_error)
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_key); __pyx_9genexpr22__pyx_v_key = 0;
    goto __pyx_L22_exit_scope;
    __pyx_L18_error:;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_key); __pyx_9genexpr22__pyx_v_key = 0;
    goto __pyx_L1_error;
    __pyx_L22_exit_scope:;
  } /* exit inner scope */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_INCREF(__pyx_kp_s__33);
  __Pyx_GIVEREF(__pyx_kp_s__33);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_kp_s__33)) __PYX_ERR(0, 3606, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_t_16) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_new_row_hot = __pyx_t_16;
  __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3607
 * 
 *         new_row_hot = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         new_row_cold = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])             # <<<<<<<<<<<<<<
 *         day_hot_cold_frequency_df = pd.concat(
 *             objs=[new_row_hot, day_hot_frequency_df.head(use_num_hot), new_row_cold, day_cold_frequency_df.head(use_num_cold)])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_pd); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  { /* enter inner scope */
    __pyx_t_16 = PyDict_New(); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3607, __pyx_L25_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_6 = __Pyx_PyDict_Keys(__pyx_v_day_hot_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3607, __pyx_L25_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3607, __pyx_L25_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3607, __pyx_L25_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_sum);
    __Pyx_GIVEREF(__pyx_n_s_sum);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_sum)) __PYX_ERR(0, 3607, __pyx_L25_error);
    __pyx_t_9 = PyNumber_Add(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L25_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6);
    __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3607, __pyx_L25_error)
        #endif
        if (__pyx_t_11 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_9); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 3607, __pyx_L25_error)
      #else
      __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_key, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_pd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_NA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3607, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_4)) __PYX_ERR(0, 3607, __pyx_L25_error);
      __pyx_t_4 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_16, (PyObject*)__pyx_9genexpr23__pyx_v_key, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 3607, __pyx_L25_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_key); __pyx_9genexpr23__pyx_v_key = 0;
    goto __pyx_L29_exit_scope;
    __pyx_L25_error:;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_key); __pyx_9genexpr23__pyx_v_key = 0;
    goto __pyx_L1_error;
    __pyx_L29_exit_scope:;
  } /* exit inner scope */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_16);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_16)) __PYX_ERR(0, 3607, __pyx_L1_error);
  __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_kp_s__34);
  __Pyx_GIVEREF(__pyx_kp_s__34);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_kp_s__34)) __PYX_ERR(0, 3607, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_index, __pyx_t_9) < 0) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_v_new_row_cold = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3608
 *         new_row_hot = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         new_row_cold = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         day_hot_cold_frequency_df = pd.concat(             # <<<<<<<<<<<<<<
 *             objs=[new_row_hot, day_hot_frequency_df.head(use_num_hot), new_row_cold, day_cold_frequency_df.head(use_num_cold)])
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_pd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_concat); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3609
 *         new_row_cold = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         day_hot_cold_frequency_df = pd.concat(
 *             objs=[new_row_hot, day_hot_frequency_df.head(use_num_hot), new_row_cold, day_cold_frequency_df.head(use_num_cold)])             # <<<<<<<<<<<<<<
 * 
 *         day_hot_cold_frequency_df.reset_index(inplace=True)  # indexdictindexdict
 */
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_day_hot_frequency_df, __pyx_n_s_head); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_use_num_hot};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_day_cold_frequency_df, __pyx_n_s_head); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_17 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_v_use_num_cold};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_new_row_hot);
  __Pyx_GIVEREF(__pyx_v_new_row_hot);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_new_row_hot)) __PYX_ERR(0, 3609, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_new_row_cold);
  __Pyx_GIVEREF(__pyx_v_new_row_cold);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_v_new_row_cold)) __PYX_ERR(0, 3609, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_2)) __PYX_ERR(0, 3609, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_objs, __pyx_t_4) < 0) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3608
 *         new_row_hot = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         new_row_cold = pd.DataFrame({key: [pd.NA] for key in list(day_hot_dict.keys()) + ['sum']}, index=[''])
 *         day_hot_cold_frequency_df = pd.concat(             # <<<<<<<<<<<<<<
 *             objs=[new_row_hot, day_hot_frequency_df.head(use_num_hot), new_row_cold, day_cold_frequency_df.head(use_num_cold)])
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_day_hot_cold_frequency_df = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3611
 *             objs=[new_row_hot, day_hot_frequency_df.head(use_num_hot), new_row_cold, day_cold_frequency_df.head(use_num_cold)])
 * 
 *         day_hot_cold_frequency_df.reset_index(inplace=True)  # indexdictindexdict             # <<<<<<<<<<<<<<
 *         day_hot_cold_frequency_dict = day_hot_cold_frequency_df.to_dict()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_day_hot_cold_frequency_df, __pyx_n_s_reset_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 3611, __pyx_L1_error)
  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3612
 * 
 *         day_hot_cold_frequency_df.reset_index(inplace=True)  # indexdictindexdict
 *         day_hot_cold_frequency_dict = day_hot_cold_frequency_df.to_dict()             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_day_hot_cold_frequency_df, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_day_hot_cold_frequency_dict = __pyx_t_16;
  __pyx_t_16 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3615
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             day_hot_cold_frequency_dict['updated'] = True
 *             day_hot_cold_frequency_dict['near_day'] = near_day
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3615, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3616
 *         # json
 *         if save_file:
 *             day_hot_cold_frequency_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             day_hot_cold_frequency_dict['near_day'] = near_day
 *             self.strategy_json[strategy_key_name] = day_hot_cold_frequency_dict
 */
    if (unlikely((PyObject_SetItem(__pyx_v_day_hot_cold_frequency_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3616, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3617
 *         if save_file:
 *             day_hot_cold_frequency_dict['updated'] = True
 *             day_hot_cold_frequency_dict['near_day'] = near_day             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = day_hot_cold_frequency_dict
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_day_hot_cold_frequency_dict, __pyx_n_s_near_day, __pyx_v_near_day) < 0))) __PYX_ERR(0, 3617, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3618
 *             day_hot_cold_frequency_dict['updated'] = True
 *             day_hot_cold_frequency_dict['near_day'] = near_day
 *             self.strategy_json[strategy_key_name] = day_hot_cold_frequency_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return day_hot_cold_frequency_df
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_v_strategy_key_name, __pyx_v_day_hot_cold_frequency_dict) < 0))) __PYX_ERR(0, 3618, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3619
 *             day_hot_cold_frequency_dict['near_day'] = near_day
 *             self.strategy_json[strategy_key_name] = day_hot_cold_frequency_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return day_hot_cold_frequency_df
 * 
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3615
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             day_hot_cold_frequency_dict['updated'] = True
 *             day_hot_cold_frequency_dict['near_day'] = near_day
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3620
 *             self.strategy_json[strategy_key_name] = day_hot_cold_frequency_dict
 *             self.dumpJsonToFile()
 *         return day_hot_cold_frequency_df             # <<<<<<<<<<<<<<
 * 
 *     def getIndustryHotTable(self, num_tr=5, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_day_hot_cold_frequency_df);
  __pyx_r = __pyx_v_day_hot_cold_frequency_df;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3551
 *             hot_table['year']['updated'] = True
 * 
 *     def getIndustryConceptHotFrequency(self, mode='industry', near_day=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndustryConceptHotFrequency", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_rely_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_strategy_data_dict);
  __Pyx_XDECREF(__pyx_v_num_rank);
  __Pyx_XDECREF(__pyx_v_day_hot_dict);
  __Pyx_XDECREF(__pyx_v_day_cold_dict);
  __Pyx_XDECREF(__pyx_v_day_hot_cold_dict);
  __Pyx_XDECREF(__pyx_v_near_day_list);
  __Pyx_XDECREF(__pyx_v_near_day_dict);
  __Pyx_XDECREF(__pyx_v_time_key);
  __Pyx_XDECREF(__pyx_v_time_value);
  __Pyx_XDECREF(__pyx_v_day_hot_frequency_df);
  __Pyx_XDECREF(__pyx_v_use_num_hot);
  __Pyx_XDECREF(__pyx_v_day_cold_frequency_df);
  __Pyx_XDECREF(__pyx_v_use_num_cold);
  __Pyx_XDECREF(__pyx_v_new_row_hot);
  __Pyx_XDECREF(__pyx_v_new_row_cold);
  __Pyx_XDECREF(__pyx_v_day_hot_cold_frequency_df);
  __Pyx_XDECREF(__pyx_v_day_hot_cold_frequency_dict);
  __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_key);
  __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3622
 *         return day_hot_cold_frequency_df
 * 
 *     def getIndustryHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_31getIndustryHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_30getIndustryHotTable, "\n        \350\241\214\344\270\232\350\275\256\345\212\250\350\241\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\227\245\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\221\250\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\234\210\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\271\264\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\241\214\344\270\232\n\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\262\241\346\234\211\347\203\255\347\202\271\350\241\214\344\270\232\346\227\245\345\216\206\357\274\214\345\210\231\345\210\233\345\273\272\350\257\245\346\227\245\345\216\206\357\274\214\351\234\200\350\246\201\344\273\216\350\257\245\345\271\264\345\244\264\345\274\200\345\247\213\350\256\241\347\256\227\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\234\211\347\203\255\347\202\271\350\241\214\344\270\232\346\227\245\345\216\206\357\274\214\345\210\231\345\217\252\346\230\257\351\234\200\350\246\201\346\233\264\346\226\260\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\351\234\200\350\246\201\346\233\264\346\226\260\347\232\204\346\225\260\346\215\256\n        :return: \347\203\255\347\202\271\350\241\214\344\270\232\346\227\245\345\216\206\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_31getIndustryHotTable = {"getIndustryHotTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_31getIndustryHotTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_30getIndustryHotTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_31getIndustryHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndustryHotTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getIndustryHotTable") < 0)) __PYX_ERR(0, 3622, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_tr = values[1];
    __pyx_v_save_file = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndustryHotTable", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3622, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndustryHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_30getIndustryHotTable(__pyx_self, __pyx_v_self, __pyx_v_num_tr, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_30getIndustryHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_hot_industry_table = NULL;
  PyObject *__pyx_v_trade_day_table_name = NULL;
  PyObject *__pyx_v_use_date_now = NULL;
  PyObject *__pyx_v_use_date_previous = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  int __pyx_v_repeat_compute;
  PyObject *__pyx_v_year_start = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getIndustryHotTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3634
 *         :return:
 *         '''
 *         strategy_key_name = 'hot_cold_industry_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_industry_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_industry_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":3637
 * 
 *         #
 *         need_database_tables = ['stock_industry_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_industry_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_industry_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_industry_trade_day)) __PYX_ERR(0, 3637, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3638
 *         #
 *         need_database_tables = ['stock_industry_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3638, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3638, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3639
 *         need_database_tables = ['stock_industry_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3639, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3640
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3641
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3639
 *         need_database_tables = ['stock_industry_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3638
 *         #
 *         need_database_tables = ['stock_industry_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3644
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3644, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3645
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3645, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3646
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3647
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3645
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3644
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3649
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3650
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3653
 * 
 *         #
 *         hot_industry_table = {'updated': True, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},             # <<<<<<<<<<<<<<
 *                               'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_industry_trade_day'
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_True) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_v_num_tr) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_day, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_week, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_month, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_year, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_5, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_10, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3654
 *         #
 *         hot_industry_table = {'updated': True, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                               'near_20': {}, 'near_30': {}, 'near_60': {}}             # <<<<<<<<<<<<<<
 *         trade_day_table_name = 'stock_industry_trade_day'
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_20, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_30, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_60, __pyx_t_11) < 0) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_hot_industry_table = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3655
 *         hot_industry_table = {'updated': True, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                               'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_industry_trade_day'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_stock_industry_trade_day);
  __pyx_v_trade_day_table_name = __pyx_n_s_stock_industry_trade_day;

  /* "tbstock/tradeStrategy/stockStrategy.py":3658
 * 
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_use_date_now = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3659
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_use_date_now};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_use_date_previous = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3660
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_use_date_previous, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_json_file_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3661
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_load_json_file = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3662
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
  __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3662, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_load_json_file);
  __Pyx_GIVEREF(__pyx_v_load_json_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3662, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3663
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *         # num_tr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3663, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) __PYX_ERR(0, 3663, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3663, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_has_strategy_file = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_strategy_json = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3666
 * 
 *         # num_tr
 *         repeat_compute = False             # <<<<<<<<<<<<<<
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 */
  __pyx_v_repeat_compute = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3667
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3667, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3667, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_7;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3668
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_tr, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3668, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3668, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3669
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True             # <<<<<<<<<<<<<<
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 */
      __pyx_v_repeat_compute = 1;

      /* "tbstock/tradeStrategy/stockStrategy.py":3668
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3667
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3671
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             # while (use_date_now >= year_start): #
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3671, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3671, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = __pyx_v_repeat_compute;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3672
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))             # <<<<<<<<<<<<<<
 *             # while (use_date_now >= year_start): #
 *             #     print(f"compute_date = {use_date_now}")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getYearStartEndDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_use_date_now, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3672, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 3672, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3672, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __pyx_v_year_start = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_year_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3677
 *             #     self.update_hot_table(trade_day_table_name, use_date_now, hot_industry_table,mode)
 *             #     use_date_now = utils.sh_calendar.previous_session(use_date_now)
 *             while (use_date_now >= year_start):  #             # <<<<<<<<<<<<<<
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_industry_table)
 */
    while (1) {
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_use_date_now, __pyx_v_year_start, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3677, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3677, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_4) break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3678
 *             #     use_date_now = utils.sh_calendar.previous_session(use_date_now)
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")             # <<<<<<<<<<<<<<
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_industry_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)
 */
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_compute_date);
      __pyx_t_2 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_compute_date);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_compute_date);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_year_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3679
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_industry_table)             # <<<<<<<<<<<<<<
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3679, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_year_start, __pyx_v_hot_industry_table};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3679, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3680
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_industry_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)             # <<<<<<<<<<<<<<
 *         else:
 *             hot_industry_table = strategy_json[strategy_key_name]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_year_start};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_year_start, __pyx_t_11);
      __pyx_t_11 = 0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3671
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             # while (use_date_now >= year_start): #
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3682
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 *             hot_industry_table = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_industry_table)
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_hot_industry_table, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3683
 *         else:
 *             hot_industry_table = strategy_json[strategy_key_name]
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_industry_table)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_use_date_now, __pyx_v_hot_industry_table};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3686
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_industry_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_industry_table
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3687
 *         # json
 *         if save_file:
 *             hot_industry_table['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = hot_industry_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_hot_industry_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3687, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3688
 *         if save_file:
 *             hot_industry_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_industry_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return hot_industry_table
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_strategy_key_name, __pyx_v_hot_industry_table) < 0))) __PYX_ERR(0, 3688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3689
 *             hot_industry_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_industry_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return hot_industry_table
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3689, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3686
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_industry_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_industry_table
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3690
 *             self.strategy_json[strategy_key_name] = hot_industry_table
 *             self.dumpJsonToFile()
 *         return hot_industry_table             # <<<<<<<<<<<<<<
 * 
 *     def getConceptHotTable(self, num_tr=5, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hot_industry_table);
  __pyx_r = __pyx_v_hot_industry_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3622
 *         return day_hot_cold_frequency_df
 * 
 *     def getIndustryHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndustryHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_hot_industry_table);
  __Pyx_XDECREF(__pyx_v_trade_day_table_name);
  __Pyx_XDECREF(__pyx_v_use_date_now);
  __Pyx_XDECREF(__pyx_v_use_date_previous);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_year_start);
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3692
 *         return hot_industry_table
 * 
 *     def getConceptHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_33getConceptHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getConceptHotTable, "\n        \346\246\202\345\277\265\350\275\256\345\212\250\350\241\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\227\245\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\246\202\345\277\265\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\221\250\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\246\202\345\277\265\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\234\210\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\246\202\345\277\265\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\271\264\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\246\202\345\277\265\n\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\262\241\346\234\211\347\203\255\347\202\271\346\246\202\345\277\265\346\227\245\345\216\206\357\274\214\345\210\231\345\210\233\345\273\272\350\257\245\346\227\245\345\216\206\357\274\214\351\234\200\350\246\201\344\273\216\350\257\245\345\271\264\345\244\264\345\274\200\345\247\213\350\256\241\347\256\227\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\234\211\347\203\255\347\202\271\346\246\202\345\277\265\346\227\245\345\216\206\357\274\214\345\210\231\345\217\252\346\230\257\351\234\200\350\246\201\346\233\264\346\226\260\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\351\234\200\350\246\201\346\233\264\346\226\260\347\232\204\346\225\260\346\215\256\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_33getConceptHotTable = {"getConceptHotTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_33getConceptHotTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getConceptHotTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_33getConceptHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConceptHotTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getConceptHotTable") < 0)) __PYX_ERR(0, 3692, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_tr = values[1];
    __pyx_v_save_file = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getConceptHotTable", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3692, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getConceptHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getConceptHotTable(__pyx_self, __pyx_v_self, __pyx_v_num_tr, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_32getConceptHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_hot_concept_table = NULL;
  PyObject *__pyx_v_trade_day_table_name = NULL;
  PyObject *__pyx_v_use_date_now = NULL;
  PyObject *__pyx_v_use_date_previous = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  int __pyx_v_repeat_compute;
  PyObject *__pyx_v_year_start = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getConceptHotTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3704
 *         :return:
 *         '''
 *         strategy_key_name = 'hot_cold_concept_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_concept_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_concept_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":3707
 * 
 *         #
 *         need_database_tables = ['stock_concept_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_concept_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_concept_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_concept_trade_day)) __PYX_ERR(0, 3707, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3708
 *         #
 *         need_database_tables = ['stock_concept_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3708, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3708, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3709
 *         need_database_tables = ['stock_concept_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3709, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3710
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3711
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3709
 *         need_database_tables = ['stock_concept_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3708
 *         #
 *         need_database_tables = ['stock_concept_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3714
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3714, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3715
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3715, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3716
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3716, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3716, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3717
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3717, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3715
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3714
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3719
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3720
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3723
 * 
 *         #
 *         hot_concept_table = {'updated': False, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},             # <<<<<<<<<<<<<<
 *                              'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_concept_trade_day'
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_v_num_tr) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_day, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_week, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_month, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_year, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_5, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_10, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3724
 *         #
 *         hot_concept_table = {'updated': False, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                              'near_20': {}, 'near_30': {}, 'near_60': {}}             # <<<<<<<<<<<<<<
 *         trade_day_table_name = 'stock_concept_trade_day'
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_20, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_30, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_60, __pyx_t_11) < 0) __PYX_ERR(0, 3723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_hot_concept_table = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3725
 *         hot_concept_table = {'updated': False, 'num_tr': num_tr, 'day': {}, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                              'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_concept_trade_day'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_stock_concept_trade_day);
  __pyx_v_trade_day_table_name = __pyx_n_s_stock_concept_trade_day;

  /* "tbstock/tradeStrategy/stockStrategy.py":3728
 * 
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_use_date_now = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3729
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_use_date_now};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_use_date_previous = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3730
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_use_date_previous, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_json_file_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3731
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_load_json_file = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3732
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
  __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3732, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_load_json_file);
  __Pyx_GIVEREF(__pyx_v_load_json_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3732, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3733
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *         # num_tr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3733, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) __PYX_ERR(0, 3733, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3733, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_has_strategy_file = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_strategy_json = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3736
 * 
 *         # num_tr
 *         repeat_compute = False             # <<<<<<<<<<<<<<
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 */
  __pyx_v_repeat_compute = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3737
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3737, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3737, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_7;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3738
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_tr, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3738, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3738, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3739
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True             # <<<<<<<<<<<<<<
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 */
      __pyx_v_repeat_compute = 1;

      /* "tbstock/tradeStrategy/stockStrategy.py":3738
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3737
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3741
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             # while (use_date_now >= year_start): #
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3741, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3741, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = __pyx_v_repeat_compute;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3742
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))             # <<<<<<<<<<<<<<
 *             # while (use_date_now >= year_start): #
 *             #     print(f"compute_date = {use_date_now}")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getYearStartEndDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_use_date_now, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3742, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 3742, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3742, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __pyx_v_year_start = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_year_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3747
 *             #     self.update_hot_table(trade_day_table_name, use_date_now, hot_industry_table,mode)
 *             #     use_date_now = utils.sh_calendar.previous_session(use_date_now)
 *             while (use_date_now >= year_start):  #             # <<<<<<<<<<<<<<
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_concept_table)
 */
    while (1) {
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_use_date_now, __pyx_v_year_start, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3747, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3747, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_4) break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3748
 *             #     use_date_now = utils.sh_calendar.previous_session(use_date_now)
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")             # <<<<<<<<<<<<<<
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_concept_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)
 */
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_compute_date);
      __pyx_t_2 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_compute_date);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_compute_date);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_year_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3749
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_concept_table)             # <<<<<<<<<<<<<<
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_year_start, __pyx_v_hot_concept_table};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3749, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3750
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_concept_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)             # <<<<<<<<<<<<<<
 *         else:
 *             hot_concept_table = strategy_json[strategy_key_name]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_year_start};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3750, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_year_start, __pyx_t_11);
      __pyx_t_11 = 0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3741
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             # while (use_date_now >= year_start): #
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3752
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 *             hot_concept_table = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_concept_table)
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_hot_concept_table, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3753
 *         else:
 *             hot_concept_table = strategy_json[strategy_key_name]
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_concept_table)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_use_date_now, __pyx_v_hot_concept_table};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3753, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3756
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_concept_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_concept_table
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3756, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3757
 *         # json
 *         if save_file:
 *             hot_concept_table['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = hot_concept_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_hot_concept_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3757, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3758
 *         if save_file:
 *             hot_concept_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_concept_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return hot_concept_table
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_strategy_key_name, __pyx_v_hot_concept_table) < 0))) __PYX_ERR(0, 3758, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3759
 *             hot_concept_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_concept_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return hot_concept_table
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3756
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_concept_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_concept_table
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3760
 *             self.strategy_json[strategy_key_name] = hot_concept_table
 *             self.dumpJsonToFile()
 *         return hot_concept_table             # <<<<<<<<<<<<<<
 * 
 *     def getStockHotTable(self, num_tr=5, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hot_concept_table);
  __pyx_r = __pyx_v_hot_concept_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3692
 *         return hot_industry_table
 * 
 *     def getConceptHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getConceptHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_hot_concept_table);
  __Pyx_XDECREF(__pyx_v_trade_day_table_name);
  __Pyx_XDECREF(__pyx_v_use_date_now);
  __Pyx_XDECREF(__pyx_v_use_date_previous);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_year_start);
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3762
 *         return hot_concept_table
 * 
 *     def getStockHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_35getStockHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_34getStockHotTable, "\n        \344\270\252\350\202\241\350\275\256\345\212\250\350\241\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\221\250\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\202\241\347\245\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\234\210\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\202\241\347\245\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\271\264\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\350\202\241\347\245\250\n\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\262\241\346\234\211\347\203\255\347\202\271\350\202\241\347\245\250\346\227\245\345\216\206\357\274\214\345\210\231\345\210\233\345\273\272\350\257\245\346\227\245\345\216\206\357\274\214\351\234\200\350\246\201\344\273\216\350\257\245\345\271\264\345\244\264\345\274\200\345\247\213\350\256\241\347\256\227\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\234\211\347\203\255\347\202\271\350\202\241\347\245\250\346\227\245\345\216\206\357\274\214\345\210\231\345\217\252\346\230\257\351\234\200\350\246\201\346\233\264\346\226\260\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\351\234\200\350\246\201\346\233\264\346\226\260\347\232\204\346\225\260\346\215\256\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_35getStockHotTable = {"getStockHotTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_35getStockHotTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_34getStockHotTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_35getStockHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStockHotTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3762, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3762, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3762, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getStockHotTable") < 0)) __PYX_ERR(0, 3762, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_tr = values[1];
    __pyx_v_save_file = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getStockHotTable", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3762, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_34getStockHotTable(__pyx_self, __pyx_v_self, __pyx_v_num_tr, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_34getStockHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_hot_stock_table = NULL;
  PyObject *__pyx_v_trade_day_table_name = NULL;
  PyObject *__pyx_v_use_date_now = NULL;
  PyObject *__pyx_v_use_date_previous = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  int __pyx_v_repeat_compute;
  PyObject *__pyx_v_year_start = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStockHotTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3773
 *         :return:
 *         '''
 *         strategy_key_name = 'hot_cold_stock_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_stock_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_stock_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":3776
 * 
 *         #
 *         need_database_tables = ['stock_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_stock_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_stock_trade_day)) __PYX_ERR(0, 3776, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3777
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3777, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3777, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3778
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3778, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3779
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3780
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3778
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3777
 *         #
 *         need_database_tables = ['stock_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3783
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3783, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3784
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3784, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3785
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3785, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3786
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3786, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3784
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3783
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3788
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3789
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3792
 * 
 *         #
 *         hot_stock_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},             # <<<<<<<<<<<<<<
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_trade_day_2024'
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_v_num_tr) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_week, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_month, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_year, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_5, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_10, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3793
 *         #
 *         hot_stock_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}             # <<<<<<<<<<<<<<
 *         trade_day_table_name = 'stock_trade_day_2024'
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_20, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_30, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_60, __pyx_t_11) < 0) __PYX_ERR(0, 3792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_hot_stock_table = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3794
 *         hot_stock_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'stock_trade_day_2024'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_stock_trade_day_2024);
  __pyx_v_trade_day_table_name = __pyx_n_s_stock_trade_day_2024;

  /* "tbstock/tradeStrategy/stockStrategy.py":3797
 * 
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_use_date_now = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3798
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_use_date_now};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_use_date_previous = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3799
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_use_date_previous, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_json_file_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3800
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_load_json_file = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3801
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
  __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3801, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_load_json_file);
  __Pyx_GIVEREF(__pyx_v_load_json_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3801, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3802
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *         # num_tr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3802, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) __PYX_ERR(0, 3802, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3802, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_has_strategy_file = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_strategy_json = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3805
 * 
 *         # num_tr
 *         repeat_compute = False             # <<<<<<<<<<<<<<
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 */
  __pyx_v_repeat_compute = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3806
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3806, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3806, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_7;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3807
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_tr, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3807, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3807, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3808
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True             # <<<<<<<<<<<<<<
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 */
      __pyx_v_repeat_compute = 1;

      /* "tbstock/tradeStrategy/stockStrategy.py":3807
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3806
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3810
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3810, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3810, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = __pyx_v_repeat_compute;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3811
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))             # <<<<<<<<<<<<<<
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getYearStartEndDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_use_date_now, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3811, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3811, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3811, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 3811, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3811, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __pyx_v_year_start = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_year_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3812
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #             # <<<<<<<<<<<<<<
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_stock_table)
 */
    while (1) {
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_use_date_now, __pyx_v_year_start, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3812, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3812, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_4) break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3813
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")             # <<<<<<<<<<<<<<
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_stock_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)
 */
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_compute_date);
      __pyx_t_2 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_compute_date);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_compute_date);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_year_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3814
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_stock_table)             # <<<<<<<<<<<<<<
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_year_start, __pyx_v_hot_stock_table};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3814, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3815
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_stock_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)             # <<<<<<<<<<<<<<
 *         else:
 *             hot_stock_table = strategy_json[strategy_key_name]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_year_start};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3815, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_year_start, __pyx_t_11);
      __pyx_t_11 = 0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3810
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3817
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 *             hot_stock_table = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_stock_table)
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_hot_stock_table, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3818
 *         else:
 *             hot_stock_table = strategy_json[strategy_key_name]
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_stock_table)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_use_date_now, __pyx_v_hot_stock_table};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3821
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_stock_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_stock_table
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3821, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3822
 *         # json
 *         if save_file:
 *             hot_stock_table['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = hot_stock_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_hot_stock_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3822, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3823
 *         if save_file:
 *             hot_stock_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_stock_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return hot_stock_table
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3823, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_strategy_key_name, __pyx_v_hot_stock_table) < 0))) __PYX_ERR(0, 3823, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3824
 *             hot_stock_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_stock_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return hot_stock_table
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3824, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3821
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_stock_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_stock_table
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3825
 *             self.strategy_json[strategy_key_name] = hot_stock_table
 *             self.dumpJsonToFile()
 *         return hot_stock_table             # <<<<<<<<<<<<<<
 * 
 *     def getFutureHotTable(self, num_tr=5, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hot_stock_table);
  __pyx_r = __pyx_v_hot_stock_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3762
 *         return hot_concept_table
 * 
 *     def getStockHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getStockHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_hot_stock_table);
  __Pyx_XDECREF(__pyx_v_trade_day_table_name);
  __Pyx_XDECREF(__pyx_v_use_date_now);
  __Pyx_XDECREF(__pyx_v_use_date_previous);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_year_start);
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3827
 *         return hot_stock_table
 * 
 *     def getFutureHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_37getFutureHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_36getFutureHotTable, "\n        \344\270\252\350\202\241\350\275\256\345\212\250\350\241\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\221\250\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\234\210\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\271\264\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\262\241\346\234\211\347\203\255\347\202\271\346\234\237\350\264\247\346\227\245\345\216\206\357\274\214\345\210\231\345\210\233\345\273\272\350\257\245\346\227\245\345\216\206\357\274\214\351\234\200\350\246\201\344\273\216\350\257\245\345\271\264\345\244\264\345\274\200\345\247\213\350\256\241\347\256\227\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\234\211\347\203\255\347\202\271\346\234\237\350\264\247\346\227\245\345\216\206\357\274\214\345\210\231\345\217\252\346\230\257\351\234\200\350\246\201\346\233\264\346\226\260\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\351\234\200\350\246\201\346\233\264\346\226\260\347\232\204\346\225\260\346\215\256\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_37getFutureHotTable = {"getFutureHotTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_37getFutureHotTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_36getFutureHotTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_37getFutureHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFutureHotTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3827, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3827, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3827, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getFutureHotTable") < 0)) __PYX_ERR(0, 3827, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_tr = values[1];
    __pyx_v_save_file = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFutureHotTable", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3827, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getFutureHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_36getFutureHotTable(__pyx_self, __pyx_v_self, __pyx_v_num_tr, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_36getFutureHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_hot_future_table = NULL;
  PyObject *__pyx_v_trade_day_table_name = NULL;
  PyObject *__pyx_v_use_date_now = NULL;
  PyObject *__pyx_v_use_date_previous = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  int __pyx_v_repeat_compute;
  PyObject *__pyx_v_year_start = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFutureHotTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3838
 *         :return:
 *         '''
 *         strategy_key_name = 'hot_cold_future_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_future_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_future_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":3841
 * 
 *         #
 *         need_database_tables = ['future_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_future_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_future_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_future_trade_day)) __PYX_ERR(0, 3841, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3842
 *         #
 *         need_database_tables = ['future_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3842, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3842, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3843
 *         need_database_tables = ['future_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3843, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3844
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3844, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3845
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3843
 *         need_database_tables = ['future_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3842
 *         #
 *         need_database_tables = ['future_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3848
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3848, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3849
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3849, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3850
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3850, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3851
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3851, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3849
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3848
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3853
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3854
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3857
 * 
 *         #
 *         hot_future_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},             # <<<<<<<<<<<<<<
 *                             'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'future_trade_day'
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_v_num_tr) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_week, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_month, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_year, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_5, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_10, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3858
 *         #
 *         hot_future_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                             'near_20': {}, 'near_30': {}, 'near_60': {}}             # <<<<<<<<<<<<<<
 *         trade_day_table_name = 'future_trade_day'
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_20, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_30, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_60, __pyx_t_11) < 0) __PYX_ERR(0, 3857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_hot_future_table = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3859
 *         hot_future_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                             'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'future_trade_day'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_future_trade_day);
  __pyx_v_trade_day_table_name = __pyx_n_s_future_trade_day;

  /* "tbstock/tradeStrategy/stockStrategy.py":3862
 * 
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3862, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_use_date_now = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3863
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_use_date_now};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_use_date_previous = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3864
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_use_date_previous, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_json_file_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3865
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_load_json_file = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3866
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
  __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3866, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_load_json_file);
  __Pyx_GIVEREF(__pyx_v_load_json_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3866, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3867
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *         # num_tr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3867, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) __PYX_ERR(0, 3867, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3867, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_has_strategy_file = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_strategy_json = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3870
 * 
 *         # num_tr
 *         repeat_compute = False             # <<<<<<<<<<<<<<
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 */
  __pyx_v_repeat_compute = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3871
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3871, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3871, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_7;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3872
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_tr, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3873
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True             # <<<<<<<<<<<<<<
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 */
      __pyx_v_repeat_compute = 1;

      /* "tbstock/tradeStrategy/stockStrategy.py":3872
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3871
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3875
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3875, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3875, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = __pyx_v_repeat_compute;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3876
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))             # <<<<<<<<<<<<<<
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getYearStartEndDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_use_date_now, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3876, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 3876, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3876, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __pyx_v_year_start = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_year_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3877
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #             # <<<<<<<<<<<<<<
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_future_table)
 */
    while (1) {
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_use_date_now, __pyx_v_year_start, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3877, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3877, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_4) break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3878
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")             # <<<<<<<<<<<<<<
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_future_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)
 */
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_compute_date);
      __pyx_t_2 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_compute_date);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_compute_date);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_year_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3879
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_future_table)             # <<<<<<<<<<<<<<
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_year_start, __pyx_v_hot_future_table};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3879, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3880
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_future_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)             # <<<<<<<<<<<<<<
 *         else:
 *             hot_future_table = strategy_json[strategy_key_name]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_year_start};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3880, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_year_start, __pyx_t_11);
      __pyx_t_11 = 0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3875
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3882
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 *             hot_future_table = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_future_table)
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_hot_future_table, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3883
 *         else:
 *             hot_future_table = strategy_json[strategy_key_name]
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_future_table)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_use_date_now, __pyx_v_hot_future_table};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3886
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_future_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_future_table
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3886, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3887
 *         # json
 *         if save_file:
 *             hot_future_table['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = hot_future_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_hot_future_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3887, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3888
 *         if save_file:
 *             hot_future_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_future_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return hot_future_table
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_strategy_key_name, __pyx_v_hot_future_table) < 0))) __PYX_ERR(0, 3888, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3889
 *             hot_future_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_future_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return hot_future_table
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3886
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_future_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_future_table
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3890
 *             self.strategy_json[strategy_key_name] = hot_future_table
 *             self.dumpJsonToFile()
 *         return hot_future_table             # <<<<<<<<<<<<<<
 * 
 *     def getIndexHotTable(self, num_tr=5, save_file=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hot_future_table);
  __pyx_r = __pyx_v_hot_future_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3827
 *         return hot_stock_table
 * 
 *     def getFutureHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getFutureHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_hot_future_table);
  __Pyx_XDECREF(__pyx_v_trade_day_table_name);
  __Pyx_XDECREF(__pyx_v_use_date_now);
  __Pyx_XDECREF(__pyx_v_use_date_previous);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_year_start);
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3892
 *         return hot_future_table
 * 
 *     def getIndexHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_39getIndexHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_38getIndexHotTable, "\n        \344\270\252\350\202\241\350\275\256\345\212\250\350\241\250\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\221\250\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n        - \346\257\217\344\270\252\344\272\244\346\230\223\346\234\210\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n        - \346\257\217\344\270\252\344\272\244\346\230\223\345\271\264\346\230\276\347\244\272\346\266\250\345\271\205\345\211\2155\347\232\204\347\203\255\347\202\271\346\234\237\350\264\247\n\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\262\241\346\234\211\347\203\255\347\202\271\346\234\237\350\264\247\346\227\245\345\216\206\357\274\214\345\210\231\345\210\233\345\273\272\350\257\245\346\227\245\345\216\206\357\274\214\351\234\200\350\246\201\344\273\216\350\257\245\345\271\264\345\244\264\345\274\200\345\247\213\350\256\241\347\256\227\n        \345\246\202\346\236\234\345\211\215\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\234\211\347\203\255\347\202\271\346\234\237\350\264\247\346\227\245\345\216\206\357\274\214\345\210\231\345\217\252\346\230\257\351\234\200\350\246\201\346\233\264\346\226\260\345\275\223\345\211\215\344\272\244\346\230\223\346\227\245\351\234\200\350\246\201\346\233\264\346\226\260\347\232\204\346\225\260\346\215\256\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_39getIndexHotTable = {"getIndexHotTable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_39getIndexHotTable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_38getIndexHotTable};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_39getIndexHotTable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_tr = 0;
  PyObject *__pyx_v_save_file = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndexHotTable (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_tr,&__pyx_n_s_save_file,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_5)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3892, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_tr);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3892, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_file);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3892, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getIndexHotTable") < 0)) __PYX_ERR(0, 3892, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_tr = values[1];
    __pyx_v_save_file = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndexHotTable", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 3892, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndexHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_38getIndexHotTable(__pyx_self, __pyx_v_self, __pyx_v_num_tr, __pyx_v_save_file);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_38getIndexHotTable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_tr, PyObject *__pyx_v_save_file) {
  PyObject *__pyx_v_strategy_key_name = NULL;
  PyObject *__pyx_v_need_database_tables = NULL;
  PyObject *__pyx_v_data_table = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_hot_index_table = NULL;
  PyObject *__pyx_v_trade_day_table_name = NULL;
  PyObject *__pyx_v_use_date_now = NULL;
  PyObject *__pyx_v_use_date_previous = NULL;
  PyObject *__pyx_v_json_file_name = NULL;
  PyObject *__pyx_v_load_json_file = NULL;
  PyObject *__pyx_v_has_strategy_file = NULL;
  PyObject *__pyx_v_strategy_json = NULL;
  int __pyx_v_repeat_compute;
  PyObject *__pyx_v_year_start = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_year_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  unsigned int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getIndexHotTable", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3903
 *         :return:
 *         '''
 *         strategy_key_name = 'hot_cold_index_table'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_hot_cold_index_table);
  __pyx_v_strategy_key_name = __pyx_n_s_hot_cold_index_table;

  /* "tbstock/tradeStrategy/stockStrategy.py":3906
 * 
 *         #
 *         need_database_tables = ['index_trade_day']             # <<<<<<<<<<<<<<
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_index_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_index_trade_day);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_index_trade_day)) __PYX_ERR(0, 3906, __pyx_L1_error);
  __pyx_v_need_database_tables = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3907
 *         #
 *         need_database_tables = ['index_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  __pyx_t_1 = __pyx_v_need_database_tables; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3907, __pyx_L1_error)
      #endif
      if (__pyx_t_2 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 3907, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_data_table, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3908
 *         need_database_tables = ['index_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_data_table, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_data_table); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3908, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_5);
    __pyx_t_4 = __pyx_t_7;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3909
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Need_to_update_database_table);
      __pyx_t_9 += 30;
      __Pyx_GIVEREF(__pyx_kp_u_Need_to_update_database_table);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Need_to_update_database_table);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_data_table, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_firstly);
      __pyx_t_9 += 9;
      __Pyx_GIVEREF(__pyx_kp_u_firstly);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_firstly);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3909, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3910
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3908
 *         need_database_tables = ['index_trade_day']
 *         for data_table in need_database_tables:
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 *                 return False
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3907
 *         #
 *         need_database_tables = ['index_trade_day']
 *         for data_table in need_database_tables:             # <<<<<<<<<<<<<<
 *             if data_table not in self.update_json or not self.update_json[data_table]['updated']:
 *                 utils.logger.warning(f"Need to update database table {data_table} firstly.")
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3913
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3913, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_strategy_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3913, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __pyx_t_7;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3914
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3915
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return self.strategy_json[strategy_key_name]
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_2 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_The);
      __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
      __pyx_t_11 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3916
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 * 
 *         fun_name = sys._getframe().f_code.co_name
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3914
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):
 *             if self.strategy_json[strategy_key_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 *                 return self.strategy_json[strategy_key_name]
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3913
 * 
 *         #
 *         if save_file and self.has_strategy_file and (strategy_key_name in self.strategy_json):             # <<<<<<<<<<<<<<
 *             if self.strategy_json[strategy_key_name]['updated']:
 *                 utils.logger.info(f'The {strategy_key_name} table has been updated.')
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3918
 *                 return self.strategy_json[strategy_key_name]
 * 
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"Beginning {fun_name}")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getframe); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_f_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_fun_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3919
 * 
 *         fun_name = sys._getframe().f_code.co_name
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3922
 * 
 *         #
 *         hot_index_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},             # <<<<<<<<<<<<<<
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'index_trade_day'
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_tr, __pyx_v_num_tr) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_week, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_month, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_year, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_5, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_10, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3923
 *         #
 *         hot_index_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}             # <<<<<<<<<<<<<<
 *         trade_day_table_name = 'index_trade_day'
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_20, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_30, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_near_60, __pyx_t_11) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_hot_index_table = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3924
 *         hot_index_table = {'updated': False, 'num_tr': num_tr, 'week': {}, 'month': {}, 'year': {}, 'near_5': {}, 'near_10': {},
 *                            'near_20': {}, 'near_30': {}, 'near_60': {}}
 *         trade_day_table_name = 'index_trade_day'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_INCREF(__pyx_n_s_index_trade_day);
  __pyx_v_trade_day_table_name = __pyx_n_s_index_trade_day;

  /* "tbstock/tradeStrategy/stockStrategy.py":3927
 * 
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')             # <<<<<<<<<<<<<<
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_datetime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_strptime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_use_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_11, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_use_date_now = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3928
 *         #
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_previous_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_use_date_now};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_use_date_previous = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3929
 *         use_date_now = datetime.strptime(self.use_date, '%Y%m%d')
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'             # <<<<<<<<<<<<<<
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_use_date_previous, __pyx_kp_s_strategylog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_json_file_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3930
 *         use_date_previous = utils.sh_calendar.previous_session(use_date_now).strftime('%Y%m%d')
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name             # <<<<<<<<<<<<<<
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_strategy_logs_dir); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_v_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_load_json_file = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3931
 *         json_file_name = use_date_previous + '_strategylog.json'
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)             # <<<<<<<<<<<<<<
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s_load_json_file_2);
  __Pyx_GIVEREF(__pyx_kp_s_load_json_file_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_load_json_file_2)) __PYX_ERR(0, 3931, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_load_json_file);
  __Pyx_GIVEREF(__pyx_v_load_json_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_load_json_file)) __PYX_ERR(0, 3931, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3932
 *         load_json_file = utils.update_strategy_logs_dir + json_file_name
 *         print('load_json_file = ', load_json_file)
 *         has_strategy_file, strategy_json = utils.loadJsonData(load_json_file, json_file_name)             # <<<<<<<<<<<<<<
 * 
 *         # num_tr
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_load_json_file, __pyx_v_json_file_name};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3932, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
    index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L14_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_1), 2) < 0) __PYX_ERR(0, 3932, __pyx_L1_error)
    __pyx_t_13 = NULL;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L15_unpacking_done;
    __pyx_L14_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3932, __pyx_L1_error)
    __pyx_L15_unpacking_done:;
  }
  __pyx_v_has_strategy_file = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_strategy_json = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3935
 * 
 *         # num_tr
 *         repeat_compute = False             # <<<<<<<<<<<<<<
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 */
  __pyx_v_repeat_compute = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3936
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3936, __pyx_L1_error)
  if (__pyx_t_7) {
  } else {
    __pyx_t_4 = __pyx_t_7;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3936, __pyx_L1_error)
  __pyx_t_4 = __pyx_t_7;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3937
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_11, __pyx_n_s_num_tr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_tr, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3937, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3937, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_4) {

      /* "tbstock/tradeStrategy/stockStrategy.py":3938
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True             # <<<<<<<<<<<<<<
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 */
      __pyx_v_repeat_compute = 1;

      /* "tbstock/tradeStrategy/stockStrategy.py":3937
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:             # <<<<<<<<<<<<<<
 *                 repeat_compute = True
 * 
 */
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3936
 *         # num_tr
 *         repeat_compute = False
 *         if has_strategy_file and strategy_key_name in strategy_json:             # <<<<<<<<<<<<<<
 *             if strategy_json[strategy_key_name]['num_tr'] != num_tr:
 *                 repeat_compute = True
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3940
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_has_strategy_file); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3940, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_strategy_key_name, __pyx_v_strategy_json, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3940, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_4 = __pyx_v_repeat_compute;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3941
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))             # <<<<<<<<<<<<<<
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getYearStartEndDate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_use_date_now, __pyx_n_s_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
      PyObject* sequence = __pyx_t_11;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3941, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      #else
      __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3941, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
      index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 3941, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3941, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __pyx_v_year_start = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_year_end = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3942
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #             # <<<<<<<<<<<<<<
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_index_table)
 */
    while (1) {
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_use_date_now, __pyx_v_year_start, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3942, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3942, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (!__pyx_t_4) break;

      /* "tbstock/tradeStrategy/stockStrategy.py":3943
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")             # <<<<<<<<<<<<<<
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_index_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)
 */
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_2 = 0;
      __pyx_t_10 = 127;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_strategy_key_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_compute_date);
      __pyx_t_2 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_compute_date);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_compute_date);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_year_start, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_10;
      __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_11, 3, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3944
 *             while (use_date_now >= year_start):  #
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_index_table)             # <<<<<<<<<<<<<<
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3944, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_year_start, __pyx_v_hot_index_table};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "tbstock/tradeStrategy/stockStrategy.py":3945
 *                 print(f"{strategy_key_name}: compute_date = {year_start}")
 *                 self.update_hot_table(trade_day_table_name, year_start, hot_index_table)
 *                 year_start = utils.sh_calendar.next_session(year_start)             # <<<<<<<<<<<<<<
 *         else:
 *             hot_index_table = strategy_json[strategy_key_name]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_year_start};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_year_start, __pyx_t_11);
      __pyx_t_11 = 0;
    }

    /* "tbstock/tradeStrategy/stockStrategy.py":3940
 *                 repeat_compute = True
 * 
 *         if not has_strategy_file or strategy_key_name not in strategy_json or repeat_compute:             # <<<<<<<<<<<<<<
 *             year_start, year_end = utils.getYearStartEndDate(str(use_date_now.year))
 *             while (use_date_now >= year_start):  #
 */
    goto __pyx_L20;
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3947
 *                 year_start = utils.sh_calendar.next_session(year_start)
 *         else:
 *             hot_index_table = strategy_json[strategy_key_name]             # <<<<<<<<<<<<<<
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_index_table)
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_strategy_json, __pyx_v_strategy_key_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_hot_index_table, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3948
 *         else:
 *             hot_index_table = strategy_json[strategy_key_name]
 *             self.update_hot_table(trade_day_table_name, use_date_now, hot_index_table)             # <<<<<<<<<<<<<<
 * 
 *         # json
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_hot_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_trade_day_table_name, __pyx_v_use_date_now, __pyx_v_hot_index_table};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 3+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_L20:;

  /* "tbstock/tradeStrategy/stockStrategy.py":3951
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_index_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_index_table
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_save_file); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3951, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3952
 *         # json
 *         if save_file:
 *             hot_index_table['updated'] = True             # <<<<<<<<<<<<<<
 *             self.strategy_json[strategy_key_name] = hot_index_table
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_hot_index_table, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 3952, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3953
 *         if save_file:
 *             hot_index_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_index_table             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         return hot_index_table
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strategy_json); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_strategy_key_name, __pyx_v_hot_index_table) < 0))) __PYX_ERR(0, 3953, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3954
 *             hot_index_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_index_table
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return hot_index_table
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3954, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":3951
 * 
 *         # json
 *         if save_file:             # <<<<<<<<<<<<<<
 *             hot_index_table['updated'] = True
 *             self.strategy_json[strategy_key_name] = hot_index_table
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3955
 *             self.strategy_json[strategy_key_name] = hot_index_table
 *             self.dumpJsonToFile()
 *         return hot_index_table             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_hot_index_table);
  __pyx_r = __pyx_v_hot_index_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3892
 *         return hot_future_table
 * 
 *     def getIndexHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.publishStrategy.getIndexHotTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_strategy_key_name);
  __Pyx_XDECREF(__pyx_v_need_database_tables);
  __Pyx_XDECREF(__pyx_v_data_table);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_hot_index_table);
  __Pyx_XDECREF(__pyx_v_trade_day_table_name);
  __Pyx_XDECREF(__pyx_v_use_date_now);
  __Pyx_XDECREF(__pyx_v_use_date_previous);
  __Pyx_XDECREF(__pyx_v_json_file_name);
  __Pyx_XDECREF(__pyx_v_load_json_file);
  __Pyx_XDECREF(__pyx_v_has_strategy_file);
  __Pyx_XDECREF(__pyx_v_strategy_json);
  __Pyx_XDECREF(__pyx_v_year_start);
  __Pyx_XDECREF(__pyx_v_year_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3959
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_save_json = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_save_json,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3959, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_save_json);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3959, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3959, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_save_json = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3959, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy___init__(__pyx_self, __pyx_v_self, __pyx_v_save_json);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_save_json) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3960
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):
 *     def __init__(self, save_json=False):
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)             # <<<<<<<<<<<<<<
 *         print("pacoSelectStrategy.__init__")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pacoSelectStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 3960, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self)) __PYX_ERR(0, 3960, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_json, __pyx_v_save_json) < 0) __PYX_ERR(0, 3960, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3961
 *     def __init__(self, save_json=False):
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3959
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":3963
 *         print("pacoSelectStrategy.__init__")
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):             # <<<<<<<<<<<<<<
 *         '''
 *         near_day
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_3getPotentialLimitUpStockNearDay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_2getPotentialLimitUpStockNearDay, "\n        \350\216\267\345\217\226\346\234\200\350\277\221near_day\344\270\252\344\272\244\346\230\223\346\227\245\357\274\214\346\266\250\345\201\234\350\277\207\357\274\214\345\255\230\345\234\250\350\264\255\344\271\260\346\235\241\344\273\266\347\232\204\350\202\241\347\245\250\n        \347\255\233\351\200\211\346\235\241\344\273\266\357\274\232\n        1.\350\202\241\344\270\234\344\272\272\346\225\260\n        2.\350\202\241\347\245\250\346\210\220\344\272\244\351\242\235\n\n        :param near_day:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_3getPotentialLimitUpStockNearDay = {"getPotentialLimitUpStockNearDay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_3getPotentialLimitUpStockNearDay, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_2getPotentialLimitUpStockNearDay};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_3getPotentialLimitUpStockNearDay(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_near_day = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPotentialLimitUpStockNearDay (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_near_day,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_30)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3963, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_near_day);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3963, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getPotentialLimitUpStockNearDay") < 0)) __PYX_ERR(0, 3963, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_near_day = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPotentialLimitUpStockNearDay", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3963, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialLimitUpStockNearDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_2getPotentialLimitUpStockNearDay(__pyx_self, __pyx_v_self, __pyx_v_near_day);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_2getPotentialLimitUpStockNearDay(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_near_day) {
  PyObject *__pyx_v_market_type = NULL;
  PyObject *__pyx_v_marker_stock_list = NULL;
  PyObject *__pyx_v_industry_list = NULL;
  PyObject *__pyx_v_industry_stock_list = NULL;
  PyObject *__pyx_v_concept_list = NULL;
  PyObject *__pyx_v_concept_stock_list = NULL;
  PyObject *__pyx_v_area_list = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_area_stock_list = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_union_stock_list = NULL;
  PyObject *__pyx_v_intersect_stock_list = NULL;
  PyObject *__pyx_v_financial_mode = NULL;
  PyObject *__pyx_v_filter_dict = NULL;
  PyObject *__pyx_v_selection_df = NULL;
  PyObject *__pyx_v_stock_hold_num_table = NULL;
  PyObject *__pyx_9genexpr24__pyx_v_code = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPotentialLimitUpStockNearDay", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":3976
 *         #
 *         # market_type = ['', '']
 *         market_type = ['']             # <<<<<<<<<<<<<<
 *         marker_stock_list = self.selectByMarket(market_type)
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s__103);
  __Pyx_GIVEREF(__pyx_kp_s__103);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__103)) __PYX_ERR(0, 3976, __pyx_L1_error);
  __pyx_v_market_type = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3977
 *         # market_type = ['', '']
 *         market_type = ['']
 *         marker_stock_list = self.selectByMarket(market_type)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_selectByMarket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_market_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_marker_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3980
 * 
 *         #
 *         industry_list = ['', '', '', '']             # <<<<<<<<<<<<<<
 *         industry_stock_list = self.selectByIndustry(industry_list)
 * 
 */
  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s__139);
  __Pyx_GIVEREF(__pyx_kp_s__139);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__139)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__140);
  __Pyx_GIVEREF(__pyx_kp_s__140);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__140)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__141);
  __Pyx_GIVEREF(__pyx_kp_s__141);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s__141)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s__142);
  __Pyx_GIVEREF(__pyx_kp_s__142);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_kp_s__142)) __PYX_ERR(0, 3980, __pyx_L1_error);
  __pyx_v_industry_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3981
 *         #
 *         industry_list = ['', '', '', '']
 *         industry_stock_list = self.selectByIndustry(industry_list)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_selectByIndustry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_industry_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_industry_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3984
 * 
 *         #
 *         concept_list = ['', 'CRO', 'AI']             # <<<<<<<<<<<<<<
 *         concept_stock_list = self.selectByConcept(concept_list)
 * 
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s__143);
  __Pyx_GIVEREF(__pyx_kp_s__143);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__143)) __PYX_ERR(0, 3984, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_CRO);
  __Pyx_GIVEREF(__pyx_n_s_CRO);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_CRO)) __PYX_ERR(0, 3984, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_AI);
  __Pyx_GIVEREF(__pyx_kp_s_AI);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s_AI)) __PYX_ERR(0, 3984, __pyx_L1_error);
  __pyx_v_concept_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3985
 *         #
 *         concept_list = ['', 'CRO', 'AI']
 *         concept_stock_list = self.selectByConcept(concept_list)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_selectByConcept); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_concept_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_concept_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3988
 * 
 *         #
 *         area_list = ['']             # <<<<<<<<<<<<<<
 *         area_stock_list = self.selectByArea(area_list)
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s__144);
  __Pyx_GIVEREF(__pyx_kp_s__144);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__144)) __PYX_ERR(0, 3988, __pyx_L1_error);
  __pyx_v_area_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3989
 *         #
 *         area_list = ['']
 *         area_stock_list = self.selectByArea(area_list)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_selectByArea); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_area_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_area_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3992
 * 
 *         #
 *         union_stock_list = self.listUnion(industry_stock_list, concept_stock_list)             # <<<<<<<<<<<<<<
 *         intersect_stock_list = self.listIntersection(marker_stock_list)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_listUnion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_industry_stock_list, __pyx_v_concept_stock_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_union_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3993
 *         #
 *         union_stock_list = self.listUnion(industry_stock_list, concept_stock_list)
 *         intersect_stock_list = self.listIntersection(marker_stock_list)             # <<<<<<<<<<<<<<
 * 
 *         if not intersect_stock_list:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_listIntersection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_marker_stock_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3993, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_intersect_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3995
 *         intersect_stock_list = self.listIntersection(marker_stock_list)
 * 
 *         if not intersect_stock_list:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"intersect_stock_list is empty")
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_intersect_stock_list); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3995, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":3996
 * 
 *         if not intersect_stock_list:
 *             raise ValueError(f"intersect_stock_list is empty")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3996, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":3995
 *         intersect_stock_list = self.listIntersection(marker_stock_list)
 * 
 *         if not intersect_stock_list:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"intersect_stock_list is empty")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":3999
 * 
 *         #
 *         intersect_stock_list = [code for code in intersect_stock_list if not self.isLowAmountStock(code)]             # <<<<<<<<<<<<<<
 * 
 *         # # near_day
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3999, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_intersect_stock_list)) || PyTuple_CheckExact(__pyx_v_intersect_stock_list)) {
      __pyx_t_2 = __pyx_v_intersect_stock_list; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_intersect_stock_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3999, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3999, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3999, __pyx_L6_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3999, __pyx_L6_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3999, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3999, __pyx_L6_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 3999, __pyx_L6_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3999, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_2);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 3999, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_code, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isLowAmountStock); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3999, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr24__pyx_v_code};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3999, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3999, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = (!__pyx_t_6);
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr24__pyx_v_code))) __PYX_ERR(0, 3999, __pyx_L6_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_code); __pyx_9genexpr24__pyx_v_code = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_code); __pyx_9genexpr24__pyx_v_code = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_intersect_stock_list, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4010
 * 
 *         #
 *         financial_mode = 'quarter'             # <<<<<<<<<<<<<<
 *         filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date()],
 *                        'total_operate_revenue_tb': [30.0, utils.positive_infinity],
 */
  __Pyx_INCREF(__pyx_n_s_quarter);
  __pyx_v_financial_mode = __pyx_n_s_quarter;

  /* "tbstock/tradeStrategy/stockStrategy.py":4011
 *         #
 *         financial_mode = 'quarter'
 *         filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date()],             # <<<<<<<<<<<<<<
 *                        'total_operate_revenue_tb': [30.0, utils.positive_infinity],
 *                        # 'total_operate_revenue_hb': [30.0, utils.positive_infinity],
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_datetime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_date); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_2)) __PYX_ERR(0, 4011, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_report_date, __pyx_t_9) < 0) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4012
 *         financial_mode = 'quarter'
 *         filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date()],
 *                        'total_operate_revenue_tb': [30.0, utils.positive_infinity],             # <<<<<<<<<<<<<<
 *                        # 'total_operate_revenue_hb': [30.0, utils.positive_infinity],
 *                        'kf_net_profit_tb': [30.0, utils.positive_infinity],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_float_30_0);
  __Pyx_GIVEREF(__pyx_float_30_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_float_30_0)) __PYX_ERR(0, 4012, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_3)) __PYX_ERR(0, 4012, __pyx_L1_error);
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total_operate_revenue_tb, __pyx_t_9) < 0) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4014
 *                        'total_operate_revenue_tb': [30.0, utils.positive_infinity],
 *                        # 'total_operate_revenue_hb': [30.0, utils.positive_infinity],
 *                        'kf_net_profit_tb': [30.0, utils.positive_infinity],             # <<<<<<<<<<<<<<
 *                        # 'kf_net_profit_hb': [20.0, utils.positive_infinity],
 *                        # 'roe_jzc': [20.0, utils.positive_infinity],
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_positive_infinity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyList_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_float_30_0);
  __Pyx_GIVEREF(__pyx_float_30_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_float_30_0)) __PYX_ERR(0, 4014, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_3)) __PYX_ERR(0, 4014, __pyx_L1_error);
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_kf_net_profit_tb, __pyx_t_9) < 0) __PYX_ERR(0, 4011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_filter_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4019
 *                        }
 * 
 *         selection_df = self.getStockMultiFinancialData(financial_mode, filter_dict, False, False, intersect_stock_list)             # <<<<<<<<<<<<<<
 *         intersect_stock_list = selection_df['code'].to_list()
 *         print(f"getStockMultiFinancialData quarter: {intersect_stock_list}")
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockMultiFinancialData); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[6] = {__pyx_t_3, __pyx_v_financial_mode, __pyx_v_filter_dict, Py_False, Py_False, __pyx_v_intersect_stock_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_selection_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4020
 * 
 *         selection_df = self.getStockMultiFinancialData(financial_mode, filter_dict, False, False, intersect_stock_list)
 *         intersect_stock_list = selection_df['code'].to_list()             # <<<<<<<<<<<<<<
 *         print(f"getStockMultiFinancialData quarter: {intersect_stock_list}")
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_selection_df, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_intersect_stock_list, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4021
 *         selection_df = self.getStockMultiFinancialData(financial_mode, filter_dict, False, False, intersect_stock_list)
 *         intersect_stock_list = selection_df['code'].to_list()
 *         print(f"getStockMultiFinancialData quarter: {intersect_stock_list}")             # <<<<<<<<<<<<<<
 * 
 *         if not intersect_stock_list:
 */
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_intersect_stock_list, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_getStockMultiFinancialData_quart, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4023
 *         print(f"getStockMultiFinancialData quarter: {intersect_stock_list}")
 * 
 *         if not intersect_stock_list:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"intersect_stock_list is empty")
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_intersect_stock_list); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4023, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "tbstock/tradeStrategy/stockStrategy.py":4024
 * 
 *         if not intersect_stock_list:
 *             raise ValueError(f"intersect_stock_list is empty")             # <<<<<<<<<<<<<<
 * 
 *         # financial_mode = 'report'
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 4024, __pyx_L1_error)

    /* "tbstock/tradeStrategy/stockStrategy.py":4023
 *         print(f"getStockMultiFinancialData quarter: {intersect_stock_list}")
 * 
 *         if not intersect_stock_list:             # <<<<<<<<<<<<<<
 *             raise ValueError(f"intersect_stock_list is empty")
 * 
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":4045
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.3, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=intersect_stock_list)
 *         # stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockHoldNumberChangeTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_day_len, __pyx_int_252) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_new_date_len, __pyx_int_100) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_quantile_tr, __pyx_float_0_3) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_file, Py_False) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4046
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.3, save_file=False,
 *                                                                   input_codes=intersect_stock_list)             # <<<<<<<<<<<<<<
 *         # stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_input_codes, __pyx_v_intersect_stock_list) < 0) __PYX_ERR(0, 4045, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4045
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.3, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=intersect_stock_list)
 *         # stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_stock_hold_num_table = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4049
 *         # stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 * 
 *         return stock_hold_num_table             # <<<<<<<<<<<<<<
 * 
 *     def getPotentialConceptStock(self, concept_list=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_hold_num_table);
  __pyx_r = __pyx_v_stock_hold_num_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3963
 *         print("pacoSelectStrategy.__init__")
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):             # <<<<<<<<<<<<<<
 *         '''
 *         near_day
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialLimitUpStockNearDay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_market_type);
  __Pyx_XDECREF(__pyx_v_marker_stock_list);
  __Pyx_XDECREF(__pyx_v_industry_list);
  __Pyx_XDECREF(__pyx_v_industry_stock_list);
  __Pyx_XDECREF(__pyx_v_concept_list);
  __Pyx_XDECREF(__pyx_v_concept_stock_list);
  __Pyx_XDECREF(__pyx_v_area_list);
  __Pyx_XDECREF(__pyx_v_area_stock_list);
  __Pyx_XDECREF(__pyx_v_union_stock_list);
  __Pyx_XDECREF(__pyx_v_intersect_stock_list);
  __Pyx_XDECREF(__pyx_v_financial_mode);
  __Pyx_XDECREF(__pyx_v_filter_dict);
  __Pyx_XDECREF(__pyx_v_selection_df);
  __Pyx_XDECREF(__pyx_v_stock_hold_num_table);
  __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":4051
 *         return stock_hold_num_table
 * 
 *     def getPotentialConceptStock(self, concept_list=None):             # <<<<<<<<<<<<<<
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_5getPotentialConceptStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_5getPotentialConceptStock = {"getPotentialConceptStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_5getPotentialConceptStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_5getPotentialConceptStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_concept_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPotentialConceptStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_concept_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4051, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_concept_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4051, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getPotentialConceptStock") < 0)) __PYX_ERR(0, 4051, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_concept_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPotentialConceptStock", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4051, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialConceptStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_4getPotentialConceptStock(__pyx_self, __pyx_v_self, __pyx_v_concept_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_4getPotentialConceptStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept_list) {
  PyObject *__pyx_v_concept_stock_list = NULL;
  PyObject *__pyx_v_top_up_limit = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_top_amplitude = NULL;
  PyObject *__pyx_v_name_up_limit_times = NULL;
  PyObject *__pyx_v_limit_up_code_list = NULL;
  PyObject *__pyx_v_stock_hold_num_table = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPotentialConceptStock", 0);
  __Pyx_INCREF(__pyx_v_concept_list);

  /* "tbstock/tradeStrategy/stockStrategy.py":4052
 * 
 *     def getPotentialConceptStock(self, concept_list=None):
 *         if concept_list == None:             # <<<<<<<<<<<<<<
 *             concept_list = ['DRG/DIP']
 *         concept_stock_list = self.dataproc.getConceptStockCodes(concept_list)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_concept_list, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4052, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":4053
 *     def getPotentialConceptStock(self, concept_list=None):
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']             # <<<<<<<<<<<<<<
 *         concept_stock_list = self.dataproc.getConceptStockCodes(concept_list)
 * 
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4053, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_DRG_DIP);
    __Pyx_GIVEREF(__pyx_kp_s_DRG_DIP);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_DRG_DIP)) __PYX_ERR(0, 4053, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_concept_list, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":4052
 * 
 *     def getPotentialConceptStock(self, concept_list=None):
 *         if concept_list == None:             # <<<<<<<<<<<<<<
 *             concept_list = ['DRG/DIP']
 *         concept_stock_list = self.dataproc.getConceptStockCodes(concept_list)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":4054
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']
 *         concept_stock_list = self.dataproc.getConceptStockCodes(concept_list)             # <<<<<<<<<<<<<<
 * 
 *         # near_day
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getConceptStockCodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_concept_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4054, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_concept_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4057
 * 
 *         # near_day
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=concept_stock_list)             # <<<<<<<<<<<<<<
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()
 *         limit_up_code_list = top_up_limit['code'].to_list()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_codes, __pyx_v_concept_stock_list) < 0) __PYX_ERR(0, 4057, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__146, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 4057, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 4057, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 4057, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_top_up_limit = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_top_amplitude = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4058
 *         # near_day
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=concept_stock_list)
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()             # <<<<<<<<<<<<<<
 *         limit_up_code_list = top_up_limit['code'].to_list()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_top_up_limit, __pyx_n_s_upLimit_times); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_name_up_limit_times = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4059
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=concept_stock_list)
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()
 *         limit_up_code_list = top_up_limit['code'].to_list()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_top_up_limit, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_limit_up_code_list = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4062
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockHoldNumberChangeTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_day_len, __pyx_int_252) < 0) __PYX_ERR(0, 4062, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_new_date_len, __pyx_int_100) < 0) __PYX_ERR(0, 4062, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quantile_tr, __pyx_float_0_2) < 0) __PYX_ERR(0, 4062, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_file, Py_False) < 0) __PYX_ERR(0, 4062, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4063
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,
 *                                                                   input_codes=limit_up_code_list)             # <<<<<<<<<<<<<<
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 *         return stock_hold_num_table
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_codes, __pyx_v_limit_up_code_list) < 0) __PYX_ERR(0, 4062, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4062
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_hold_num_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4064
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)             # <<<<<<<<<<<<<<
 *         return stock_hold_num_table
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_hold_num_table, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_name_up_limit_times};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4064, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_stock_hold_num_table, __pyx_n_s_upLimit_times, __pyx_t_4) < 0))) __PYX_ERR(0, 4064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4065
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 *         return stock_hold_num_table             # <<<<<<<<<<<<<<
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_hold_num_table);
  __pyx_r = __pyx_v_stock_hold_num_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4051
 *         return stock_hold_num_table
 * 
 *     def getPotentialConceptStock(self, concept_list=None):             # <<<<<<<<<<<<<<
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialConceptStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_concept_stock_list);
  __Pyx_XDECREF(__pyx_v_top_up_limit);
  __Pyx_XDECREF(__pyx_v_top_amplitude);
  __Pyx_XDECREF(__pyx_v_name_up_limit_times);
  __Pyx_XDECREF(__pyx_v_limit_up_code_list);
  __Pyx_XDECREF(__pyx_v_stock_hold_num_table);
  __Pyx_XDECREF(__pyx_v_concept_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":4067
 *         return stock_hold_num_table
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):             # <<<<<<<<<<<<<<
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_7getPotentialIndustryStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_7getPotentialIndustryStock = {"getPotentialIndustryStock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_7getPotentialIndustryStock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_7getPotentialIndustryStock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_industry_list = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPotentialIndustryStock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_industry_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4067, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_industry_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4067, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getPotentialIndustryStock") < 0)) __PYX_ERR(0, 4067, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_industry_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getPotentialIndustryStock", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4067, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialIndustryStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_6getPotentialIndustryStock(__pyx_self, __pyx_v_self, __pyx_v_industry_list);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_6getPotentialIndustryStock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_industry_list) {
  PyObject *__pyx_v_industry_stock_list = NULL;
  PyObject *__pyx_v_top_up_limit = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_top_amplitude = NULL;
  PyObject *__pyx_v_name_up_limit_times = NULL;
  PyObject *__pyx_v_limit_up_code_list = NULL;
  PyObject *__pyx_v_stock_hold_num_table = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getPotentialIndustryStock", 0);
  __Pyx_INCREF(__pyx_v_industry_list);

  /* "tbstock/tradeStrategy/stockStrategy.py":4068
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):
 *         if industry_list == None:             # <<<<<<<<<<<<<<
 *             industry_list = ['', '', '', '']
 *         industry_stock_list = self.dataproc.getIndustryStockCodes(industry_list)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_industry_list, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4068, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4068, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "tbstock/tradeStrategy/stockStrategy.py":4069
 *     def getPotentialIndustryStock(self, industry_list=None):
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']             # <<<<<<<<<<<<<<
 *         industry_stock_list = self.dataproc.getIndustryStockCodes(industry_list)
 * 
 */
    __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__147);
    __Pyx_GIVEREF(__pyx_kp_s__147);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__147)) __PYX_ERR(0, 4069, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__148);
    __Pyx_GIVEREF(__pyx_kp_s__148);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__148)) __PYX_ERR(0, 4069, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__142);
    __Pyx_GIVEREF(__pyx_kp_s__142);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s__142)) __PYX_ERR(0, 4069, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__141);
    __Pyx_GIVEREF(__pyx_kp_s__141);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_kp_s__141)) __PYX_ERR(0, 4069, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_industry_list, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":4068
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):
 *         if industry_list == None:             # <<<<<<<<<<<<<<
 *             industry_list = ['', '', '', '']
 *         industry_stock_list = self.dataproc.getIndustryStockCodes(industry_list)
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":4070
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']
 *         industry_stock_list = self.dataproc.getIndustryStockCodes(industry_list)             # <<<<<<<<<<<<<<
 * 
 *         # near_day
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getIndustryStockCodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_industry_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_industry_stock_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4073
 * 
 *         # near_day
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=industry_stock_list)             # <<<<<<<<<<<<<<
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()
 *         limit_up_code_list = top_up_limit['code'].to_list()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockProperty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_codes, __pyx_v_industry_stock_list) < 0) __PYX_ERR(0, 4073, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__146, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 4073, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4073, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 4073, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 4073, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_top_up_limit = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_top_amplitude = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4074
 *         # near_day
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=industry_stock_list)
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()             # <<<<<<<<<<<<<<
 *         limit_up_code_list = top_up_limit['code'].to_list()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_top_up_limit, __pyx_n_s_upLimit_times); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_name_up_limit_times = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4075
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=industry_stock_list)
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()
 *         limit_up_code_list = top_up_limit['code'].to_list()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_top_up_limit, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_limit_up_code_list = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4078
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getStockHoldNumberChangeTable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_day_len, __pyx_int_252) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_new_date_len, __pyx_int_100) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quantile_tr, __pyx_float_0_2) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_save_file, Py_False) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4079
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,
 *                                                                   input_codes=limit_up_code_list)             # <<<<<<<<<<<<<<
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 *         return stock_hold_num_table
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_codes, __pyx_v_limit_up_code_list) < 0) __PYX_ERR(0, 4078, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4078
 * 
 *         #
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,             # <<<<<<<<<<<<<<
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_hold_num_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4080
 *         stock_hold_num_table = self.getStockHoldNumberChangeTable(day_len=252, new_date_len=100, quantile_tr=0.2, save_file=False,
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)             # <<<<<<<<<<<<<<
 *         return stock_hold_num_table
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_hold_num_table, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_name_up_limit_times};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4080, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_stock_hold_num_table, __pyx_n_s_upLimit_times, __pyx_t_4) < 0))) __PYX_ERR(0, 4080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4081
 *                                                                   input_codes=limit_up_code_list)
 *         stock_hold_num_table['upLimit_times'] = stock_hold_num_table.index.map(name_up_limit_times)
 *         return stock_hold_num_table             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_stock_hold_num_table);
  __pyx_r = __pyx_v_stock_hold_num_table;
  goto __pyx_L0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4067
 *         return stock_hold_num_table
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):             # <<<<<<<<<<<<<<
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.pacoSelectStrategy.getPotentialIndustryStock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_industry_stock_list);
  __Pyx_XDECREF(__pyx_v_top_up_limit);
  __Pyx_XDECREF(__pyx_v_top_amplitude);
  __Pyx_XDECREF(__pyx_v_name_up_limit_times);
  __Pyx_XDECREF(__pyx_v_limit_up_code_list);
  __Pyx_XDECREF(__pyx_v_stock_hold_num_table);
  __Pyx_XDECREF(__pyx_v_industry_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":4084
 * 
 * 
 * def test_select_stock():             # <<<<<<<<<<<<<<
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_1test_select_stock(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_1test_select_stock = {"test_select_stock", (PyCFunction)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_1test_select_stock, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_1test_select_stock(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test_select_stock (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_test_select_stock(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_test_select_stock(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_save_strategy;
  PyObject *__pyx_v_my_method = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_my_dict = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("test_select_stock", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":4085
 * 
 * def test_select_stock():
 *     save_strategy = False             # <<<<<<<<<<<<<<
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 *     print('use_date = ', my_method.use_date)
 */
  __pyx_v_save_strategy = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4086
 * def test_select_stock():
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)             # <<<<<<<<<<<<<<
 *     print('use_date = ', my_method.use_date)
 *     start = time.time()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fundamentalStockStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_save_strategy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_save_json, __pyx_t_3) < 0) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_method = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4087
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 *     print('use_date = ', my_method.use_date)             # <<<<<<<<<<<<<<
 *     start = time.time()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s_use_date_2);
  __Pyx_GIVEREF(__pyx_kp_s_use_date_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_use_date_2)) __PYX_ERR(0, 4087, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 4087, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4088
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 *     print('use_date = ', my_method.use_date)
 *     start = time.time()             # <<<<<<<<<<<<<<
 * 
 *     # 1:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_start = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4091
 * 
 *     # 1:
 *     my_dict = my_method.selectByNameWord('')  # test ok             # <<<<<<<<<<<<<<
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_selectByNameWord); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s__149};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_my_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4092
 *     # 1:
 *     my_dict = my_method.selectByNameWord('')  # test ok
 *     print(f'{len(my_dict)}')             # <<<<<<<<<<<<<<
 *     for key, value in my_dict.items():
 *         print(f'{key}: {value}')
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_n_u__150);
  __pyx_t_6 = (65535 > __pyx_t_6) ? 65535 : __pyx_t_6;
  __pyx_t_5 += 4;
  __Pyx_GIVEREF(__pyx_n_u__150);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u__150);
  __pyx_t_7 = PyObject_Length(__pyx_v_my_dict); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4092, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_7, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_kp_u__151);
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_kp_u__151) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_kp_u__151) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_kp_u__151);
  __Pyx_GIVEREF(__pyx_kp_u__151);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__151);
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4093
 *     my_dict = my_method.selectByNameWord('')  # test ok
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():             # <<<<<<<<<<<<<<
 *         print(f'{key}: {value}')
 * 
 */
  __pyx_t_5 = 0;
  if (unlikely(__pyx_v_my_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 4093, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_my_dict, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_1;
  __pyx_t_1 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, &__pyx_t_2, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":4094
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():
 *         print(f'{key}: {value}')             # <<<<<<<<<<<<<<
 * 
 *     ## 2:
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = 0;
    __pyx_t_6 = 127;
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_key, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__108);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__108);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u__108);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4097
 * 
 *     ## 2:
 *     my_dict = my_method.selectByKeyProduct('')             # <<<<<<<<<<<<<<
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_selectByKeyProduct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s__152};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_my_dict, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4098
 *     ## 2:
 *     my_dict = my_method.selectByKeyProduct('')
 *     print(f'{len(my_dict)}')             # <<<<<<<<<<<<<<
 *     for key, value in my_dict.items():
 *         print(f'{key}: {value}')
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_n_u__150);
  __pyx_t_6 = (65535 > __pyx_t_6) ? 65535 : __pyx_t_6;
  __pyx_t_7 += 4;
  __Pyx_GIVEREF(__pyx_n_u__150);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u__150);
  __pyx_t_5 = PyObject_Length(__pyx_v_my_dict); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4098, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__151);
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_kp_u__151) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_kp_u__151) : __pyx_t_6;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_kp_u__151);
  __Pyx_GIVEREF(__pyx_kp_u__151);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__151);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4099
 *     my_dict = my_method.selectByKeyProduct('')
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():             # <<<<<<<<<<<<<<
 *         print(f'{key}: {value}')
 * 
 */
  __pyx_t_7 = 0;
  if (unlikely(__pyx_v_my_dict == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 4099, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_my_dict, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_7, &__pyx_t_2, &__pyx_t_1, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 4099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":4100
 *     print(f'{len(my_dict)}')
 *     for key, value in my_dict.items():
 *         print(f'{key}: {value}')             # <<<<<<<<<<<<<<
 * 
 *     end = time.time()
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = 0;
    __pyx_t_6 = 127;
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_key, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u__108);
    __pyx_t_10 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__108);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__108);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
    __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4102
 *         print(f'{key}: {value}')
 * 
 *     end = time.time()             # <<<<<<<<<<<<<<
 *     print(f"time cost = {end - start} s.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_end = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4103
 * 
 *     end = time.time()
 *     print(f"time cost = {end - start} s.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_kp_u_time_cost_2);
  __pyx_t_5 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_time_cost_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_time_cost_2);
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_kp_u_s);
  __pyx_t_5 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_s);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_s);
  __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4084
 * 
 * 
 * def test_select_stock():             # <<<<<<<<<<<<<<
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.test_select_stock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_method);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_my_dict);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":4106
 * 
 * 
 * def getStrategyDataAndImg_new():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_3getStrategyDataAndImg_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_3getStrategyDataAndImg_new = {"getStrategyDataAndImg_new", (PyCFunction)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_3getStrategyDataAndImg_new, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_3getStrategyDataAndImg_new(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getStrategyDataAndImg_new (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_2getStrategyDataAndImg_new(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_2getStrategyDataAndImg_new(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_save_strategy;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_publish_strategy = NULL;
  PyObject *__pyx_v_my_plot = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_UCS4 __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getStrategyDataAndImg_new", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":4107
 * 
 * def getStrategyDataAndImg_new():
 *     save_strategy = True             # <<<<<<<<<<<<<<
 * 
 *     start = time.time()
 */
  __pyx_v_save_strategy = 1;

  /* "tbstock/tradeStrategy/stockStrategy.py":4109
 *     save_strategy = True
 * 
 *     start = time.time()             # <<<<<<<<<<<<<<
 *     #
 *     publish_strategy = publishStrategy(save_json=save_strategy)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4111
 *     start = time.time()
 *     #
 *     publish_strategy = publishStrategy(save_json=save_strategy)             # <<<<<<<<<<<<<<
 *     publish_strategy.getStrategyDataAndImg()
 *     #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_publishStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_save_strategy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_save_json, __pyx_t_2) < 0) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_publish_strategy = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4112
 *     #
 *     publish_strategy = publishStrategy(save_json=save_strategy)
 *     publish_strategy.getStrategyDataAndImg()             # <<<<<<<<<<<<<<
 *     #
 *     my_plot = visualStock()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_publish_strategy, __pyx_n_s_getStrategyDataAndImg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4114
 *     publish_strategy.getStrategyDataAndImg()
 *     #
 *     my_plot = visualStock()             # <<<<<<<<<<<<<<
 *     my_plot.plotStrategyFigure(publish_strategy.load_json_file)
 *     my_plot.closeDriver()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_visualStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_my_plot = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4115
 *     #
 *     my_plot = visualStock()
 *     my_plot.plotStrategyFigure(publish_strategy.load_json_file)             # <<<<<<<<<<<<<<
 *     my_plot.closeDriver()
 *     end = time.time()
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_plot, __pyx_n_s_plotStrategyFigure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_publish_strategy, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_1};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4116
 *     my_plot = visualStock()
 *     my_plot.plotStrategyFigure(publish_strategy.load_json_file)
 *     my_plot.closeDriver()             # <<<<<<<<<<<<<<
 *     end = time.time()
 *     print(f"time cost = {end - start} s.")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_plot, __pyx_n_s_closeDriver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4117
 *     my_plot.plotStrategyFigure(publish_strategy.load_json_file)
 *     my_plot.closeDriver()
 *     end = time.time()             # <<<<<<<<<<<<<<
 *     print(f"time cost = {end - start} s.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_end = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4118
 *     my_plot.closeDriver()
 *     end = time.time()
 *     print(f"time cost = {end - start} s.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_7 = 127;
  __Pyx_INCREF(__pyx_kp_u_time_cost_2);
  __pyx_t_6 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_time_cost_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_time_cost_2);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7;
  __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u_s);
  __pyx_t_6 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_s);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_s);
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4106
 * 
 * 
 * def getStrategyDataAndImg_new():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.getStrategyDataAndImg_new", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_publish_strategy);
  __Pyx_XDECREF(__pyx_v_my_plot);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/tradeStrategy/stockStrategy.py":4121
 * 
 * 
 * def simple_test():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 *     # my_method = publishStrategy(save_json=save_strategy)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_5simple_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_5simple_test = {"simple_test", (PyCFunction)__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_5simple_test, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_13tradeStrategy_13stockStrategy_5simple_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("simple_test (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_4simple_test(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_4simple_test(CYTHON_UNUSED PyObject *__pyx_self) {
  int __pyx_v_save_strategy;
  PyObject *__pyx_v_my_method = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_market_type = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_input_codes = NULL;
  PyObject *__pyx_v_quantile_amplitude_tr = NULL;
  PyObject *__pyx_v_select_df = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simple_test", 1);

  /* "tbstock/tradeStrategy/stockStrategy.py":4122
 * 
 * def simple_test():
 *     save_strategy = True             # <<<<<<<<<<<<<<
 *     # my_method = publishStrategy(save_json=save_strategy)
 *     my_method = pacoSelectStrategy(save_json=save_strategy)
 */
  __pyx_v_save_strategy = 1;

  /* "tbstock/tradeStrategy/stockStrategy.py":4124
 *     save_strategy = True
 *     # my_method = publishStrategy(save_json=save_strategy)
 *     my_method = pacoSelectStrategy(save_json=save_strategy)             # <<<<<<<<<<<<<<
 *     print('use_date = ', my_method.use_date)
 *     # paco_strategy = pacoSelectStrategy(save_json=False)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pacoSelectStrategy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_save_strategy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_save_json, __pyx_t_3) < 0) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_my_method = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4125
 *     # my_method = publishStrategy(save_json=save_strategy)
 *     my_method = pacoSelectStrategy(save_json=save_strategy)
 *     print('use_date = ', my_method.use_date)             # <<<<<<<<<<<<<<
 *     # paco_strategy = pacoSelectStrategy(save_json=False)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_use_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_kp_s_use_date_2);
  __Pyx_GIVEREF(__pyx_kp_s_use_date_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_use_date_2)) __PYX_ERR(0, 4125, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 4125, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4128
 *     # paco_strategy = pacoSelectStrategy(save_json=False)
 * 
 *     start = time.time()             # <<<<<<<<<<<<<<
 * 
 *     # test_df = my_method.getStockByFinancialData()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_start = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4163
 *     # my_plot.plotHoldNumberDecrease()
 * 
 *     market_type = ['']             # <<<<<<<<<<<<<<
 *     input_codes = my_method.selectByMarket(market_type)
 *     quantile_amplitude_tr = {'quantile_tr_min': 0.5, 'quantile_tr_max': 1.0, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.1}
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_kp_s__103);
  __Pyx_GIVEREF(__pyx_kp_s__103);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s__103)) __PYX_ERR(0, 4163, __pyx_L1_error);
  __pyx_v_market_type = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4164
 * 
 *     market_type = ['']
 *     input_codes = my_method.selectByMarket(market_type)             # <<<<<<<<<<<<<<
 *     quantile_amplitude_tr = {'quantile_tr_min': 0.5, 'quantile_tr_max': 1.0, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.1}
 *     select_df = my_method.selectByStockPriceQuantile(day_len=30, quantile_amplitude_tr=quantile_amplitude_tr, use_st_stock=False)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_selectByMarket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_market_type};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_input_codes = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4165
 *     market_type = ['']
 *     input_codes = my_method.selectByMarket(market_type)
 *     quantile_amplitude_tr = {'quantile_tr_min': 0.5, 'quantile_tr_max': 1.0, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.1}             # <<<<<<<<<<<<<<
 *     select_df = my_method.selectByStockPriceQuantile(day_len=30, quantile_amplitude_tr=quantile_amplitude_tr, use_st_stock=False)
 *     print(select_df)
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_quantile_tr_min, __pyx_float_0_5) < 0) __PYX_ERR(0, 4165, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_quantile_tr_max, __pyx_float_1_0) < 0) __PYX_ERR(0, 4165, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_amplitude_tr_min, __pyx_float_0_0) < 0) __PYX_ERR(0, 4165, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_amplitude_tr_max, __pyx_float_0_1) < 0) __PYX_ERR(0, 4165, __pyx_L1_error)
  __pyx_v_quantile_amplitude_tr = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4166
 *     input_codes = my_method.selectByMarket(market_type)
 *     quantile_amplitude_tr = {'quantile_tr_min': 0.5, 'quantile_tr_max': 1.0, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.1}
 *     select_df = my_method.selectByStockPriceQuantile(day_len=30, quantile_amplitude_tr=quantile_amplitude_tr, use_st_stock=False)             # <<<<<<<<<<<<<<
 *     print(select_df)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_selectByStockPriceQuantile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_day_len, __pyx_int_30) < 0) __PYX_ERR(0, 4166, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quantile_amplitude_tr, __pyx_v_quantile_amplitude_tr) < 0) __PYX_ERR(0, 4166, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_use_st_stock, Py_False) < 0) __PYX_ERR(0, 4166, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_select_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4167
 *     quantile_amplitude_tr = {'quantile_tr_min': 0.5, 'quantile_tr_max': 1.0, 'amplitude_tr_min': 0.0, 'amplitude_tr_max': 0.1}
 *     select_df = my_method.selectByStockPriceQuantile(day_len=30, quantile_amplitude_tr=quantile_amplitude_tr, use_st_stock=False)
 *     print(select_df)             # <<<<<<<<<<<<<<
 * 
 *     ret = my_method.getSingleStockPriceQuantile('300416', 60)
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_select_df); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4169
 *     print(select_df)
 * 
 *     ret = my_method.getSingleStockPriceQuantile('300416', 60)             # <<<<<<<<<<<<<<
 *     print(ret)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_method, __pyx_n_s_getSingleStockPriceQuantile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ret = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4170
 * 
 *     ret = my_method.getSingleStockPriceQuantile('300416', 60)
 *     print(ret)             # <<<<<<<<<<<<<<
 * 
 *     # select_df = my_method.selectByMarketCap(1000, 100000)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4243
 *     # my_visual.testVisualization()
 * 
 *     end = time.time()             # <<<<<<<<<<<<<<
 *     print(f"time cost = {end - start} s.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4244
 * 
 *     end = time.time()
 *     print(f"time cost = {end - start} s.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_kp_u_time_cost_2);
  __pyx_t_5 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_time_cost_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_time_cost_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u_s);
  __pyx_t_5 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_s);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_s);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4121
 * 
 * 
 * def simple_test():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 *     # my_method = publishStrategy(save_json=save_strategy)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.tradeStrategy.stockStrategy.simple_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_my_method);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_market_type);
  __Pyx_XDECREF(__pyx_v_input_codes);
  __Pyx_XDECREF(__pyx_v_quantile_amplitude_tr);
  __Pyx_XDECREF(__pyx_v_select_df);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct__selectByMarketCap",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct__selectByMarketCap", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_select_str);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)o;
  if (p->__pyx_v_select_str) {
    e = (*v)(p->__pyx_v_select_str, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket *)o;
  tmp = ((PyObject*)p->__pyx_v_select_str);
  p->__pyx_v_select_str = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_1_selectByMarket",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_1_selectByMarket", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_2_selectByStockPrice",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_2_selectByStockPrice", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty__slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty__spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_3_getStockProperty_",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty__slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_3_getStockProperty_", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_stock_code);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_stock_code) {
    e = (*v)(p->__pyx_v_stock_code, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stock_code);
  p->__pyx_v_stock_code = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_4_stockSingleStockProperty",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_4_stockSingleStockProperty", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_5_getStockWavePriceRatio",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_5_getStockWavePriceRatio", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_getOneWaveRatio);
  Py_CLEAR(p->__pyx_v_max_depth);
  Py_CLEAR(p->__pyx_v_stock_code);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)o;
  if (p->__pyx_v_getOneWaveRatio) {
    e = (*v)(p->__pyx_v_getOneWaveRatio, a); if (e) return e;
  }
  if (p->__pyx_v_max_depth) {
    e = (*v)(p->__pyx_v_max_depth, a); if (e) return e;
  }
  if (p->__pyx_v_stock_code) {
    e = (*v)(p->__pyx_v_stock_code, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio *)o;
  tmp = ((PyObject*)p->__pyx_v_getOneWaveRatio);
  p->__pyx_v_getOneWaveRatio = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_max_depth);
  p->__pyx_v_max_depth = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stock_code);
  p->__pyx_v_stock_code = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_6_getSingleStockWavePriceRatio",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_6_getSingleStockWavePriceRatio", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable[8];
static int __pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable[--__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(PyObject *o) {
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable)))) {
    __pyx_freelist_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable[__pyx_freecount_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable++] = ((struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)o;
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *p = (struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable_spec = {
  "tbstock.tradeStrategy.stockStrategy.__pyx_scope_struct_7_getTradeDistributionTable",
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.tradeStrategy.stockStrategy.""__pyx_scope_struct_7_getTradeDistributionTable", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
  static const char* internal_type_names[] = {
    "__pyx_ctuple_Py_ssize_t",
    "__pyx_ctuple_Py_ssize_t_struct",
    "__pyx_ctuple_double",
    "__pyx_ctuple_double_struct",
    "__pyx_ctuple_long",
    "__pyx_ctuple_long__and_Py_ssize_t",
    "__pyx_ctuple_long__and_Py_ssize_t_struct",
    "__pyx_ctuple_long__and_long",
    "__pyx_ctuple_long__and_long__and_long",
    "__pyx_ctuple_long__and_long__and_long_struct",
    "__pyx_ctuple_long__and_long_struct",
    "__pyx_ctuple_long_struct",
    "__pyx_scope_struct_1_selectByMarket",
    "__pyx_scope_struct_2_selectByStockPrice",
    "__pyx_scope_struct_3_getStockProperty_",
    "__pyx_scope_struct_4_stockSingleStockProperty",
    "__pyx_scope_struct_5_getStockWavePriceRatio",
    "__pyx_scope_struct_6_getSingleStockWavePriceRatio",
    "__pyx_scope_struct_7_getTradeDistributionTable",
    "__pyx_scope_struct__selectByMarketCap",
    0
  };
  const char** type_name = internal_type_names;
  while (*type_name) {
    if (__Pyx_StrEq(name, *type_name)) {
      PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
      goto bad;
    }
    type_name++;
  }
  if (0);
  else {
    if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
  }
  return 0;
  bad:
  return -1;
}

static int
__Pyx_import_all_from(PyObject *locals, PyObject *v)
{
    PyObject *all = PyObject_GetAttrString(v, "__all__");
    PyObject *dict, *name, *value;
    int skip_leading_underscores = 0;
    int pos, err;
    if (all == NULL) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            return -1;
        PyErr_Clear();
        dict = PyObject_GetAttrString(v, "__dict__");
        if (dict == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
                return -1;
            PyErr_SetString(PyExc_ImportError,
            "from-import-* object has no __dict__ and no __all__");
            return -1;
        }
#if PY_MAJOR_VERSION < 3
        all = PyObject_CallMethod(dict, (char *)"keys", NULL);
#else
        all = PyMapping_Keys(dict);
#endif
        Py_DECREF(dict);
        if (all == NULL)
            return -1;
        skip_leading_underscores = 1;
    }
    for (pos = 0, err = 0; ; pos++) {
        name = PySequence_GetItem(all, pos);
        if (name == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_IndexError))
                err = -1;
            else
                PyErr_Clear();
            break;
        }
        if (skip_leading_underscores &&
#if PY_MAJOR_VERSION < 3
            likely(PyString_Check(name)) &&
            PyString_AS_STRING(name)[0] == '_')
#else
            likely(PyUnicode_Check(name)) &&
            likely(__Pyx_PyUnicode_GET_LENGTH(name)) &&
            __Pyx_PyUnicode_READ_CHAR(name, 0) == '_')
#endif
        {
            Py_DECREF(name);
            continue;
        }
        value = PyObject_GetAttr(v, name);
        if (value == NULL)
            err = -1;
        else if (PyDict_CheckExact(locals))
            err = PyDict_SetItem(locals, name, value);
        else
            err = PyObject_SetItem(locals, name, value);
        Py_DECREF(name);
        Py_XDECREF(value);
        if (err != 0)
            break;
    }
    Py_DECREF(all);
    return err;
}
static int __pyx_import_star(PyObject* m) {
    int i;
    int ret = -1;
    char* s;
    PyObject *locals = 0;
    PyObject *list = 0;
#if PY_MAJOR_VERSION >= 3
    PyObject *utf8_name = 0;
#endif
    PyObject *name;
    PyObject *item;
    locals = PyDict_New();              if (!locals) goto bad;
    if (__Pyx_import_all_from(locals, m) < 0) goto bad;
    list = PyDict_Items(locals);        if (!list) goto bad;
    for(i=0; i<PyList_GET_SIZE(list); i++) {
        name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
        item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
#if PY_MAJOR_VERSION >= 3
        utf8_name = PyUnicode_AsUTF8String(name);
        if (!utf8_name) goto bad;
        s = PyBytes_AS_STRING(utf8_name);
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
        Py_DECREF(utf8_name); utf8_name = 0;
#else
        s = PyString_AsString(name);
        if (!s) goto bad;
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
#endif
    }
    ret = 0;
bad:
    Py_XDECREF(locals);
    Py_XDECREF(list);
#if PY_MAJOR_VERSION >= 3
    Py_XDECREF(utf8_name);
#endif
    return ret;
}


#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
    {&__pyx_kp_s_00, __pyx_k_00, sizeof(__pyx_k_00), 0, 0, 1, 0},
    {&__pyx_kp_u_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 1, 0, 0},
    {&__pyx_kp_s_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 0, 1, 0},
    {&__pyx_kp_s_0_399003, __pyx_k_0_399003, sizeof(__pyx_k_0_399003), 0, 0, 1, 0},
    {&__pyx_kp_s_0_82_0_83_0_85, __pyx_k_0_82_0_83_0_85, sizeof(__pyx_k_0_82_0_83_0_85), 0, 0, 1, 0},
    {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
    {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
    {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
    {&__pyx_kp_s_14b143, __pyx_k_14b143, sizeof(__pyx_k_14b143), 0, 0, 1, 0},
    {&__pyx_kp_s_1_0, __pyx_k_1_0, sizeof(__pyx_k_1_0), 0, 0, 1, 0},
    {&__pyx_kp_s_1_000003, __pyx_k_1_000003, sizeof(__pyx_k_1_000003), 0, 0, 1, 0},
    {&__pyx_kp_s_1_000012, __pyx_k_1_000012, sizeof(__pyx_k_1_000012), 0, 0, 1, 0},
    {&__pyx_kp_s_1_000013, __pyx_k_1_000013, sizeof(__pyx_k_1_000013), 0, 0, 1, 0},
    {&__pyx_kp_s_1_2, __pyx_k_1_2, sizeof(__pyx_k_1_2), 0, 0, 1, 0},
    {&__pyx_kp_s_1_2_3_4_finished, __pyx_k_1_2_3_4_finished, sizeof(__pyx_k_1_2_3_4_finished), 0, 0, 1, 0},
    {&__pyx_kp_s_1_2_3_4_quarter_finished_4_repo, __pyx_k_1_2_3_4_quarter_finished_4_repo, sizeof(__pyx_k_1_2_3_4_quarter_finished_4_repo), 0, 0, 1, 0},
    {&__pyx_kp_s_1_5, __pyx_k_1_5, sizeof(__pyx_k_1_5), 0, 0, 1, 0},
    {&__pyx_kp_s_1_K_2_3, __pyx_k_1_K_2_3, sizeof(__pyx_k_1_K_2_3), 0, 0, 1, 0},
    {&__pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI, __pyx_k_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI, sizeof(__pyx_k_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI), 0, 0, 1, 0},
    {&__pyx_kp_s_1_finished_2_finished_3_finishe, __pyx_k_1_finished_2_finished_3_finishe, sizeof(__pyx_k_1_finished_2_finished_3_finishe), 0, 0, 1, 0},
    {&__pyx_kp_s_1_x_finished_x_finished_x_finis, __pyx_k_1_x_finished_x_finished_x_finis, sizeof(__pyx_k_1_x_finished_x_finished_x_finis), 0, 0, 1, 0},
    {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
    {&__pyx_kp_s_20240101, __pyx_k_20240101, sizeof(__pyx_k_20240101), 0, 0, 1, 0},
    {&__pyx_kp_s_20240625, __pyx_k_20240625, sizeof(__pyx_k_20240625), 0, 0, 1, 0},
    {&__pyx_kp_s_20240813, __pyx_k_20240813, sizeof(__pyx_k_20240813), 0, 0, 1, 0},
    {&__pyx_kp_s_2f, __pyx_k_2f, sizeof(__pyx_k_2f), 0, 0, 1, 0},
    {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
    {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
    {&__pyx_kp_s_300416, __pyx_k_300416, sizeof(__pyx_k_300416), 0, 0, 1, 0},
    {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
    {&__pyx_kp_s_5_1, __pyx_k_5_1, sizeof(__pyx_k_5_1), 0, 0, 1, 0},
    {&__pyx_kp_s_5_9_85, __pyx_k_5_9_85, sizeof(__pyx_k_5_9_85), 0, 0, 1, 0},
    {&__pyx_n_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 1},
    {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
    {&__pyx_kp_s_601360, __pyx_k_601360, sizeof(__pyx_k_601360), 0, 0, 1, 0},
    {&__pyx_kp_s_60_2, __pyx_k_60_2, sizeof(__pyx_k_60_2), 0, 0, 1, 0},
    {&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
    {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
    {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
    {&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
    {&__pyx_kp_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 0},
    {&__pyx_kp_s_9_85, __pyx_k_9_85, sizeof(__pyx_k_9_85), 0, 0, 1, 0},
    {&__pyx_kp_s_9_85_2, __pyx_k_9_85_2, sizeof(__pyx_k_9_85_2), 0, 0, 1, 0},
    {&__pyx_kp_s_9_85_5, __pyx_k_9_85_5, sizeof(__pyx_k_9_85_5), 0, 0, 1, 0},
    {&__pyx_n_s_ADX, __pyx_k_ADX, sizeof(__pyx_k_ADX), 0, 0, 1, 1},
    {&__pyx_n_s_ADXR, __pyx_k_ADXR, sizeof(__pyx_k_ADXR), 0, 0, 1, 1},
    {&__pyx_kp_s_AI, __pyx_k_AI, sizeof(__pyx_k_AI), 0, 0, 1, 0},
    {&__pyx_kp_s_AR_PL_UKai_CN, __pyx_k_AR_PL_UKai_CN, sizeof(__pyx_k_AR_PL_UKai_CN), 0, 0, 1, 0},
    {&__pyx_n_s_AxisLineOpts, __pyx_k_AxisLineOpts, sizeof(__pyx_k_AxisLineOpts), 0, 0, 1, 1},
    {&__pyx_n_s_AxisOpts, __pyx_k_AxisOpts, sizeof(__pyx_k_AxisOpts), 0, 0, 1, 1},
    {&__pyx_n_s_AxisTickOpts, __pyx_k_AxisTickOpts, sizeof(__pyx_k_AxisTickOpts), 0, 0, 1, 1},
    {&__pyx_n_s_BBANDS, __pyx_k_BBANDS, sizeof(__pyx_k_BBANDS), 0, 0, 1, 1},
    {&__pyx_n_s_BK0815, __pyx_k_BK0815, sizeof(__pyx_k_BK0815), 0, 0, 1, 1},
    {&__pyx_n_s_BK0816, __pyx_k_BK0816, sizeof(__pyx_k_BK0816), 0, 0, 1, 1},
    {&__pyx_n_s_BK0817, __pyx_k_BK0817, sizeof(__pyx_k_BK0817), 0, 0, 1, 1},
    {&__pyx_n_s_BK1050, __pyx_k_BK1050, sizeof(__pyx_k_BK1050), 0, 0, 1, 1},
    {&__pyx_n_s_BK1051, __pyx_k_BK1051, sizeof(__pyx_k_BK1051), 0, 0, 1, 1},
    {&__pyx_n_s_BOLL, __pyx_k_BOLL, sizeof(__pyx_k_BOLL), 0, 0, 1, 1},
    {&__pyx_n_s_Bar, __pyx_k_Bar, sizeof(__pyx_k_Bar), 0, 0, 1, 1},
    {&__pyx_kp_u_Beginning, __pyx_k_Beginning, sizeof(__pyx_k_Beginning), 0, 1, 0, 0},
    {&__pyx_kp_s_Bollinger_Bands, __pyx_k_Bollinger_Bands, sizeof(__pyx_k_Bollinger_Bands), 0, 0, 1, 0},
    {&__pyx_n_s_CDL2CROWS, __pyx_k_CDL2CROWS, sizeof(__pyx_k_CDL2CROWS), 0, 0, 1, 1},
    {&__pyx_n_s_CDL3INSIDE, __pyx_k_CDL3INSIDE, sizeof(__pyx_k_CDL3INSIDE), 0, 0, 1, 1},
    {&__pyx_n_s_CDL3STARSINSOUTH, __pyx_k_CDL3STARSINSOUTH, sizeof(__pyx_k_CDL3STARSINSOUTH), 0, 0, 1, 1},
    {&__pyx_n_s_CDL3WHITESOLDIERS, __pyx_k_CDL3WHITESOLDIERS, sizeof(__pyx_k_CDL3WHITESOLDIERS), 0, 0, 1, 1},
    {&__pyx_n_s_CDLENGULFING, __pyx_k_CDLENGULFING, sizeof(__pyx_k_CDLENGULFING), 0, 0, 1, 1},
    {&__pyx_n_s_CDLHAMMER, __pyx_k_CDLHAMMER, sizeof(__pyx_k_CDLHAMMER), 0, 0, 1, 1},
    {&__pyx_n_s_CDLHARAMI, __pyx_k_CDLHARAMI, sizeof(__pyx_k_CDLHARAMI), 0, 0, 1, 1},
    {&__pyx_n_s_CDLMORNINGSTAR, __pyx_k_CDLMORNINGSTAR, sizeof(__pyx_k_CDLMORNINGSTAR), 0, 0, 1, 1},
    {&__pyx_n_s_CDLPIERCING, __pyx_k_CDLPIERCING, sizeof(__pyx_k_CDLPIERCING), 0, 0, 1, 1},
    {&__pyx_n_s_CDLRISEFALL3METHODS, __pyx_k_CDLRISEFALL3METHODS, sizeof(__pyx_k_CDLRISEFALL3METHODS), 0, 0, 1, 1},
    {&__pyx_n_s_CDLXSIDEGAP3METHODS, __pyx_k_CDLXSIDEGAP3METHODS, sizeof(__pyx_k_CDLXSIDEGAP3METHODS), 0, 0, 1, 1},
    {&__pyx_n_s_CRO, __pyx_k_CRO, sizeof(__pyx_k_CRO), 0, 0, 1, 1},
    {&__pyx_kp_u_Can_t_load, __pyx_k_Can_t_load, sizeof(__pyx_k_Can_t_load), 0, 1, 0, 0},
    {&__pyx_kp_u_Candle_Chart, __pyx_k_Candle_Chart, sizeof(__pyx_k_Candle_Chart), 0, 1, 0, 0},
    {&__pyx_kp_u_Cant_getStockTradeDayInfoFq_for, __pyx_k_Cant_getStockTradeDayInfoFq_for, sizeof(__pyx_k_Cant_getStockTradeDayInfoFq_for), 0, 1, 0, 0},
    {&__pyx_kp_u_Cant_getStockTradeDayInfoFq_for_2, __pyx_k_Cant_getStockTradeDayInfoFq_for_2, sizeof(__pyx_k_Cant_getStockTradeDayInfoFq_for_2), 0, 1, 0, 0},
    {&__pyx_n_s_ColDef, __pyx_k_ColDef, sizeof(__pyx_k_ColDef), 0, 0, 1, 1},
    {&__pyx_n_s_Counter, __pyx_k_Counter, sizeof(__pyx_k_Counter), 0, 0, 1, 1},
    {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
    {&__pyx_n_s_DEA, __pyx_k_DEA, sizeof(__pyx_k_DEA), 0, 0, 1, 1},
    {&__pyx_n_s_DEMA, __pyx_k_DEMA, sizeof(__pyx_k_DEMA), 0, 0, 1, 1},
    {&__pyx_kp_s_DI, __pyx_k_DI, sizeof(__pyx_k_DI), 0, 0, 1, 0},
    {&__pyx_n_s_DIF, __pyx_k_DIF, sizeof(__pyx_k_DIF), 0, 0, 1, 1},
    {&__pyx_kp_s_DI_2, __pyx_k_DI_2, sizeof(__pyx_k_DI_2), 0, 0, 1, 0},
    {&__pyx_n_s_DMI, __pyx_k_DMI, sizeof(__pyx_k_DMI), 0, 0, 1, 1},
    {&__pyx_kp_s_DRG_DIP, __pyx_k_DRG_DIP, sizeof(__pyx_k_DRG_DIP), 0, 0, 1, 0},
    {&__pyx_n_s_DataFrame, __pyx_k_DataFrame, sizeof(__pyx_k_DataFrame), 0, 0, 1, 1},
    {&__pyx_n_s_DataZoomOpts, __pyx_k_DataZoomOpts, sizeof(__pyx_k_DataZoomOpts), 0, 0, 1, 1},
    {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
    {&__pyx_n_s_Dispose, __pyx_k_Dispose, sizeof(__pyx_k_Dispose), 0, 0, 1, 1},
    {&__pyx_n_s_EMA, __pyx_k_EMA, sizeof(__pyx_k_EMA), 0, 0, 1, 1},
    {&__pyx_n_s_Edge, __pyx_k_Edge, sizeof(__pyx_k_Edge), 0, 0, 1, 1},
    {&__pyx_kp_s_Exponential_Moving_Average_EMA_l, __pyx_k_Exponential_Moving_Average_EMA_l, sizeof(__pyx_k_Exponential_Moving_Average_EMA_l), 0, 0, 1, 0},
    {&__pyx_kp_u_Failed_to_getStockTradeDayInfoSq, __pyx_k_Failed_to_getStockTradeDayInfoSq, sizeof(__pyx_k_Failed_to_getStockTradeDayInfoSq), 0, 1, 0, 0},
    {&__pyx_n_s_FirstColumn, __pyx_k_FirstColumn, sizeof(__pyx_k_FirstColumn), 0, 0, 1, 1},
    {&__pyx_n_s_FirstRow, __pyx_k_FirstRow, sizeof(__pyx_k_FirstRow), 0, 0, 1, 1},
    {&__pyx_n_s_Grid, __pyx_k_Grid, sizeof(__pyx_k_Grid), 0, 0, 1, 1},
    {&__pyx_n_s_GridOpts, __pyx_k_GridOpts, sizeof(__pyx_k_GridOpts), 0, 0, 1, 1},
    {&__pyx_n_s_H_line, __pyx_k_H_line, sizeof(__pyx_k_H_line), 0, 0, 1, 1},
    {&__pyx_n_s_InitOpts, __pyx_k_InitOpts, sizeof(__pyx_k_InitOpts), 0, 0, 1, 1},
    {&__pyx_n_s_ItemStyleOpts, __pyx_k_ItemStyleOpts, sizeof(__pyx_k_ItemStyleOpts), 0, 0, 1, 1},
    {&__pyx_n_s_J, __pyx_k_J, sizeof(__pyx_k_J), 0, 0, 1, 1},
    {&__pyx_n_s_JsCode, __pyx_k_JsCode, sizeof(__pyx_k_JsCode), 0, 0, 1, 1},
    {&__pyx_n_s_K, __pyx_k_K, sizeof(__pyx_k_K), 0, 0, 1, 1},
    {&__pyx_n_s_KAMA, __pyx_k_KAMA, sizeof(__pyx_k_KAMA), 0, 0, 1, 1},
    {&__pyx_n_s_KDJ, __pyx_k_KDJ, sizeof(__pyx_k_KDJ), 0, 0, 1, 1},
    {&__pyx_n_s_Kline, __pyx_k_Kline, sizeof(__pyx_k_Kline), 0, 0, 1, 1},
    {&__pyx_n_u_Kline_2, __pyx_k_Kline_2, sizeof(__pyx_k_Kline_2), 0, 1, 0, 1},
    {&__pyx_kp_u_Kline_png, __pyx_k_Kline_png, sizeof(__pyx_k_Kline_png), 0, 1, 0, 0},
    {&__pyx_n_s_LIGHT, __pyx_k_LIGHT, sizeof(__pyx_k_LIGHT), 0, 0, 1, 1},
    {&__pyx_n_s_L_line, __pyx_k_L_line, sizeof(__pyx_k_L_line), 0, 0, 1, 1},
    {&__pyx_n_s_LabelOpts, __pyx_k_LabelOpts, sizeof(__pyx_k_LabelOpts), 0, 0, 1, 1},
    {&__pyx_n_s_LastColumn, __pyx_k_LastColumn, sizeof(__pyx_k_LastColumn), 0, 0, 1, 1},
    {&__pyx_n_s_LastRow, __pyx_k_LastRow, sizeof(__pyx_k_LastRow), 0, 0, 1, 1},
    {&__pyx_n_s_LegendOpts, __pyx_k_LegendOpts, sizeof(__pyx_k_LegendOpts), 0, 0, 1, 1},
    {&__pyx_n_s_Line, __pyx_k_Line, sizeof(__pyx_k_Line), 0, 0, 1, 1},
    {&__pyx_n_s_LineStyleOpts, __pyx_k_LineStyleOpts, sizeof(__pyx_k_LineStyleOpts), 0, 0, 1, 1},
    {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
    {&__pyx_n_s_LoadFromFile, __pyx_k_LoadFromFile, sizeof(__pyx_k_LoadFromFile), 0, 0, 1, 1},
    {&__pyx_n_s_MA, __pyx_k_MA, sizeof(__pyx_k_MA), 0, 0, 1, 1},
    {&__pyx_n_s_MA10, __pyx_k_MA10, sizeof(__pyx_k_MA10), 0, 0, 1, 1},
    {&__pyx_n_s_MA20, __pyx_k_MA20, sizeof(__pyx_k_MA20), 0, 0, 1, 1},
    {&__pyx_n_s_MA30, __pyx_k_MA30, sizeof(__pyx_k_MA30), 0, 0, 1, 1},
    {&__pyx_n_s_MA5, __pyx_k_MA5, sizeof(__pyx_k_MA5), 0, 0, 1, 1},
    {&__pyx_n_s_MA60, __pyx_k_MA60, sizeof(__pyx_k_MA60), 0, 0, 1, 1},
    {&__pyx_n_s_MACD, __pyx_k_MACD, sizeof(__pyx_k_MACD), 0, 0, 1, 1},
    {&__pyx_n_s_MAMA, __pyx_k_MAMA, sizeof(__pyx_k_MAMA), 0, 0, 1, 1},
    {&__pyx_n_s_MINUS_DI, __pyx_k_MINUS_DI, sizeof(__pyx_k_MINUS_DI), 0, 0, 1, 1},
    {&__pyx_n_s_M_line, __pyx_k_M_line, sizeof(__pyx_k_M_line), 0, 0, 1, 1},
    {&__pyx_n_s_MaAll, __pyx_k_MaAll, sizeof(__pyx_k_MaAll), 0, 0, 1, 1},
    {&__pyx_n_s_MarkPointItem, __pyx_k_MarkPointItem, sizeof(__pyx_k_MarkPointItem), 0, 0, 1, 1},
    {&__pyx_n_s_MarkPointOpts, __pyx_k_MarkPointOpts, sizeof(__pyx_k_MarkPointOpts), 0, 0, 1, 1},
    {&__pyx_kp_s_Moving_average_MA_lines, __pyx_k_Moving_average_MA_lines, sizeof(__pyx_k_Moving_average_MA_lines), 0, 0, 1, 0},
    {&__pyx_kp_u_Mysql, __pyx_k_Mysql, sizeof(__pyx_k_Mysql), 0, 1, 0, 0},
    {&__pyx_n_s_NA, __pyx_k_NA, sizeof(__pyx_k_NA), 0, 0, 1, 1},
    {&__pyx_kp_u_Need_to_update_database_table, __pyx_k_Need_to_update_database_table, sizeof(__pyx_k_Need_to_update_database_table), 0, 1, 0, 0},
    {&__pyx_kp_u_Need_to_update_strategy, __pyx_k_Need_to_update_strategy, sizeof(__pyx_k_Need_to_update_strategy), 0, 1, 0, 0},
    {&__pyx_n_s_OBV, __pyx_k_OBV, sizeof(__pyx_k_OBV), 0, 0, 1, 1},
    {&__pyx_n_s_Options, __pyx_k_Options, sizeof(__pyx_k_Options), 0, 0, 1, 1},
    {&__pyx_n_s_PLUS_DI, __pyx_k_PLUS_DI, sizeof(__pyx_k_PLUS_DI), 0, 0, 1, 1},
    {&__pyx_n_s_ProcessPoolExecutor, __pyx_k_ProcessPoolExecutor, sizeof(__pyx_k_ProcessPoolExecutor), 0, 0, 1, 1},
    {&__pyx_n_s_RSI, __pyx_k_RSI, sizeof(__pyx_k_RSI), 0, 0, 1, 1},
    {&__pyx_n_s_Reds, __pyx_k_Reds, sizeof(__pyx_k_Reds), 0, 0, 1, 1},
    {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
    {&__pyx_n_s_SMA, __pyx_k_SMA, sizeof(__pyx_k_SMA), 0, 0, 1, 1},
    {&__pyx_n_s_ST, __pyx_k_ST, sizeof(__pyx_k_ST), 0, 0, 1, 1},
    {&__pyx_n_s_STOCH, __pyx_k_STOCH, sizeof(__pyx_k_STOCH), 0, 0, 1, 1},
    {&__pyx_n_s_Save, __pyx_k_Save, sizeof(__pyx_k_Save), 0, 0, 1, 1},
    {&__pyx_n_s_Service, __pyx_k_Service, sizeof(__pyx_k_Service), 0, 0, 1, 1},
    {&__pyx_n_s_SplitLineOpts, __pyx_k_SplitLineOpts, sizeof(__pyx_k_SplitLineOpts), 0, 0, 1, 1},
    {&__pyx_kp_s_Strategy_figure_has_generated, __pyx_k_Strategy_figure_has_generated, sizeof(__pyx_k_Strategy_figure_has_generated), 0, 0, 1, 0},
    {&__pyx_n_s_T3, __pyx_k_T3, sizeof(__pyx_k_T3), 0, 0, 1, 1},
    {&__pyx_n_s_TEMA, __pyx_k_TEMA, sizeof(__pyx_k_TEMA), 0, 0, 1, 1},
    {&__pyx_n_s_TIMI_COUNT, __pyx_k_TIMI_COUNT, sizeof(__pyx_k_TIMI_COUNT), 0, 0, 1, 1},
    {&__pyx_n_s_TRIMA, __pyx_k_TRIMA, sizeof(__pyx_k_TRIMA), 0, 0, 1, 1},
    {&__pyx_n_s_Table, __pyx_k_Table, sizeof(__pyx_k_Table), 0, 0, 1, 1},
    {&__pyx_kp_u_The, __pyx_k_The, sizeof(__pyx_k_The), 0, 1, 0, 0},
    {&__pyx_n_s_ThemeType, __pyx_k_ThemeType, sizeof(__pyx_k_ThemeType), 0, 0, 1, 1},
    {&__pyx_n_s_ThreadPoolExecutor, __pyx_k_ThreadPoolExecutor, sizeof(__pyx_k_ThreadPoolExecutor), 0, 0, 1, 1},
    {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1},
    {&__pyx_n_s_TitleOpts, __pyx_k_TitleOpts, sizeof(__pyx_k_TitleOpts), 0, 0, 1, 1},
    {&__pyx_n_s_ToImage, __pyx_k_ToImage, sizeof(__pyx_k_ToImage), 0, 0, 1, 1},
    {&__pyx_n_s_TooltipOpts, __pyx_k_TooltipOpts, sizeof(__pyx_k_TooltipOpts), 0, 0, 1, 1},
    {&__pyx_n_s_Union, __pyx_k_Union, sizeof(__pyx_k_Union), 0, 0, 1, 1},
    {&__pyx_kp_s_Union_Dict_None, __pyx_k_Union_Dict_None, sizeof(__pyx_k_Union_Dict_None), 0, 0, 1, 0},
    {&__pyx_kp_s_Union_List_None, __pyx_k_Union_List_None, sizeof(__pyx_k_Union_List_None), 0, 0, 1, 0},
    {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
    {&__pyx_n_s_Volumn, __pyx_k_Volumn, sizeof(__pyx_k_Volumn), 0, 0, 1, 1},
    {&__pyx_n_s_WILLR, __pyx_k_WILLR, sizeof(__pyx_k_WILLR), 0, 0, 1, 1},
    {&__pyx_n_s_WMA, __pyx_k_WMA, sizeof(__pyx_k_WMA), 0, 0, 1, 1},
    {&__pyx_n_s_WR, __pyx_k_WR, sizeof(__pyx_k_WR), 0, 0, 1, 1},
    {&__pyx_n_s_Workbook, __pyx_k_Workbook, sizeof(__pyx_k_Workbook), 0, 0, 1, 1},
    {&__pyx_n_s_Worksheets, __pyx_k_Worksheets, sizeof(__pyx_k_Worksheets), 0, 0, 1, 1},
    {&__pyx_kp_s_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 0, 1, 0},
    {&__pyx_n_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 1},
    {&__pyx_kp_s__102, __pyx_k__102, sizeof(__pyx_k__102), 0, 0, 1, 0},
    {&__pyx_kp_s__103, __pyx_k__103, sizeof(__pyx_k__103), 0, 0, 1, 0},
    {&__pyx_kp_s__104, __pyx_k__104, sizeof(__pyx_k__104), 0, 0, 1, 0},
    {&__pyx_kp_s__105, __pyx_k__105, sizeof(__pyx_k__105), 0, 0, 1, 0},
    {&__pyx_kp_s__108, __pyx_k__108, sizeof(__pyx_k__108), 0, 0, 1, 0},
    {&__pyx_kp_u__108, __pyx_k__108, sizeof(__pyx_k__108), 0, 1, 0, 0},
    {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0},
    {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
    {&__pyx_n_s__117, __pyx_k__117, sizeof(__pyx_k__117), 0, 0, 1, 1},
    {&__pyx_n_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 1},
    {&__pyx_kp_s__128, __pyx_k__128, sizeof(__pyx_k__128), 0, 0, 1, 0},
    {&__pyx_kp_s__129, __pyx_k__129, sizeof(__pyx_k__129), 0, 0, 1, 0},
    {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
    {&__pyx_kp_s__139, __pyx_k__139, sizeof(__pyx_k__139), 0, 0, 1, 0},
    {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
    {&__pyx_kp_s__140, __pyx_k__140, sizeof(__pyx_k__140), 0, 0, 1, 0},
    {&__pyx_kp_s__141, __pyx_k__141, sizeof(__pyx_k__141), 0, 0, 1, 0},
    {&__pyx_kp_s__142, __pyx_k__142, sizeof(__pyx_k__142), 0, 0, 1, 0},
    {&__pyx_kp_s__143, __pyx_k__143, sizeof(__pyx_k__143), 0, 0, 1, 0},
    {&__pyx_kp_s__144, __pyx_k__144, sizeof(__pyx_k__144), 0, 0, 1, 0},
    {&__pyx_kp_s__147, __pyx_k__147, sizeof(__pyx_k__147), 0, 0, 1, 0},
    {&__pyx_kp_s__148, __pyx_k__148, sizeof(__pyx_k__148), 0, 0, 1, 0},
    {&__pyx_kp_s__149, __pyx_k__149, sizeof(__pyx_k__149), 0, 0, 1, 0},
    {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0},
    {&__pyx_n_u__150, __pyx_k__150, sizeof(__pyx_k__150), 0, 1, 0, 1},
    {&__pyx_kp_u__151, __pyx_k__151, sizeof(__pyx_k__151), 0, 1, 0, 0},
    {&__pyx_kp_s__152, __pyx_k__152, sizeof(__pyx_k__152), 0, 0, 1, 0},
    {&__pyx_n_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 1},
    {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
    {&__pyx_n_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 1},
    {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
    {&__pyx_n_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 1},
    {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
    {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
    {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0},
    {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
    {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0},
    {&__pyx_kp_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 0},
    {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0},
    {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
    {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
    {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
    {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
    {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
    {&__pyx_kp_s__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 1, 0},
    {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0},
    {&__pyx_n_u__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 1, 0, 1},
    {&__pyx_n_u__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 1, 0, 1},
    {&__pyx_kp_u__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 1, 0, 0},
    {&__pyx_n_s__395, __pyx_k__395, sizeof(__pyx_k__395), 0, 0, 1, 1},
    {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
    {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
    {&__pyx_kp_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 0},
    {&__pyx_n_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 1},
    {&__pyx_n_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 1},
    {&__pyx_kp_s__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 0, 1, 0},
    {&__pyx_n_s__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 0, 1, 1},
    {&__pyx_n_u__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 1, 0, 1},
    {&__pyx_n_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 1},
    {&__pyx_n_u__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 1, 0, 1},
    {&__pyx_kp_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 0},
    {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0},
    {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
    {&__pyx_kp_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 0},
    {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
    {&__pyx_kp_s__52, __pyx_k__52, sizeof(__pyx_k__52), 0, 0, 1, 0},
    {&__pyx_kp_s__53, __pyx_k__53, sizeof(__pyx_k__53), 0, 0, 1, 0},
    {&__pyx_kp_s__54, __pyx_k__54, sizeof(__pyx_k__54), 0, 0, 1, 0},
    {&__pyx_kp_s__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 0, 1, 0},
    {&__pyx_n_s__58, __pyx_k__58, sizeof(__pyx_k__58), 0, 0, 1, 1},
    {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
    {&__pyx_kp_s__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 0, 1, 0},
    {&__pyx_kp_s__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 0, 1, 0},
    {&__pyx_kp_s__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 0, 1, 0},
    {&__pyx_kp_s__63, __pyx_k__63, sizeof(__pyx_k__63), 0, 0, 1, 0},
    {&__pyx_kp_u__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 1, 0, 0},
    {&__pyx_n_u__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 1, 0, 1},
    {&__pyx_kp_u__66, __pyx_k__66, sizeof(__pyx_k__66), 0, 1, 0, 0},
    {&__pyx_kp_s__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 0, 1, 0},
    {&__pyx_kp_s__68, __pyx_k__68, sizeof(__pyx_k__68), 0, 0, 1, 0},
    {&__pyx_kp_s__69, __pyx_k__69, sizeof(__pyx_k__69), 0, 0, 1, 0},
    {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
    {&__pyx_kp_s__70, __pyx_k__70, sizeof(__pyx_k__70), 0, 0, 1, 0},
    {&__pyx_kp_s__71, __pyx_k__71, sizeof(__pyx_k__71), 0, 0, 1, 0},
    {&__pyx_kp_s__72, __pyx_k__72, sizeof(__pyx_k__72), 0, 0, 1, 0},
    {&__pyx_kp_s__74, __pyx_k__74, sizeof(__pyx_k__74), 0, 0, 1, 0},
    {&__pyx_kp_s__75, __pyx_k__75, sizeof(__pyx_k__75), 0, 0, 1, 0},
    {&__pyx_kp_s__80, __pyx_k__80, sizeof(__pyx_k__80), 0, 0, 1, 0},
    {&__pyx_kp_s__81, __pyx_k__81, sizeof(__pyx_k__81), 0, 0, 1, 0},
    {&__pyx_kp_s__82, __pyx_k__82, sizeof(__pyx_k__82), 0, 0, 1, 0},
    {&__pyx_kp_s__83, __pyx_k__83, sizeof(__pyx_k__83), 0, 0, 1, 0},
    {&__pyx_kp_s__84, __pyx_k__84, sizeof(__pyx_k__84), 0, 0, 1, 0},
    {&__pyx_kp_s__85, __pyx_k__85, sizeof(__pyx_k__85), 0, 0, 1, 0},
    {&__pyx_kp_s__86, __pyx_k__86, sizeof(__pyx_k__86), 0, 0, 1, 0},
    {&__pyx_kp_s__87, __pyx_k__87, sizeof(__pyx_k__87), 0, 0, 1, 0},
    {&__pyx_kp_s__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 0, 1, 0},
    {&__pyx_kp_s__89, __pyx_k__89, sizeof(__pyx_k__89), 0, 0, 1, 0},
    {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
    {&__pyx_n_u__91, __pyx_k__91, sizeof(__pyx_k__91), 0, 1, 0, 1},
    {&__pyx_kp_u__92, __pyx_k__92, sizeof(__pyx_k__92), 0, 1, 0, 0},
    {&__pyx_kp_s__95, __pyx_k__95, sizeof(__pyx_k__95), 0, 0, 1, 0},
    {&__pyx_kp_s__96, __pyx_k__96, sizeof(__pyx_k__96), 0, 0, 1, 0},
    {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
    {&__pyx_n_s_add_js_funcs, __pyx_k_add_js_funcs, sizeof(__pyx_k_add_js_funcs), 0, 0, 1, 1},
    {&__pyx_n_s_add_xaxis, __pyx_k_add_xaxis, sizeof(__pyx_k_add_xaxis), 0, 0, 1, 1},
    {&__pyx_n_s_add_yaxis, __pyx_k_add_yaxis, sizeof(__pyx_k_add_yaxis), 0, 0, 1, 1},
    {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
    {&__pyx_n_s_all_data, __pyx_k_all_data, sizeof(__pyx_k_all_data), 0, 0, 1, 1},
    {&__pyx_n_s_all_list, __pyx_k_all_list, sizeof(__pyx_k_all_list), 0, 0, 1, 1},
    {&__pyx_n_s_all_near_df, __pyx_k_all_near_df, sizeof(__pyx_k_all_near_df), 0, 0, 1, 1},
    {&__pyx_n_s_all_stock_simple_info, __pyx_k_all_stock_simple_info, sizeof(__pyx_k_all_stock_simple_info), 0, 0, 1, 1},
    {&__pyx_n_s_all_time_day_df, __pyx_k_all_time_day_df, sizeof(__pyx_k_all_time_day_df), 0, 0, 1, 1},
    {&__pyx_n_s_all_time_month_df, __pyx_k_all_time_month_df, sizeof(__pyx_k_all_time_month_df), 0, 0, 1, 1},
    {&__pyx_n_s_all_time_week_df, __pyx_k_all_time_week_df, sizeof(__pyx_k_all_time_week_df), 0, 0, 1, 1},
    {&__pyx_n_s_amount, __pyx_k_amount, sizeof(__pyx_k_amount), 0, 0, 1, 1},
    {&__pyx_n_s_amount_ma, __pyx_k_amount_ma, sizeof(__pyx_k_amount_ma), 0, 0, 1, 1},
    {&__pyx_n_s_amount_th, __pyx_k_amount_th, sizeof(__pyx_k_amount_th), 0, 0, 1, 1},
    {&__pyx_n_s_amplitude, __pyx_k_amplitude, sizeof(__pyx_k_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_amplitude_tr_max, __pyx_k_amplitude_tr_max, sizeof(__pyx_k_amplitude_tr_max), 0, 0, 1, 1},
    {&__pyx_n_s_amplitude_tr_min, __pyx_k_amplitude_tr_min, sizeof(__pyx_k_amplitude_tr_min), 0, 0, 1, 1},
    {&__pyx_n_s_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 0, 1, 1},
    {&__pyx_kp_u_and_2, __pyx_k_and_2, sizeof(__pyx_k_and_2), 0, 1, 0, 0},
    {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
    {&__pyx_n_s_apply, __pyx_k_apply, sizeof(__pyx_k_apply), 0, 0, 1, 1},
    {&__pyx_n_s_area_list, __pyx_k_area_list, sizeof(__pyx_k_area_list), 0, 0, 1, 1},
    {&__pyx_n_s_area_stock_list, __pyx_k_area_stock_list, sizeof(__pyx_k_area_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
    {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
    {&__pyx_n_s_as_completed, __pyx_k_as_completed, sizeof(__pyx_k_as_completed), 0, 0, 1, 1},
    {&__pyx_n_s_ascending, __pyx_k_ascending, sizeof(__pyx_k_ascending), 0, 0, 1, 1},
    {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_n_s_autumn_r, __pyx_k_autumn_r, sizeof(__pyx_k_autumn_r), 0, 0, 1, 1},
    {&__pyx_n_s_average_amplitude, __pyx_k_average_amplitude, sizeof(__pyx_k_average_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_avg_amount_pa, __pyx_k_avg_amount_pa, sizeof(__pyx_k_avg_amount_pa), 0, 0, 1, 1},
    {&__pyx_n_s_ax, __pyx_k_ax, sizeof(__pyx_k_ax), 0, 0, 1, 1},
    {&__pyx_n_s_axes, __pyx_k_axes, sizeof(__pyx_k_axes), 0, 0, 1, 1},
    {&__pyx_kp_s_axes_unicode_minus, __pyx_k_axes_unicode_minus, sizeof(__pyx_k_axes_unicode_minus), 0, 0, 1, 0},
    {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
    {&__pyx_n_s_axis_pointer_type, __pyx_k_axis_pointer_type, sizeof(__pyx_k_axis_pointer_type), 0, 0, 1, 1},
    {&__pyx_n_s_axislabel_opts, __pyx_k_axislabel_opts, sizeof(__pyx_k_axislabel_opts), 0, 0, 1, 1},
    {&__pyx_n_s_axisline_opts, __pyx_k_axisline_opts, sizeof(__pyx_k_axisline_opts), 0, 0, 1, 1},
    {&__pyx_n_s_axistick_opts, __pyx_k_axistick_opts, sizeof(__pyx_k_axistick_opts), 0, 0, 1, 1},
    {&__pyx_n_s_bar_1, __pyx_k_bar_1, sizeof(__pyx_k_bar_1), 0, 0, 1, 1},
    {&__pyx_n_s_bar_2, __pyx_k_bar_2, sizeof(__pyx_k_bar_2), 0, 0, 1, 1},
    {&__pyx_kp_s_baseStrategy, __pyx_k_baseStrategy, sizeof(__pyx_k_baseStrategy), 0, 0, 1, 0},
    {&__pyx_n_s_baseStrategy_2, __pyx_k_baseStrategy_2, sizeof(__pyx_k_baseStrategy_2), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy___getstate, __pyx_k_baseStrategy___getstate, sizeof(__pyx_k_baseStrategy___getstate), 0, 0, 1, 1},
    {&__pyx_kp_s_baseStrategy___init, __pyx_k_baseStrategy___init, sizeof(__pyx_k_baseStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_baseStrategy___setstate, __pyx_k_baseStrategy___setstate, sizeof(__pyx_k_baseStrategy___setstate), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_checkDatabaseTableU, __pyx_k_baseStrategy_checkDatabaseTableU, sizeof(__pyx_k_baseStrategy_checkDatabaseTableU), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_dumpJsonToFile, __pyx_k_baseStrategy_dumpJsonToFile, sizeof(__pyx_k_baseStrategy_dumpJsonToFile), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_getAllDelistStock, __pyx_k_baseStrategy_getAllDelistStock, sizeof(__pyx_k_baseStrategy_getAllDelistStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_getAllNewStock, __pyx_k_baseStrategy_getAllNewStock, sizeof(__pyx_k_baseStrategy_getAllNewStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_getAllStStock, __pyx_k_baseStrategy_getAllStStock, sizeof(__pyx_k_baseStrategy_getAllStStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_getStockNameByCode, __pyx_k_baseStrategy_getStockNameByCode, sizeof(__pyx_k_baseStrategy_getStockNameByCode), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_isDelistStock, __pyx_k_baseStrategy_isDelistStock, sizeof(__pyx_k_baseStrategy_isDelistStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_isDownLimit, __pyx_k_baseStrategy_isDownLimit, sizeof(__pyx_k_baseStrategy_isDownLimit), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_isNewStock, __pyx_k_baseStrategy_isNewStock, sizeof(__pyx_k_baseStrategy_isNewStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_isStStock, __pyx_k_baseStrategy_isStStock, sizeof(__pyx_k_baseStrategy_isStStock), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_isUpLimit, __pyx_k_baseStrategy_isUpLimit, sizeof(__pyx_k_baseStrategy_isUpLimit), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_listIntersection, __pyx_k_baseStrategy_listIntersection, sizeof(__pyx_k_baseStrategy_listIntersection), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_listUnion, __pyx_k_baseStrategy_listUnion, sizeof(__pyx_k_baseStrategy_listUnion), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_reset, __pyx_k_baseStrategy_reset, sizeof(__pyx_k_baseStrategy_reset), 0, 0, 1, 1},
    {&__pyx_n_s_baseStrategy_strategyCount, __pyx_k_baseStrategy_strategyCount, sizeof(__pyx_k_baseStrategy_strategyCount), 0, 0, 1, 1},
    {&__pyx_n_s_base_filename, __pyx_k_base_filename, sizeof(__pyx_k_base_filename), 0, 0, 1, 1},
    {&__pyx_n_s_base_list, __pyx_k_base_list, sizeof(__pyx_k_base_list), 0, 0, 1, 1},
    {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
    {&__pyx_n_s_bbox_inches, __pyx_k_bbox_inches, sizeof(__pyx_k_bbox_inches), 0, 0, 1, 1},
    {&__pyx_kp_u_begin_to_create, __pyx_k_begin_to_create, sizeof(__pyx_k_begin_to_create), 0, 1, 0, 0},
    {&__pyx_kp_u_between, __pyx_k_between, sizeof(__pyx_k_between), 0, 1, 0, 0},
    {&__pyx_n_s_bg_color, __pyx_k_bg_color, sizeof(__pyx_k_bg_color), 0, 0, 1, 1},
    {&__pyx_n_s_bind, __pyx_k_bind, sizeof(__pyx_k_bind), 0, 0, 1, 1},
    {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
    {&__pyx_n_s_border_color, __pyx_k_border_color, sizeof(__pyx_k_border_color), 0, 0, 1, 1},
    {&__pyx_n_s_border_color0, __pyx_k_border_color0, sizeof(__pyx_k_border_color0), 0, 0, 1, 1},
    {&__pyx_n_s_boundary_gap, __pyx_k_boundary_gap, sizeof(__pyx_k_boundary_gap), 0, 0, 1, 1},
    {&__pyx_n_s_bwr_r, __pyx_k_bwr_r, sizeof(__pyx_k_bwr_r), 0, 0, 1, 1},
    {&__pyx_n_s_by, __pyx_k_by, sizeof(__pyx_k_by), 0, 0, 1, 1},
    {&__pyx_n_s_cal_max_th, __pyx_k_cal_max_th, sizeof(__pyx_k_cal_max_th), 0, 0, 1, 1},
    {&__pyx_n_s_cal_min_th, __pyx_k_cal_min_th, sizeof(__pyx_k_cal_min_th), 0, 0, 1, 1},
    {&__pyx_n_s_candle, __pyx_k_candle, sizeof(__pyx_k_candle), 0, 0, 1, 1},
    {&__pyx_kp_u_cant_get_stock_name_for, __pyx_k_cant_get_stock_name_for, sizeof(__pyx_k_cant_get_stock_name_for), 0, 1, 0, 0},
    {&__pyx_n_s_capitalStockStrategy, __pyx_k_capitalStockStrategy, sizeof(__pyx_k_capitalStockStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_capitalStockStrategy___init, __pyx_k_capitalStockStrategy___init, sizeof(__pyx_k_capitalStockStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_capitalStockStrategy_getAllHighA, __pyx_k_capitalStockStrategy_getAllHighA, sizeof(__pyx_k_capitalStockStrategy_getAllHighA), 0, 0, 1, 1},
    {&__pyx_n_s_capitalStockStrategy_isLowAmount, __pyx_k_capitalStockStrategy_isLowAmount, sizeof(__pyx_k_capitalStockStrategy_isLowAmount), 0, 0, 1, 1},
    {&__pyx_n_s_category, __pyx_k_category, sizeof(__pyx_k_category), 0, 0, 1, 1},
    {&__pyx_n_s_ceil, __pyx_k_ceil, sizeof(__pyx_k_ceil), 0, 0, 1, 1},
    {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
    {&__pyx_n_s_change_ratio, __pyx_k_change_ratio, sizeof(__pyx_k_change_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_checkDatabaseTableUpdate, __pyx_k_checkDatabaseTableUpdate, sizeof(__pyx_k_checkDatabaseTableUpdate), 0, 0, 1, 1},
    {&__pyx_n_s_check_serializability, __pyx_k_check_serializability, sizeof(__pyx_k_check_serializability), 0, 0, 1, 1},
    {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
    {&__pyx_n_s_closeDriver, __pyx_k_closeDriver, sizeof(__pyx_k_closeDriver), 0, 0, 1, 1},
    {&__pyx_n_s_cm, __pyx_k_cm, sizeof(__pyx_k_cm), 0, 0, 1, 1},
    {&__pyx_n_s_cmap, __pyx_k_cmap, sizeof(__pyx_k_cmap), 0, 0, 1, 1},
    {&__pyx_n_s_co_name, __pyx_k_co_name, sizeof(__pyx_k_co_name), 0, 0, 1, 1},
    {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
    {&__pyx_n_s_code_name_table, __pyx_k_code_name_table, sizeof(__pyx_k_code_name_table), 0, 0, 1, 1},
    {&__pyx_n_s_codes_list, __pyx_k_codes_list, sizeof(__pyx_k_codes_list), 0, 0, 1, 1},
    {&__pyx_n_s_codes_str, __pyx_k_codes_str, sizeof(__pyx_k_codes_str), 0, 0, 1, 1},
    {&__pyx_kp_u_col_inch, __pyx_k_col_inch, sizeof(__pyx_k_col_inch), 0, 1, 0, 0},
    {&__pyx_n_s_col_inch_2, __pyx_k_col_inch_2, sizeof(__pyx_k_col_inch_2), 0, 0, 1, 1},
    {&__pyx_n_s_col_list, __pyx_k_col_list, sizeof(__pyx_k_col_list), 0, 0, 1, 1},
    {&__pyx_n_s_col_name, __pyx_k_col_name, sizeof(__pyx_k_col_name), 0, 0, 1, 1},
    {&__pyx_n_s_col_title, __pyx_k_col_title, sizeof(__pyx_k_col_title), 0, 0, 1, 1},
    {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
    {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
    {&__pyx_n_s_color0, __pyx_k_color0, sizeof(__pyx_k_color0), 0, 0, 1, 1},
    {&__pyx_n_s_color_function, __pyx_k_color_function, sizeof(__pyx_k_color_function), 0, 0, 1, 1},
    {&__pyx_n_s_color_list, __pyx_k_color_list, sizeof(__pyx_k_color_list), 0, 0, 1, 1},
    {&__pyx_n_s_column_definitions, __pyx_k_column_definitions, sizeof(__pyx_k_column_definitions), 0, 0, 1, 1},
    {&__pyx_n_s_column_name_list, __pyx_k_column_name_list, sizeof(__pyx_k_column_name_list), 0, 0, 1, 1},
    {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1},
    {&__pyx_n_s_common, __pyx_k_common, sizeof(__pyx_k_common), 0, 0, 1, 1},
    {&__pyx_kp_u_compute_date, __pyx_k_compute_date, sizeof(__pyx_k_compute_date), 0, 1, 0, 0},
    {&__pyx_n_s_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 0, 1, 1},
    {&__pyx_n_s_concept, __pyx_k_concept, sizeof(__pyx_k_concept), 0, 0, 1, 1},
    {&__pyx_n_s_concept_list, __pyx_k_concept_list, sizeof(__pyx_k_concept_list), 0, 0, 1, 1},
    {&__pyx_n_s_concept_stock_list, __pyx_k_concept_stock_list, sizeof(__pyx_k_concept_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_concurrent_futures, __pyx_k_concurrent_futures, sizeof(__pyx_k_concurrent_futures), 0, 0, 1, 1},
    {&__pyx_n_s_convertDictToPandas, __pyx_k_convertDictToPandas, sizeof(__pyx_k_convertDictToPandas), 0, 0, 1, 1},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
    {&__pyx_n_s_create_engine_session, __pyx_k_create_engine_session, sizeof(__pyx_k_create_engine_session), 0, 0, 1, 1},
    {&__pyx_n_s_cumprod, __pyx_k_cumprod, sizeof(__pyx_k_cumprod), 0, 0, 1, 1},
    {&__pyx_n_s_cumprod_change_ratio, __pyx_k_cumprod_change_ratio, sizeof(__pyx_k_cumprod_change_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_cumulative_product, __pyx_k_cumulative_product, sizeof(__pyx_k_cumulative_product), 0, 0, 1, 1},
    {&__pyx_n_s_current_date, __pyx_k_current_date, sizeof(__pyx_k_current_date), 0, 0, 1, 1},
    {&__pyx_n_s_current_price, __pyx_k_current_price, sizeof(__pyx_k_current_price), 0, 0, 1, 1},
    {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
    {&__pyx_n_s_dataManagement, __pyx_k_dataManagement, sizeof(__pyx_k_dataManagement), 0, 0, 1, 1},
    {&__pyx_n_s_dataMax, __pyx_k_dataMax, sizeof(__pyx_k_dataMax), 0, 0, 1, 1},
    {&__pyx_n_s_dataMin, __pyx_k_dataMin, sizeof(__pyx_k_dataMin), 0, 0, 1, 1},
    {&__pyx_n_s_dataPreprocess, __pyx_k_dataPreprocess, sizeof(__pyx_k_dataPreprocess), 0, 0, 1, 1},
    {&__pyx_n_s_data_list, __pyx_k_data_list, sizeof(__pyx_k_data_list), 0, 0, 1, 1},
    {&__pyx_kp_s_data_must_be_a_dictionary, __pyx_k_data_must_be_a_dictionary, sizeof(__pyx_k_data_must_be_a_dictionary), 0, 0, 1, 0},
    {&__pyx_n_s_data_simple_info_df, __pyx_k_data_simple_info_df, sizeof(__pyx_k_data_simple_info_df), 0, 0, 1, 1},
    {&__pyx_n_s_data_table, __pyx_k_data_table, sizeof(__pyx_k_data_table), 0, 0, 1, 1},
    {&__pyx_n_s_dataproc, __pyx_k_dataproc, sizeof(__pyx_k_dataproc), 0, 0, 1, 1},
    {&__pyx_n_s_datas, __pyx_k_datas, sizeof(__pyx_k_datas), 0, 0, 1, 1},
    {&__pyx_n_s_datazoom_opts, __pyx_k_datazoom_opts, sizeof(__pyx_k_datazoom_opts), 0, 0, 1, 1},
    {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
    {&__pyx_n_s_date_end, __pyx_k_date_end, sizeof(__pyx_k_date_end), 0, 0, 1, 1},
    {&__pyx_n_s_date_list, __pyx_k_date_list, sizeof(__pyx_k_date_list), 0, 0, 1, 1},
    {&__pyx_n_s_date_start, __pyx_k_date_start, sizeof(__pyx_k_date_start), 0, 0, 1, 1},
    {&__pyx_n_s_date_str, __pyx_k_date_str, sizeof(__pyx_k_date_str), 0, 0, 1, 1},
    {&__pyx_n_s_date_to_session, __pyx_k_date_to_session, sizeof(__pyx_k_date_to_session), 0, 0, 1, 1},
    {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
    {&__pyx_kp_s_datetime64_ns, __pyx_k_datetime64_ns, sizeof(__pyx_k_datetime64_ns), 0, 0, 1, 0},
    {&__pyx_n_s_datetime_str, __pyx_k_datetime_str, sizeof(__pyx_k_datetime_str), 0, 0, 1, 1},
    {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1},
    {&__pyx_n_s_day_2, __pyx_k_day_2, sizeof(__pyx_k_day_2), 0, 0, 1, 1},
    {&__pyx_n_s_day_cold_dict, __pyx_k_day_cold_dict, sizeof(__pyx_k_day_cold_dict), 0, 0, 1, 1},
    {&__pyx_n_s_day_cold_frequency_df, __pyx_k_day_cold_frequency_df, sizeof(__pyx_k_day_cold_frequency_df), 0, 0, 1, 1},
    {&__pyx_n_s_day_hot_cold_dict, __pyx_k_day_hot_cold_dict, sizeof(__pyx_k_day_hot_cold_dict), 0, 0, 1, 1},
    {&__pyx_n_s_day_hot_cold_frequency_df, __pyx_k_day_hot_cold_frequency_df, sizeof(__pyx_k_day_hot_cold_frequency_df), 0, 0, 1, 1},
    {&__pyx_n_s_day_hot_cold_frequency_dict, __pyx_k_day_hot_cold_frequency_dict, sizeof(__pyx_k_day_hot_cold_frequency_dict), 0, 0, 1, 1},
    {&__pyx_n_s_day_hot_dict, __pyx_k_day_hot_dict, sizeof(__pyx_k_day_hot_dict), 0, 0, 1, 1},
    {&__pyx_n_s_day_hot_frequency_df, __pyx_k_day_hot_frequency_df, sizeof(__pyx_k_day_hot_frequency_df), 0, 0, 1, 1},
    {&__pyx_kp_u_day_info_firstly, __pyx_k_day_info_firstly, sizeof(__pyx_k_day_info_firstly), 0, 1, 0, 0},
    {&__pyx_n_s_day_len, __pyx_k_day_len, sizeof(__pyx_k_day_len), 0, 0, 1, 1},
    {&__pyx_n_s_day_levels, __pyx_k_day_levels, sizeof(__pyx_k_day_levels), 0, 0, 1, 1},
    {&__pyx_n_s_deas, __pyx_k_deas, sizeof(__pyx_k_deas), 0, 0, 1, 1},
    {&__pyx_n_s_decrease_ratio, __pyx_k_decrease_ratio, sizeof(__pyx_k_decrease_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
    {&__pyx_n_s_delist_stock_dict, __pyx_k_delist_stock_dict, sizeof(__pyx_k_delist_stock_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dependent_table, __pyx_k_dependent_table, sizeof(__pyx_k_dependent_table), 0, 0, 1, 1},
    {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
    {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1},
    {&__pyx_n_s_desc_name, __pyx_k_desc_name, sizeof(__pyx_k_desc_name), 0, 0, 1, 1},
    {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
    {&__pyx_n_s_df_filtered, __pyx_k_df_filtered, sizeof(__pyx_k_df_filtered), 0, 0, 1, 1},
    {&__pyx_n_s_df_grouped, __pyx_k_df_grouped, sizeof(__pyx_k_df_grouped), 0, 0, 1, 1},
    {&__pyx_n_s_df_left, __pyx_k_df_left, sizeof(__pyx_k_df_left), 0, 0, 1, 1},
    {&__pyx_n_s_df_ma, __pyx_k_df_ma, sizeof(__pyx_k_df_ma), 0, 0, 1, 1},
    {&__pyx_n_s_df_right, __pyx_k_df_right, sizeof(__pyx_k_df_right), 0, 0, 1, 1},
    {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
    {&__pyx_n_s_difs, __pyx_k_difs, sizeof(__pyx_k_difs), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_dispose, __pyx_k_dispose, sizeof(__pyx_k_dispose), 0, 0, 1, 1},
    {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
    {&__pyx_n_s_down, __pyx_k_down, sizeof(__pyx_k_down), 0, 0, 1, 1},
    {&__pyx_n_s_down_num, __pyx_k_down_num, sizeof(__pyx_k_down_num), 0, 0, 1, 1},
    {&__pyx_n_s_down_row_index, __pyx_k_down_row_index, sizeof(__pyx_k_down_row_index), 0, 0, 1, 1},
    {&__pyx_n_s_downlimt_num, __pyx_k_downlimt_num, sizeof(__pyx_k_downlimt_num), 0, 0, 1, 1},
    {&__pyx_n_s_dpi, __pyx_k_dpi, sizeof(__pyx_k_dpi), 0, 0, 1, 1},
    {&__pyx_n_s_drawKlineChart, __pyx_k_drawKlineChart, sizeof(__pyx_k_drawKlineChart), 0, 0, 1, 1},
    {&__pyx_n_s_driver, __pyx_k_driver, sizeof(__pyx_k_driver), 0, 0, 1, 1},
    {&__pyx_n_s_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 0, 1, 1},
    {&__pyx_n_s_drop_duplicates, __pyx_k_drop_duplicates, sizeof(__pyx_k_drop_duplicates), 0, 0, 1, 1},
    {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
    {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
    {&__pyx_n_s_dumpJsonToFile, __pyx_k_dumpJsonToFile, sizeof(__pyx_k_dumpJsonToFile), 0, 0, 1, 1},
    {&__pyx_n_s_edge, __pyx_k_edge, sizeof(__pyx_k_edge), 0, 0, 1, 1},
    {&__pyx_n_s_edge_driver_path, __pyx_k_edge_driver_path, sizeof(__pyx_k_edge_driver_path), 0, 0, 1, 1},
    {&__pyx_kp_s_ef232a, __pyx_k_ef232a, sizeof(__pyx_k_ef232a), 0, 0, 1, 0},
    {&__pyx_n_s_ema, __pyx_k_ema, sizeof(__pyx_k_ema), 0, 0, 1, 1},
    {&__pyx_n_s_ema_10, __pyx_k_ema_10, sizeof(__pyx_k_ema_10), 0, 0, 1, 1},
    {&__pyx_n_s_ema_20, __pyx_k_ema_20, sizeof(__pyx_k_ema_20), 0, 0, 1, 1},
    {&__pyx_n_s_ema_30, __pyx_k_ema_30, sizeof(__pyx_k_ema_30), 0, 0, 1, 1},
    {&__pyx_n_s_ema_5, __pyx_k_ema_5, sizeof(__pyx_k_ema_5), 0, 0, 1, 1},
    {&__pyx_n_s_ema_60, __pyx_k_ema_60, sizeof(__pyx_k_ema_60), 0, 0, 1, 1},
    {&__pyx_n_s_ema_df, __pyx_k_ema_df, sizeof(__pyx_k_ema_df), 0, 0, 1, 1},
    {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
    {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
    {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
    {&__pyx_n_s_end1, __pyx_k_end1, sizeof(__pyx_k_end1), 0, 0, 1, 1},
    {&__pyx_n_s_end5, __pyx_k_end5, sizeof(__pyx_k_end5), 0, 0, 1, 1},
    {&__pyx_n_s_end_date, __pyx_k_end_date, sizeof(__pyx_k_end_date), 0, 0, 1, 1},
    {&__pyx_n_s_engine, __pyx_k_engine, sizeof(__pyx_k_engine), 0, 0, 1, 1},
    {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
    {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
    {&__pyx_n_s_exclude_codes, __pyx_k_exclude_codes, sizeof(__pyx_k_exclude_codes), 0, 0, 1, 1},
    {&__pyx_n_s_exclude_concepts, __pyx_k_exclude_concepts, sizeof(__pyx_k_exclude_concepts), 0, 0, 1, 1},
    {&__pyx_n_s_exclude_indexes, __pyx_k_exclude_indexes, sizeof(__pyx_k_exclude_indexes), 0, 0, 1, 1},
    {&__pyx_n_s_executable_path, __pyx_k_executable_path, sizeof(__pyx_k_executable_path), 0, 0, 1, 1},
    {&__pyx_n_s_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 0, 1, 1},
    {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
    {&__pyx_n_s_f_code, __pyx_k_f_code, sizeof(__pyx_k_f_code), 0, 0, 1, 1},
    {&__pyx_n_s_facecolor, __pyx_k_facecolor, sizeof(__pyx_k_facecolor), 0, 0, 1, 1},
    {&__pyx_kp_u_failed_to_getStockTradeDayInfoF, __pyx_k_failed_to_getStockTradeDayInfoF, sizeof(__pyx_k_failed_to_getStockTradeDayInfoF), 0, 1, 0, 0},
    {&__pyx_kp_u_failed_to_getStockTradeDayInfoF_2, __pyx_k_failed_to_getStockTradeDayInfoF_2, sizeof(__pyx_k_failed_to_getStockTradeDayInfoF_2), 0, 1, 0, 0},
    {&__pyx_kp_u_failed_to_getStockTradeDayInfoS, __pyx_k_failed_to_getStockTradeDayInfoS, sizeof(__pyx_k_failed_to_getStockTradeDayInfoS), 0, 1, 0, 0},
    {&__pyx_n_s_family, __pyx_k_family, sizeof(__pyx_k_family), 0, 0, 1, 1},
    {&__pyx_n_s_fastk_period, __pyx_k_fastk_period, sizeof(__pyx_k_fastk_period), 0, 0, 1, 1},
    {&__pyx_n_s_fastperiod, __pyx_k_fastperiod, sizeof(__pyx_k_fastperiod), 0, 0, 1, 1},
    {&__pyx_kp_s_ffffff, __pyx_k_ffffff, sizeof(__pyx_k_ffffff), 0, 0, 1, 0},
    {&__pyx_n_s_fig, __pyx_k_fig, sizeof(__pyx_k_fig), 0, 0, 1, 1},
    {&__pyx_n_s_fig_bar, __pyx_k_fig_bar, sizeof(__pyx_k_fig_bar), 0, 0, 1, 1},
    {&__pyx_n_s_figcolor, __pyx_k_figcolor, sizeof(__pyx_k_figcolor), 0, 0, 1, 1},
    {&__pyx_n_s_figsize, __pyx_k_figsize, sizeof(__pyx_k_figsize), 0, 0, 1, 1},
    {&__pyx_n_s_figure, __pyx_k_figure, sizeof(__pyx_k_figure), 0, 0, 1, 1},
    {&__pyx_n_s_figure_save_name, __pyx_k_figure_save_name, sizeof(__pyx_k_figure_save_name), 0, 0, 1, 1},
    {&__pyx_n_s_figure_title, __pyx_k_figure_title, sizeof(__pyx_k_figure_title), 0, 0, 1, 1},
    {&__pyx_n_s_figured, __pyx_k_figured, sizeof(__pyx_k_figured), 0, 0, 1, 1},
    {&__pyx_n_s_file_extension, __pyx_k_file_extension, sizeof(__pyx_k_file_extension), 0, 0, 1, 1},
    {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
    {&__pyx_n_s_fillna, __pyx_k_fillna, sizeof(__pyx_k_fillna), 0, 0, 1, 1},
    {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
    {&__pyx_n_s_filter_dict, __pyx_k_filter_dict, sizeof(__pyx_k_filter_dict), 0, 0, 1, 1},
    {&__pyx_n_s_filter_dict_item, __pyx_k_filter_dict_item, sizeof(__pyx_k_filter_dict_item), 0, 0, 1, 1},
    {&__pyx_kp_s_filter_dict_report_date_should_b, __pyx_k_filter_dict_report_date_should_b, sizeof(__pyx_k_filter_dict_report_date_should_b), 0, 0, 1, 0},
    {&__pyx_kp_s_filter_dict_report_date_should_n, __pyx_k_filter_dict_report_date_should_n, sizeof(__pyx_k_filter_dict_report_date_should_n), 0, 0, 1, 0},
    {&__pyx_n_s_filter_list, __pyx_k_filter_list, sizeof(__pyx_k_filter_list), 0, 0, 1, 1},
    {&__pyx_n_s_financialStockStrategy, __pyx_k_financialStockStrategy, sizeof(__pyx_k_financialStockStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_financialStockStrategy___init, __pyx_k_financialStockStrategy___init, sizeof(__pyx_k_financialStockStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_financialStockStrategy_getStockB, __pyx_k_financialStockStrategy_getStockB, sizeof(__pyx_k_financialStockStrategy_getStockB), 0, 0, 1, 1},
    {&__pyx_n_s_financialStockStrategy_getStockM, __pyx_k_financialStockStrategy_getStockM, sizeof(__pyx_k_financialStockStrategy_getStockM), 0, 0, 1, 1},
    {&__pyx_n_s_financial_mode, __pyx_k_financial_mode, sizeof(__pyx_k_financial_mode), 0, 0, 1, 1},
    {&__pyx_n_s_financial_quarter_selection, __pyx_k_financial_quarter_selection, sizeof(__pyx_k_financial_quarter_selection), 0, 0, 1, 1},
    {&__pyx_n_s_financial_report_selection, __pyx_k_financial_report_selection, sizeof(__pyx_k_financial_report_selection), 0, 0, 1, 1},
    {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
    {&__pyx_n_s_first_uplimit_num, __pyx_k_first_uplimit_num, sizeof(__pyx_k_first_uplimit_num), 0, 0, 1, 1},
    {&__pyx_n_s_first_use_date, __pyx_k_first_use_date, sizeof(__pyx_k_first_use_date), 0, 0, 1, 1},
    {&__pyx_kp_u_firstly, __pyx_k_firstly, sizeof(__pyx_k_firstly), 0, 1, 0, 0},
    {&__pyx_n_s_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 0, 0, 1, 1},
    {&__pyx_n_s_font, __pyx_k_font, sizeof(__pyx_k_font), 0, 0, 1, 1},
    {&__pyx_n_s_fontsize, __pyx_k_fontsize, sizeof(__pyx_k_fontsize), 0, 0, 1, 1},
    {&__pyx_n_s_foot_size, __pyx_k_foot_size, sizeof(__pyx_k_foot_size), 0, 0, 1, 1},
    {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
    {&__pyx_n_s_formatter, __pyx_k_formatter, sizeof(__pyx_k_formatter), 0, 0, 1, 1},
    {&__pyx_n_s_fun_driver, __pyx_k_fun_driver, sizeof(__pyx_k_fun_driver), 0, 0, 1, 1},
    {&__pyx_n_s_fun_name, __pyx_k_fun_name, sizeof(__pyx_k_fun_name), 0, 0, 1, 1},
    {&__pyx_kp_s_function_params_if_params_dataI, __pyx_k_function_params_if_params_dataI, sizeof(__pyx_k_function_params_if_params_dataI), 0, 0, 1, 0},
    {&__pyx_kp_s_function_params_var_colorList_i, __pyx_k_function_params_var_colorList_i, sizeof(__pyx_k_function_params_var_colorList_i), 0, 0, 1, 0},
    {&__pyx_kp_s_function_params_var_colorList_i_2, __pyx_k_function_params_var_colorList_i_2, sizeof(__pyx_k_function_params_var_colorList_i_2), 0, 0, 1, 0},
    {&__pyx_n_s_fundamentalStockStrategy, __pyx_k_fundamentalStockStrategy, sizeof(__pyx_k_fundamentalStockStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_fundamentalStockStrategy___init, __pyx_k_fundamentalStockStrategy___init, sizeof(__pyx_k_fundamentalStockStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_fundamentalStockStrategy_getSing, __pyx_k_fundamentalStockStrategy_getSing, sizeof(__pyx_k_fundamentalStockStrategy_getSing), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB, __pyx_k_fundamentalStockStrategy_selectB, sizeof(__pyx_k_fundamentalStockStrategy_selectB), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_10, __pyx_k_fundamentalStockStrategy_selectB_10, sizeof(__pyx_k_fundamentalStockStrategy_selectB_10), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_11, __pyx_k_fundamentalStockStrategy_selectB_11, sizeof(__pyx_k_fundamentalStockStrategy_selectB_11), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_12, __pyx_k_fundamentalStockStrategy_selectB_12, sizeof(__pyx_k_fundamentalStockStrategy_selectB_12), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_2, __pyx_k_fundamentalStockStrategy_selectB_2, sizeof(__pyx_k_fundamentalStockStrategy_selectB_2), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_3, __pyx_k_fundamentalStockStrategy_selectB_3, sizeof(__pyx_k_fundamentalStockStrategy_selectB_3), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_4, __pyx_k_fundamentalStockStrategy_selectB_4, sizeof(__pyx_k_fundamentalStockStrategy_selectB_4), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_5, __pyx_k_fundamentalStockStrategy_selectB_5, sizeof(__pyx_k_fundamentalStockStrategy_selectB_5), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_6, __pyx_k_fundamentalStockStrategy_selectB_6, sizeof(__pyx_k_fundamentalStockStrategy_selectB_6), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_7, __pyx_k_fundamentalStockStrategy_selectB_7, sizeof(__pyx_k_fundamentalStockStrategy_selectB_7), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_8, __pyx_k_fundamentalStockStrategy_selectB_8, sizeof(__pyx_k_fundamentalStockStrategy_selectB_8), 0, 0, 1, 1},
    {&__pyx_n_s_fundamentalStockStrategy_selectB_9, __pyx_k_fundamentalStockStrategy_selectB_9, sizeof(__pyx_k_fundamentalStockStrategy_selectB_9), 0, 0, 1, 1},
    {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1},
    {&__pyx_n_s_future_trade_day, __pyx_k_future_trade_day, sizeof(__pyx_k_future_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_futures, __pyx_k_futures, sizeof(__pyx_k_futures), 0, 0, 1, 1},
    {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_getAllDelistStock, __pyx_k_getAllDelistStock, sizeof(__pyx_k_getAllDelistStock), 0, 0, 1, 1},
    {&__pyx_n_s_getAllHighAmountStock, __pyx_k_getAllHighAmountStock, sizeof(__pyx_k_getAllHighAmountStock), 0, 0, 1, 1},
    {&__pyx_n_s_getAllNewStock, __pyx_k_getAllNewStock, sizeof(__pyx_k_getAllNewStock), 0, 0, 1, 1},
    {&__pyx_n_s_getAllStStock, __pyx_k_getAllStStock, sizeof(__pyx_k_getAllStStock), 0, 0, 1, 1},
    {&__pyx_n_s_getAreaStockCodes, __pyx_k_getAreaStockCodes, sizeof(__pyx_k_getAreaStockCodes), 0, 0, 1, 1},
    {&__pyx_n_s_getConceptHotTable, __pyx_k_getConceptHotTable, sizeof(__pyx_k_getConceptHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_getConceptStockCodes, __pyx_k_getConceptStockCodes, sizeof(__pyx_k_getConceptStockCodes), 0, 0, 1, 1},
    {&__pyx_n_s_getFutureHotTable, __pyx_k_getFutureHotTable, sizeof(__pyx_k_getFutureHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_getIndexHotTable, __pyx_k_getIndexHotTable, sizeof(__pyx_k_getIndexHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_getIndustryConceptHotFrequency, __pyx_k_getIndustryConceptHotFrequency, sizeof(__pyx_k_getIndustryConceptHotFrequency), 0, 0, 1, 1},
    {&__pyx_n_s_getIndustryHotTable, __pyx_k_getIndustryHotTable, sizeof(__pyx_k_getIndustryHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_getIndustryStockCodes, __pyx_k_getIndustryStockCodes, sizeof(__pyx_k_getIndustryStockCodes), 0, 0, 1, 1},
    {&__pyx_n_s_getNameByTableCode, __pyx_k_getNameByTableCode, sizeof(__pyx_k_getNameByTableCode), 0, 0, 1, 1},
    {&__pyx_n_s_getOneWaveRatio, __pyx_k_getOneWaveRatio, sizeof(__pyx_k_getOneWaveRatio), 0, 0, 1, 1},
    {&__pyx_n_s_getPotentialConceptStock, __pyx_k_getPotentialConceptStock, sizeof(__pyx_k_getPotentialConceptStock), 0, 0, 1, 1},
    {&__pyx_n_s_getPotentialIndustryStock, __pyx_k_getPotentialIndustryStock, sizeof(__pyx_k_getPotentialIndustryStock), 0, 0, 1, 1},
    {&__pyx_n_s_getPotentialLimitUpStockNearDay, __pyx_k_getPotentialLimitUpStockNearDay, sizeof(__pyx_k_getPotentialLimitUpStockNearDay), 0, 0, 1, 1},
    {&__pyx_n_s_getSingleStockPriceQuantile, __pyx_k_getSingleStockPriceQuantile, sizeof(__pyx_k_getSingleStockPriceQuantile), 0, 0, 1, 1},
    {&__pyx_n_s_getSingleStockWavePriceRatio, __pyx_k_getSingleStockWavePriceRatio, sizeof(__pyx_k_getSingleStockWavePriceRatio), 0, 0, 1, 1},
    {&__pyx_kp_u_getSingleStockWavePriceRatio_tim, __pyx_k_getSingleStockWavePriceRatio_tim, sizeof(__pyx_k_getSingleStockWavePriceRatio_tim), 0, 1, 0, 0},
    {&__pyx_n_s_getStockByFinancialData, __pyx_k_getStockByFinancialData, sizeof(__pyx_k_getStockByFinancialData), 0, 0, 1, 1},
    {&__pyx_n_s_getStockByTechIndicator, __pyx_k_getStockByTechIndicator, sizeof(__pyx_k_getStockByTechIndicator), 0, 0, 1, 1},
    {&__pyx_n_s_getStockHoldNumberChangeTable, __pyx_k_getStockHoldNumberChangeTable, sizeof(__pyx_k_getStockHoldNumberChangeTable), 0, 0, 1, 1},
    {&__pyx_n_s_getStockHotTable, __pyx_k_getStockHotTable, sizeof(__pyx_k_getStockHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_getStockLadder, __pyx_k_getStockLadder, sizeof(__pyx_k_getStockLadder), 0, 0, 1, 1},
    {&__pyx_n_s_getStockLadderTable, __pyx_k_getStockLadderTable, sizeof(__pyx_k_getStockLadderTable), 0, 0, 1, 1},
    {&__pyx_n_s_getStockLimitUp, __pyx_k_getStockLimitUp, sizeof(__pyx_k_getStockLimitUp), 0, 0, 1, 1},
    {&__pyx_n_s_getStockMultiFinancialData, __pyx_k_getStockMultiFinancialData, sizeof(__pyx_k_getStockMultiFinancialData), 0, 0, 1, 1},
    {&__pyx_kp_u_getStockMultiFinancialData_quart, __pyx_k_getStockMultiFinancialData_quart, sizeof(__pyx_k_getStockMultiFinancialData_quart), 0, 1, 0, 0},
    {&__pyx_n_s_getStockNameByCode, __pyx_k_getStockNameByCode, sizeof(__pyx_k_getStockNameByCode), 0, 0, 1, 1},
    {&__pyx_n_s_getStockProperty, __pyx_k_getStockProperty, sizeof(__pyx_k_getStockProperty), 0, 0, 1, 1},
    {&__pyx_n_s_getStockProperty_2, __pyx_k_getStockProperty_2, sizeof(__pyx_k_getStockProperty_2), 0, 0, 1, 1},
    {&__pyx_n_s_getStockSimpleInfo, __pyx_k_getStockSimpleInfo, sizeof(__pyx_k_getStockSimpleInfo), 0, 0, 1, 1},
    {&__pyx_n_s_getStockTradeDayInfoFq, __pyx_k_getStockTradeDayInfoFq, sizeof(__pyx_k_getStockTradeDayInfoFq), 0, 0, 1, 1},
    {&__pyx_n_s_getStockTradeDayInfoSqlalchemy, __pyx_k_getStockTradeDayInfoSqlalchemy, sizeof(__pyx_k_getStockTradeDayInfoSqlalchemy), 0, 0, 1, 1},
    {&__pyx_n_s_getStockWavePriceRatio, __pyx_k_getStockWavePriceRatio, sizeof(__pyx_k_getStockWavePriceRatio), 0, 0, 1, 1},
    {&__pyx_n_s_getStrategyDataAndImg, __pyx_k_getStrategyDataAndImg, sizeof(__pyx_k_getStrategyDataAndImg), 0, 0, 1, 1},
    {&__pyx_n_s_getStrategyDataAndImg_new, __pyx_k_getStrategyDataAndImg_new, sizeof(__pyx_k_getStrategyDataAndImg_new), 0, 0, 1, 1},
    {&__pyx_n_s_getSuspendedStocks, __pyx_k_getSuspendedStocks, sizeof(__pyx_k_getSuspendedStocks), 0, 0, 1, 1},
    {&__pyx_n_s_getTradeDayChangeRankBetweenDate, __pyx_k_getTradeDayChangeRankBetweenDate, sizeof(__pyx_k_getTradeDayChangeRankBetweenDate), 0, 0, 1, 1},
    {&__pyx_n_s_getTradeDistributionTable, __pyx_k_getTradeDistributionTable, sizeof(__pyx_k_getTradeDistributionTable), 0, 0, 1, 1},
    {&__pyx_n_s_getWebDriver, __pyx_k_getWebDriver, sizeof(__pyx_k_getWebDriver), 0, 0, 1, 1},
    {&__pyx_n_s_getYearStartEndDate, __pyx_k_getYearStartEndDate, sizeof(__pyx_k_getYearStartEndDate), 0, 0, 1, 1},
    {&__pyx_n_s_get_Item, __pyx_k_get_Item, sizeof(__pyx_k_get_Item), 0, 0, 1, 1},
    {&__pyx_n_s_get_facecolor, __pyx_k_get_facecolor, sizeof(__pyx_k_get_facecolor), 0, 0, 1, 1},
    {&__pyx_n_s_getframe, __pyx_k_getframe, sizeof(__pyx_k_getframe), 0, 0, 1, 1},
    {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
    {&__pyx_n_s_grid_chart, __pyx_k_grid_chart, sizeof(__pyx_k_grid_chart), 0, 0, 1, 1},
    {&__pyx_n_s_grid_index, __pyx_k_grid_index, sizeof(__pyx_k_grid_index), 0, 0, 1, 1},
    {&__pyx_n_s_grid_opts, __pyx_k_grid_opts, sizeof(__pyx_k_grid_opts), 0, 0, 1, 1},
    {&__pyx_n_s_gridcolor, __pyx_k_gridcolor, sizeof(__pyx_k_gridcolor), 0, 0, 1, 1},
    {&__pyx_n_s_gross_profit_ratio, __pyx_k_gross_profit_ratio, sizeof(__pyx_k_gross_profit_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
    {&__pyx_n_s_group_column, __pyx_k_group_column, sizeof(__pyx_k_group_column), 0, 0, 1, 1},
    {&__pyx_n_s_group_keys, __pyx_k_group_keys, sizeof(__pyx_k_group_keys), 0, 0, 1, 1},
    {&__pyx_n_s_groupby, __pyx_k_groupby, sizeof(__pyx_k_groupby), 0, 0, 1, 1},
    {&__pyx_n_s_grouped_df, __pyx_k_grouped_df, sizeof(__pyx_k_grouped_df), 0, 0, 1, 1},
    {&__pyx_n_s_ha, __pyx_k_ha, sizeof(__pyx_k_ha), 0, 0, 1, 1},
    {&__pyx_n_s_has_strategy_file, __pyx_k_has_strategy_file, sizeof(__pyx_k_has_strategy_file), 0, 0, 1, 1},
    {&__pyx_kp_u_has_suspended_at, __pyx_k_has_suspended_at, sizeof(__pyx_k_has_suspended_at), 0, 1, 0, 0},
    {&__pyx_n_s_has_update_file, __pyx_k_has_update_file, sizeof(__pyx_k_has_update_file), 0, 0, 1, 1},
    {&__pyx_n_s_head, __pyx_k_head, sizeof(__pyx_k_head), 0, 0, 1, 1},
    {&__pyx_n_s_head_tail_df, __pyx_k_head_tail_df, sizeof(__pyx_k_head_tail_df), 0, 0, 1, 1},
    {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
    {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1},
    {&__pyx_n_s_high_amount_stock_list, __pyx_k_high_amount_stock_list, sizeof(__pyx_k_high_amount_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_hit, __pyx_k_hit, sizeof(__pyx_k_hit), 0, 0, 1, 1},
    {&__pyx_n_s_hold_number_decrease, __pyx_k_hold_number_decrease, sizeof(__pyx_k_hold_number_decrease), 0, 0, 1, 1},
    {&__pyx_n_s_holder_num, __pyx_k_holder_num, sizeof(__pyx_k_holder_num), 0, 0, 1, 1},
    {&__pyx_n_s_hot_cold_concept_table, __pyx_k_hot_cold_concept_table, sizeof(__pyx_k_hot_cold_concept_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_cold_future_table, __pyx_k_hot_cold_future_table, sizeof(__pyx_k_hot_cold_future_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_cold_index_table, __pyx_k_hot_cold_index_table, sizeof(__pyx_k_hot_cold_index_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_cold_industry_table, __pyx_k_hot_cold_industry_table, sizeof(__pyx_k_hot_cold_industry_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_cold_stock_table, __pyx_k_hot_cold_stock_table, sizeof(__pyx_k_hot_cold_stock_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_concept_frequency, __pyx_k_hot_concept_frequency, sizeof(__pyx_k_hot_concept_frequency), 0, 0, 1, 1},
    {&__pyx_n_s_hot_concept_table, __pyx_k_hot_concept_table, sizeof(__pyx_k_hot_concept_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_future_table, __pyx_k_hot_future_table, sizeof(__pyx_k_hot_future_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_index_table, __pyx_k_hot_index_table, sizeof(__pyx_k_hot_index_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_industry_frequency, __pyx_k_hot_industry_frequency, sizeof(__pyx_k_hot_industry_frequency), 0, 0, 1, 1},
    {&__pyx_n_s_hot_industry_table, __pyx_k_hot_industry_table, sizeof(__pyx_k_hot_industry_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_stock_table, __pyx_k_hot_stock_table, sizeof(__pyx_k_hot_stock_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table, __pyx_k_hot_table, sizeof(__pyx_k_hot_table), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_day, __pyx_k_hot_table_day, sizeof(__pyx_k_hot_table_day), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_day_name, __pyx_k_hot_table_day_name, sizeof(__pyx_k_hot_table_day_name), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_month, __pyx_k_hot_table_month, sizeof(__pyx_k_hot_table_month), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_month_name, __pyx_k_hot_table_month_name, sizeof(__pyx_k_hot_table_month_name), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_near_day, __pyx_k_hot_table_near_day, sizeof(__pyx_k_hot_table_near_day), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_week, __pyx_k_hot_table_week, sizeof(__pyx_k_hot_table_week), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_week_name, __pyx_k_hot_table_week_name, sizeof(__pyx_k_hot_table_week_name), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_year, __pyx_k_hot_table_year, sizeof(__pyx_k_hot_table_year), 0, 0, 1, 1},
    {&__pyx_n_s_hot_table_year_name, __pyx_k_hot_table_year_name, sizeof(__pyx_k_hot_table_year_name), 0, 0, 1, 1},
    {&__pyx_n_s_how, __pyx_k_how, sizeof(__pyx_k_how), 0, 0, 1, 1},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
    {&__pyx_n_s_idxmax, __pyx_k_idxmax, sizeof(__pyx_k_idxmax), 0, 0, 1, 1},
    {&__pyx_n_s_idxmin, __pyx_k_idxmin, sizeof(__pyx_k_idxmin), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_index, __pyx_k_ignore_index, sizeof(__pyx_k_ignore_index), 0, 0, 1, 1},
    {&__pyx_n_s_iloc, __pyx_k_iloc, sizeof(__pyx_k_iloc), 0, 0, 1, 1},
    {&__pyx_n_s_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 0, 1, 1},
    {&__pyx_n_s_img_save_path_root, __pyx_k_img_save_path_root, sizeof(__pyx_k_img_save_path_root), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_kp_u_in, __pyx_k_in, sizeof(__pyx_k_in), 0, 1, 0, 0},
    {&__pyx_n_s_include_groups, __pyx_k_include_groups, sizeof(__pyx_k_include_groups), 0, 0, 1, 1},
    {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
    {&__pyx_n_s_index_left, __pyx_k_index_left, sizeof(__pyx_k_index_left), 0, 0, 1, 1},
    {&__pyx_n_s_index_list, __pyx_k_index_list, sizeof(__pyx_k_index_list), 0, 0, 1, 1},
    {&__pyx_n_s_index_right, __pyx_k_index_right, sizeof(__pyx_k_index_right), 0, 0, 1, 1},
    {&__pyx_n_s_index_trade_day, __pyx_k_index_trade_day, sizeof(__pyx_k_index_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_industry, __pyx_k_industry, sizeof(__pyx_k_industry), 0, 0, 1, 1},
    {&__pyx_n_s_industry_list, __pyx_k_industry_list, sizeof(__pyx_k_industry_list), 0, 0, 1, 1},
    {&__pyx_n_s_industry_stock_list, __pyx_k_industry_stock_list, sizeof(__pyx_k_industry_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
    {&__pyx_n_s_inherit, __pyx_k_inherit, sizeof(__pyx_k_inherit), 0, 0, 1, 1},
    {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
    {&__pyx_n_s_init_opts, __pyx_k_init_opts, sizeof(__pyx_k_init_opts), 0, 0, 1, 1},
    {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_inner, __pyx_k_inner, sizeof(__pyx_k_inner), 0, 0, 1, 1},
    {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
    {&__pyx_n_s_input_codes, __pyx_k_input_codes, sizeof(__pyx_k_input_codes), 0, 0, 1, 1},
    {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
    {&__pyx_n_s_inside, __pyx_k_inside, sizeof(__pyx_k_inside), 0, 0, 1, 1},
    {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
    {&__pyx_kp_s_int_dict, __pyx_k_int_dict, sizeof(__pyx_k_int_dict), 0, 0, 1, 0},
    {&__pyx_n_s_intersect_stock_list, __pyx_k_intersect_stock_list, sizeof(__pyx_k_intersect_stock_list), 0, 0, 1, 1},
    {&__pyx_kp_u_intersect_stock_list_is_empty, __pyx_k_intersect_stock_list_is_empty, sizeof(__pyx_k_intersect_stock_list_is_empty), 0, 1, 0, 0},
    {&__pyx_n_s_intersection_list, __pyx_k_intersection_list, sizeof(__pyx_k_intersection_list), 0, 0, 1, 1},
    {&__pyx_n_s_interval, __pyx_k_interval, sizeof(__pyx_k_interval), 0, 0, 1, 1},
    {&__pyx_n_s_isDelistStock, __pyx_k_isDelistStock, sizeof(__pyx_k_isDelistStock), 0, 0, 1, 1},
    {&__pyx_n_s_isDownLimit, __pyx_k_isDownLimit, sizeof(__pyx_k_isDownLimit), 0, 0, 1, 1},
    {&__pyx_n_s_isLowAmountStock, __pyx_k_isLowAmountStock, sizeof(__pyx_k_isLowAmountStock), 0, 0, 1, 1},
    {&__pyx_n_s_isMonthLastTradeDay, __pyx_k_isMonthLastTradeDay, sizeof(__pyx_k_isMonthLastTradeDay), 0, 0, 1, 1},
    {&__pyx_n_s_isNewStock, __pyx_k_isNewStock, sizeof(__pyx_k_isNewStock), 0, 0, 1, 1},
    {&__pyx_n_s_isStStock, __pyx_k_isStStock, sizeof(__pyx_k_isStStock), 0, 0, 1, 1},
    {&__pyx_n_s_isUpLimit, __pyx_k_isUpLimit, sizeof(__pyx_k_isUpLimit), 0, 0, 1, 1},
    {&__pyx_n_s_isWeekLastTradeDay, __pyx_k_isWeekLastTradeDay, sizeof(__pyx_k_isWeekLastTradeDay), 0, 0, 1, 1},
    {&__pyx_n_s_isYearLastTradeDay, __pyx_k_isYearLastTradeDay, sizeof(__pyx_k_isYearLastTradeDay), 0, 0, 1, 1},
    {&__pyx_n_s_is_code, __pyx_k_is_code, sizeof(__pyx_k_is_code), 0, 0, 1, 1},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_n_s_is_delist, __pyx_k_is_delist, sizeof(__pyx_k_is_delist), 0, 0, 1, 1},
    {&__pyx_n_s_is_down_limit, __pyx_k_is_down_limit, sizeof(__pyx_k_is_down_limit), 0, 0, 1, 1},
    {&__pyx_n_s_is_fill_bg_color, __pyx_k_is_fill_bg_color, sizeof(__pyx_k_is_fill_bg_color), 0, 0, 1, 1},
    {&__pyx_n_s_is_get_max_level, __pyx_k_is_get_max_level, sizeof(__pyx_k_is_get_max_level), 0, 0, 1, 1},
    {&__pyx_n_s_is_month_last, __pyx_k_is_month_last, sizeof(__pyx_k_is_month_last), 0, 0, 1, 1},
    {&__pyx_n_s_is_on_zero, __pyx_k_is_on_zero, sizeof(__pyx_k_is_on_zero), 0, 0, 1, 1},
    {&__pyx_n_s_is_scale, __pyx_k_is_scale, sizeof(__pyx_k_is_scale), 0, 0, 1, 1},
    {&__pyx_n_s_is_session, __pyx_k_is_session, sizeof(__pyx_k_is_session), 0, 0, 1, 1},
    {&__pyx_n_s_is_show, __pyx_k_is_show, sizeof(__pyx_k_is_show), 0, 0, 1, 1},
    {&__pyx_n_s_is_smooth, __pyx_k_is_smooth, sizeof(__pyx_k_is_smooth), 0, 0, 1, 1},
    {&__pyx_n_s_is_st, __pyx_k_is_st, sizeof(__pyx_k_is_st), 0, 0, 1, 1},
    {&__pyx_n_s_is_up_limit, __pyx_k_is_up_limit, sizeof(__pyx_k_is_up_limit), 0, 0, 1, 1},
    {&__pyx_n_s_is_week_last, __pyx_k_is_week_last, sizeof(__pyx_k_is_week_last), 0, 0, 1, 1},
    {&__pyx_n_s_is_year_last, __pyx_k_is_year_last, sizeof(__pyx_k_is_year_last), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_s_isin, __pyx_k_isin, sizeof(__pyx_k_isin), 0, 0, 1, 1},
    {&__pyx_n_s_item_down, __pyx_k_item_down, sizeof(__pyx_k_item_down), 0, 0, 1, 1},
    {&__pyx_n_s_item_up, __pyx_k_item_up, sizeof(__pyx_k_item_up), 0, 0, 1, 1},
    {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
    {&__pyx_n_s_itemstyle_opts, __pyx_k_itemstyle_opts, sizeof(__pyx_k_itemstyle_opts), 0, 0, 1, 1},
    {&__pyx_n_s_iterrows, __pyx_k_iterrows, sizeof(__pyx_k_iterrows), 0, 0, 1, 1},
    {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
    {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
    {&__pyx_n_s_json_file_name, __pyx_k_json_file_name, sizeof(__pyx_k_json_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_judgeSingleStockByTechIndicator, __pyx_k_judgeSingleStockByTechIndicator, sizeof(__pyx_k_judgeSingleStockByTechIndicator), 0, 0, 1, 1},
    {&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1},
    {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
    {&__pyx_n_s_key_day, __pyx_k_key_day, sizeof(__pyx_k_key_day), 0, 0, 1, 1},
    {&__pyx_n_s_key_list, __pyx_k_key_list, sizeof(__pyx_k_key_list), 0, 0, 1, 1},
    {&__pyx_n_s_key_name, __pyx_k_key_name, sizeof(__pyx_k_key_name), 0, 0, 1, 1},
    {&__pyx_n_s_key_pandas, __pyx_k_key_pandas, sizeof(__pyx_k_key_pandas), 0, 0, 1, 1},
    {&__pyx_n_s_key_products, __pyx_k_key_products, sizeof(__pyx_k_key_products), 0, 0, 1, 1},
    {&__pyx_n_s_key_time, __pyx_k_key_time, sizeof(__pyx_k_key_time), 0, 0, 1, 1},
    {&__pyx_n_s_key_word, __pyx_k_key_word, sizeof(__pyx_k_key_word), 0, 0, 1, 1},
    {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
    {&__pyx_n_s_kf_net_profit_tb, __pyx_k_kf_net_profit_tb, sizeof(__pyx_k_kf_net_profit_tb), 0, 0, 1, 1},
    {&__pyx_n_s_kline, __pyx_k_kline, sizeof(__pyx_k_kline), 0, 0, 1, 1},
    {&__pyx_kp_u_kline_html, __pyx_k_kline_html, sizeof(__pyx_k_kline_html), 0, 1, 0, 0},
    {&__pyx_n_s_kline_line, __pyx_k_kline_line, sizeof(__pyx_k_kline_line), 0, 0, 1, 1},
    {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
    {&__pyx_n_s_label_opts, __pyx_k_label_opts, sizeof(__pyx_k_label_opts), 0, 0, 1, 1},
    {&__pyx_n_s_ladder_max, __pyx_k_ladder_max, sizeof(__pyx_k_ladder_max), 0, 0, 1, 1},
    {&__pyx_n_s_last_five_dict, __pyx_k_last_five_dict, sizeof(__pyx_k_last_five_dict), 0, 0, 1, 1},
    {&__pyx_n_s_last_five_items, __pyx_k_last_five_items, sizeof(__pyx_k_last_five_items), 0, 0, 1, 1},
    {&__pyx_n_s_latest_trade_day, __pyx_k_latest_trade_day, sizeof(__pyx_k_latest_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_left_index, __pyx_k_left_index, sizeof(__pyx_k_left_index), 0, 0, 1, 1},
    {&__pyx_n_s_legend_opts, __pyx_k_legend_opts, sizeof(__pyx_k_legend_opts), 0, 0, 1, 1},
    {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
    {&__pyx_n_s_level_code_list, __pyx_k_level_code_list, sizeof(__pyx_k_level_code_list), 0, 0, 1, 1},
    {&__pyx_n_s_limit_up_code_list, __pyx_k_limit_up_code_list, sizeof(__pyx_k_limit_up_code_list), 0, 0, 1, 1},
    {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
    {&__pyx_n_s_line_2, __pyx_k_line_2, sizeof(__pyx_k_line_2), 0, 0, 1, 1},
    {&__pyx_n_s_linestyle_opts, __pyx_k_linestyle_opts, sizeof(__pyx_k_linestyle_opts), 0, 0, 1, 1},
    {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
    {&__pyx_n_s_listIntersection, __pyx_k_listIntersection, sizeof(__pyx_k_listIntersection), 0, 0, 1, 1},
    {&__pyx_n_s_listUnion, __pyx_k_listUnion, sizeof(__pyx_k_listUnion), 0, 0, 1, 1},
    {&__pyx_n_s_list_2_dict, __pyx_k_list_2_dict, sizeof(__pyx_k_list_2_dict), 0, 0, 1, 1},
    {&__pyx_n_s_list_item, __pyx_k_list_item, sizeof(__pyx_k_list_item), 0, 0, 1, 1},
    {&__pyx_n_s_loadJsonData, __pyx_k_loadJsonData, sizeof(__pyx_k_loadJsonData), 0, 0, 1, 1},
    {&__pyx_n_s_loadTable, __pyx_k_loadTable, sizeof(__pyx_k_loadTable), 0, 0, 1, 1},
    {&__pyx_n_s_loadTableContentByDate, __pyx_k_loadTableContentByDate, sizeof(__pyx_k_loadTableContentByDate), 0, 0, 1, 1},
    {&__pyx_n_s_load_json_file, __pyx_k_load_json_file, sizeof(__pyx_k_load_json_file), 0, 0, 1, 1},
    {&__pyx_kp_s_load_json_file_2, __pyx_k_load_json_file_2, sizeof(__pyx_k_load_json_file_2), 0, 0, 1, 0},
    {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
    {&__pyx_n_s_lock_time, __pyx_k_lock_time, sizeof(__pyx_k_lock_time), 0, 0, 1, 1},
    {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
    {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1},
    {&__pyx_n_s_ma, __pyx_k_ma, sizeof(__pyx_k_ma), 0, 0, 1, 1},
    {&__pyx_n_s_ma_10, __pyx_k_ma_10, sizeof(__pyx_k_ma_10), 0, 0, 1, 1},
    {&__pyx_n_s_ma_20, __pyx_k_ma_20, sizeof(__pyx_k_ma_20), 0, 0, 1, 1},
    {&__pyx_n_s_ma_30, __pyx_k_ma_30, sizeof(__pyx_k_ma_30), 0, 0, 1, 1},
    {&__pyx_n_s_ma_5, __pyx_k_ma_5, sizeof(__pyx_k_ma_5), 0, 0, 1, 1},
    {&__pyx_n_s_ma_60, __pyx_k_ma_60, sizeof(__pyx_k_ma_60), 0, 0, 1, 1},
    {&__pyx_n_s_ma_column, __pyx_k_ma_column, sizeof(__pyx_k_ma_column), 0, 0, 1, 1},
    {&__pyx_n_s_ma_name, __pyx_k_ma_name, sizeof(__pyx_k_ma_name), 0, 0, 1, 1},
    {&__pyx_n_s_ma_time, __pyx_k_ma_time, sizeof(__pyx_k_ma_time), 0, 0, 1, 1},
    {&__pyx_n_s_ma_time_list, __pyx_k_ma_time_list, sizeof(__pyx_k_ma_time_list), 0, 0, 1, 1},
    {&__pyx_n_s_macd, __pyx_k_macd, sizeof(__pyx_k_macd), 0, 0, 1, 1},
    {&__pyx_n_s_macd_df, __pyx_k_macd_df, sizeof(__pyx_k_macd_df), 0, 0, 1, 1},
    {&__pyx_n_s_macdhist, __pyx_k_macdhist, sizeof(__pyx_k_macdhist), 0, 0, 1, 1},
    {&__pyx_n_s_macds, __pyx_k_macds, sizeof(__pyx_k_macds), 0, 0, 1, 1},
    {&__pyx_n_s_macdsignal, __pyx_k_macdsignal, sizeof(__pyx_k_macdsignal), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_main_business, __pyx_k_main_business, sizeof(__pyx_k_main_business), 0, 0, 1, 1},
    {&__pyx_n_s_make_marketcolors, __pyx_k_make_marketcolors, sizeof(__pyx_k_make_marketcolors), 0, 0, 1, 1},
    {&__pyx_n_s_make_mpf_style, __pyx_k_make_mpf_style, sizeof(__pyx_k_make_mpf_style), 0, 0, 1, 1},
    {&__pyx_n_s_make_snapshot, __pyx_k_make_snapshot, sizeof(__pyx_k_make_snapshot), 0, 0, 1, 1},
    {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
    {&__pyx_n_s_marker_stock_list, __pyx_k_marker_stock_list, sizeof(__pyx_k_marker_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_market, __pyx_k_market, sizeof(__pyx_k_market), 0, 0, 1, 1},
    {&__pyx_n_s_market_cap, __pyx_k_market_cap, sizeof(__pyx_k_market_cap), 0, 0, 1, 1},
    {&__pyx_n_s_market_type, __pyx_k_market_type, sizeof(__pyx_k_market_type), 0, 0, 1, 1},
    {&__pyx_n_s_marketcolors, __pyx_k_marketcolors, sizeof(__pyx_k_marketcolors), 0, 0, 1, 1},
    {&__pyx_n_s_markpoint_opts, __pyx_k_markpoint_opts, sizeof(__pyx_k_markpoint_opts), 0, 0, 1, 1},
    {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
    {&__pyx_n_s_matplotlib, __pyx_k_matplotlib, sizeof(__pyx_k_matplotlib), 0, 0, 1, 1},
    {&__pyx_n_s_matplotlib_pyplot, __pyx_k_matplotlib_pyplot, sizeof(__pyx_k_matplotlib_pyplot), 0, 0, 1, 1},
    {&__pyx_n_s_matype, __pyx_k_matype, sizeof(__pyx_k_matype), 0, 0, 1, 1},
    {&__pyx_n_s_mav, __pyx_k_mav, sizeof(__pyx_k_mav), 0, 0, 1, 1},
    {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
    {&__pyx_n_s_max_2, __pyx_k_max_2, sizeof(__pyx_k_max_2), 0, 0, 1, 1},
    {&__pyx_n_s_max_depth, __pyx_k_max_depth, sizeof(__pyx_k_max_depth), 0, 0, 1, 1},
    {&__pyx_n_s_max_item_down, __pyx_k_max_item_down, sizeof(__pyx_k_max_item_down), 0, 0, 1, 1},
    {&__pyx_n_s_max_item_up, __pyx_k_max_item_up, sizeof(__pyx_k_max_item_up), 0, 0, 1, 1},
    {&__pyx_n_s_max_level, __pyx_k_max_level, sizeof(__pyx_k_max_level), 0, 0, 1, 1},
    {&__pyx_n_s_max_price, __pyx_k_max_price, sizeof(__pyx_k_max_price), 0, 0, 1, 1},
    {&__pyx_n_s_max_price_date, __pyx_k_max_price_date, sizeof(__pyx_k_max_price_date), 0, 0, 1, 1},
    {&__pyx_n_s_max_price_index, __pyx_k_max_price_index, sizeof(__pyx_k_max_price_index), 0, 0, 1, 1},
    {&__pyx_n_s_max_rows, __pyx_k_max_rows, sizeof(__pyx_k_max_rows), 0, 0, 1, 1},
    {&__pyx_n_s_max_workers, __pyx_k_max_workers, sizeof(__pyx_k_max_workers), 0, 0, 1, 1},
    {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
    {&__pyx_n_s_merge, __pyx_k_merge, sizeof(__pyx_k_merge), 0, 0, 1, 1},
    {&__pyx_n_s_merged_df, __pyx_k_merged_df, sizeof(__pyx_k_merged_df), 0, 0, 1, 1},
    {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
    {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
    {&__pyx_n_s_min_2, __pyx_k_min_2, sizeof(__pyx_k_min_2), 0, 0, 1, 1},
    {&__pyx_n_s_min_price, __pyx_k_min_price, sizeof(__pyx_k_min_price), 0, 0, 1, 1},
    {&__pyx_n_s_min_price_date, __pyx_k_min_price_date, sizeof(__pyx_k_min_price_date), 0, 0, 1, 1},
    {&__pyx_n_s_min_price_index, __pyx_k_min_price_index, sizeof(__pyx_k_min_price_index), 0, 0, 1, 1},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_kp_s_mode_must_switch_in_industry_con, __pyx_k_mode_must_switch_in_industry_con, sizeof(__pyx_k_mode_must_switch_in_industry_con), 0, 0, 1, 0},
    {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
    {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1},
    {&__pyx_n_s_month_2, __pyx_k_month_2, sizeof(__pyx_k_month_2), 0, 0, 1, 1},
    {&__pyx_n_s_month_levels, __pyx_k_month_levels, sizeof(__pyx_k_month_levels), 0, 0, 1, 1},
    {&__pyx_n_s_mpf, __pyx_k_mpf, sizeof(__pyx_k_mpf), 0, 0, 1, 1},
    {&__pyx_n_s_mplfinance, __pyx_k_mplfinance, sizeof(__pyx_k_mplfinance), 0, 0, 1, 1},
    {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
    {&__pyx_n_s_multi_thread, __pyx_k_multi_thread, sizeof(__pyx_k_multi_thread), 0, 0, 1, 1},
    {&__pyx_n_s_multi_type, __pyx_k_multi_type, sizeof(__pyx_k_multi_type), 0, 0, 1, 1},
    {&__pyx_kp_u_multi_type_parameter_set_wrong, __pyx_k_multi_type_parameter_set_wrong, sizeof(__pyx_k_multi_type_parameter_set_wrong), 0, 1, 0, 0},
    {&__pyx_n_s_my_color, __pyx_k_my_color, sizeof(__pyx_k_my_color), 0, 0, 1, 1},
    {&__pyx_n_s_my_dataproc, __pyx_k_my_dataproc, sizeof(__pyx_k_my_dataproc), 0, 0, 1, 1},
    {&__pyx_n_s_my_dict, __pyx_k_my_dict, sizeof(__pyx_k_my_dict), 0, 0, 1, 1},
    {&__pyx_n_s_my_method, __pyx_k_my_method, sizeof(__pyx_k_my_method), 0, 0, 1, 1},
    {&__pyx_n_s_my_plot, __pyx_k_my_plot, sizeof(__pyx_k_my_plot), 0, 0, 1, 1},
    {&__pyx_n_s_my_style, __pyx_k_my_style, sizeof(__pyx_k_my_style), 0, 0, 1, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
    {&__pyx_n_s_name_list, __pyx_k_name_list, sizeof(__pyx_k_name_list), 0, 0, 1, 1},
    {&__pyx_n_s_name_up_limit_times, __pyx_k_name_up_limit_times, sizeof(__pyx_k_name_up_limit_times), 0, 0, 1, 1},
    {&__pyx_n_s_nbdevdn, __pyx_k_nbdevdn, sizeof(__pyx_k_nbdevdn), 0, 0, 1, 1},
    {&__pyx_n_s_nbdevup, __pyx_k_nbdevup, sizeof(__pyx_k_nbdevup), 0, 0, 1, 1},
    {&__pyx_n_s_near, __pyx_k_near, sizeof(__pyx_k_near), 0, 0, 1, 1},
    {&__pyx_n_s_near_10, __pyx_k_near_10, sizeof(__pyx_k_near_10), 0, 0, 1, 1},
    {&__pyx_n_s_near_2, __pyx_k_near_2, sizeof(__pyx_k_near_2), 0, 0, 1, 1},
    {&__pyx_n_s_near_20, __pyx_k_near_20, sizeof(__pyx_k_near_20), 0, 0, 1, 1},
    {&__pyx_n_s_near_30, __pyx_k_near_30, sizeof(__pyx_k_near_30), 0, 0, 1, 1},
    {&__pyx_n_s_near_5, __pyx_k_near_5, sizeof(__pyx_k_near_5), 0, 0, 1, 1},
    {&__pyx_n_s_near_60, __pyx_k_near_60, sizeof(__pyx_k_near_60), 0, 0, 1, 1},
    {&__pyx_n_s_near_datetime, __pyx_k_near_datetime, sizeof(__pyx_k_near_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_near_day, __pyx_k_near_day, sizeof(__pyx_k_near_day), 0, 0, 1, 1},
    {&__pyx_n_s_near_day_dict, __pyx_k_near_day_dict, sizeof(__pyx_k_near_day_dict), 0, 0, 1, 1},
    {&__pyx_n_s_near_day_list, __pyx_k_near_day_list, sizeof(__pyx_k_near_day_list), 0, 0, 1, 1},
    {&__pyx_n_s_near_levels, __pyx_k_near_levels, sizeof(__pyx_k_near_levels), 0, 0, 1, 1},
    {&__pyx_n_s_near_name, __pyx_k_near_name, sizeof(__pyx_k_near_name), 0, 0, 1, 1},
    {&__pyx_n_s_near_num, __pyx_k_near_num, sizeof(__pyx_k_near_num), 0, 0, 1, 1},
    {&__pyx_n_s_need_database_tables, __pyx_k_need_database_tables, sizeof(__pyx_k_need_database_tables), 0, 0, 1, 1},
    {&__pyx_n_s_negative_infinity, __pyx_k_negative_infinity, sizeof(__pyx_k_negative_infinity), 0, 0, 1, 1},
    {&__pyx_n_s_new_base_list, __pyx_k_new_base_list, sizeof(__pyx_k_new_base_list), 0, 0, 1, 1},
    {&__pyx_n_s_new_date, __pyx_k_new_date, sizeof(__pyx_k_new_date), 0, 0, 1, 1},
    {&__pyx_n_s_new_date_len, __pyx_k_new_date_len, sizeof(__pyx_k_new_date_len), 0, 0, 1, 1},
    {&__pyx_n_s_new_datetime_threshold, __pyx_k_new_datetime_threshold, sizeof(__pyx_k_new_datetime_threshold), 0, 0, 1, 1},
    {&__pyx_n_s_new_df, __pyx_k_new_df, sizeof(__pyx_k_new_df), 0, 0, 1, 1},
    {&__pyx_n_s_new_dict, __pyx_k_new_dict, sizeof(__pyx_k_new_dict), 0, 0, 1, 1},
    {&__pyx_kp_s_new_end_date, __pyx_k_new_end_date, sizeof(__pyx_k_new_end_date), 0, 0, 1, 0},
    {&__pyx_n_s_new_record, __pyx_k_new_record, sizeof(__pyx_k_new_record), 0, 0, 1, 1},
    {&__pyx_n_s_new_row_cold, __pyx_k_new_row_cold, sizeof(__pyx_k_new_row_cold), 0, 0, 1, 1},
    {&__pyx_n_s_new_row_hot, __pyx_k_new_row_hot, sizeof(__pyx_k_new_row_hot), 0, 0, 1, 1},
    {&__pyx_n_s_new_short_day_dict, __pyx_k_new_short_day_dict, sizeof(__pyx_k_new_short_day_dict), 0, 0, 1, 1},
    {&__pyx_n_s_new_stock_dict, __pyx_k_new_stock_dict, sizeof(__pyx_k_new_stock_dict), 0, 0, 1, 1},
    {&__pyx_n_s_new_stock_thr_date, __pyx_k_new_stock_thr_date, sizeof(__pyx_k_new_stock_thr_date), 0, 0, 1, 1},
    {&__pyx_n_s_new_thr, __pyx_k_new_thr, sizeof(__pyx_k_new_thr), 0, 0, 1, 1},
    {&__pyx_n_s_next_session, __pyx_k_next_session, sizeof(__pyx_k_next_session), 0, 0, 1, 1},
    {&__pyx_n_s_non_serializable_attrs, __pyx_k_non_serializable_attrs, sizeof(__pyx_k_non_serializable_attrs), 0, 0, 1, 1},
    {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
    {&__pyx_n_s_normed_cmap, __pyx_k_normed_cmap, sizeof(__pyx_k_normed_cmap), 0, 0, 1, 1},
    {&__pyx_n_s_not, __pyx_k_not, sizeof(__pyx_k_not), 0, 0, 1, 1},
    {&__pyx_n_s_now_datetime, __pyx_k_now_datetime, sizeof(__pyx_k_now_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_now_price, __pyx_k_now_price, sizeof(__pyx_k_now_price), 0, 0, 1, 1},
    {&__pyx_n_s_num_k, __pyx_k_num_k, sizeof(__pyx_k_num_k), 0, 0, 1, 1},
    {&__pyx_n_s_num_quantile, __pyx_k_num_quantile, sizeof(__pyx_k_num_quantile), 0, 0, 1, 1},
    {&__pyx_n_s_num_rank, __pyx_k_num_rank, sizeof(__pyx_k_num_rank), 0, 0, 1, 1},
    {&__pyx_n_s_num_rows, __pyx_k_num_rows, sizeof(__pyx_k_num_rows), 0, 0, 1, 1},
    {&__pyx_n_s_num_tr, __pyx_k_num_tr, sizeof(__pyx_k_num_tr), 0, 0, 1, 1},
    {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
    {&__pyx_n_s_objs, __pyx_k_objs, sizeof(__pyx_k_objs), 0, 0, 1, 1},
    {&__pyx_n_s_opacity, __pyx_k_opacity, sizeof(__pyx_k_opacity), 0, 0, 1, 1},
    {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
    {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
    {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1},
    {&__pyx_n_s_or, __pyx_k_or, sizeof(__pyx_k_or), 0, 0, 1, 1},
    {&__pyx_n_s_ori_dict, __pyx_k_ori_dict, sizeof(__pyx_k_ori_dict), 0, 0, 1, 1},
    {&__pyx_n_s_origin_df, __pyx_k_origin_df, sizeof(__pyx_k_origin_df), 0, 0, 1, 1},
    {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
    {&__pyx_n_s_output_name, __pyx_k_output_name, sizeof(__pyx_k_output_name), 0, 0, 1, 1},
    {&__pyx_n_s_outstand_share, __pyx_k_outstand_share, sizeof(__pyx_k_outstand_share), 0, 0, 1, 1},
    {&__pyx_n_s_overlap, __pyx_k_overlap, sizeof(__pyx_k_overlap), 0, 0, 1, 1},
    {&__pyx_n_s_overlap_bar_line, __pyx_k_overlap_bar_line, sizeof(__pyx_k_overlap_bar_line), 0, 0, 1, 1},
    {&__pyx_n_s_overlap_kline_line, __pyx_k_overlap_kline_line, sizeof(__pyx_k_overlap_kline_line), 0, 0, 1, 1},
    {&__pyx_n_s_pacoSelectStrategy, __pyx_k_pacoSelectStrategy, sizeof(__pyx_k_pacoSelectStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_pacoSelectStrategy___init, __pyx_k_pacoSelectStrategy___init, sizeof(__pyx_k_pacoSelectStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_pacoSelectStrategy_getPotentialC, __pyx_k_pacoSelectStrategy_getPotentialC, sizeof(__pyx_k_pacoSelectStrategy_getPotentialC), 0, 0, 1, 1},
    {&__pyx_n_s_pacoSelectStrategy_getPotentialI, __pyx_k_pacoSelectStrategy_getPotentialI, sizeof(__pyx_k_pacoSelectStrategy_getPotentialI), 0, 0, 1, 1},
    {&__pyx_n_s_pacoSelectStrategy_getPotentialL, __pyx_k_pacoSelectStrategy_getPotentialL, sizeof(__pyx_k_pacoSelectStrategy_getPotentialL), 0, 0, 1, 1},
    {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1},
    {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
    {&__pyx_n_s_pd, __pyx_k_pd, sizeof(__pyx_k_pd), 0, 0, 1, 1},
    {&__pyx_kp_s_pd_DataFrame, __pyx_k_pd_DataFrame, sizeof(__pyx_k_pd_DataFrame), 0, 0, 1, 0},
    {&__pyx_kp_s_pd_DataFrame_2, __pyx_k_pd_DataFrame_2, sizeof(__pyx_k_pd_DataFrame_2), 0, 0, 1, 0},
    {&__pyx_n_s_per_row_num, __pyx_k_per_row_num, sizeof(__pyx_k_per_row_num), 0, 0, 1, 1},
    {&__pyx_n_s_plot, __pyx_k_plot, sizeof(__pyx_k_plot), 0, 0, 1, 1},
    {&__pyx_n_s_plotHoldNumberDecrease, __pyx_k_plotHoldNumberDecrease, sizeof(__pyx_k_plotHoldNumberDecrease), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdConceptTable, __pyx_k_plotHotColdConceptTable, sizeof(__pyx_k_plotHotColdConceptTable), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdFutureTable, __pyx_k_plotHotColdFutureTable, sizeof(__pyx_k_plotHotColdFutureTable), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdIndexTable, __pyx_k_plotHotColdIndexTable, sizeof(__pyx_k_plotHotColdIndexTable), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdIndustryConceptFreque, __pyx_k_plotHotColdIndustryConceptFreque, sizeof(__pyx_k_plotHotColdIndustryConceptFreque), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdIndustryTable, __pyx_k_plotHotColdIndustryTable, sizeof(__pyx_k_plotHotColdIndustryTable), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdStockTable, __pyx_k_plotHotColdStockTable, sizeof(__pyx_k_plotHotColdStockTable), 0, 0, 1, 1},
    {&__pyx_n_s_plotHotColdTables, __pyx_k_plotHotColdTables, sizeof(__pyx_k_plotHotColdTables), 0, 0, 1, 1},
    {&__pyx_n_s_plotKline, __pyx_k_plotKline, sizeof(__pyx_k_plotKline), 0, 0, 1, 1},
    {&__pyx_n_s_plotKlineMpl, __pyx_k_plotKlineMpl, sizeof(__pyx_k_plotKlineMpl), 0, 0, 1, 1},
    {&__pyx_n_s_plotStockUplimtLadder, __pyx_k_plotStockUplimtLadder, sizeof(__pyx_k_plotStockUplimtLadder), 0, 0, 1, 1},
    {&__pyx_n_s_plotStrategyFigure, __pyx_k_plotStrategyFigure, sizeof(__pyx_k_plotStrategyFigure), 0, 0, 1, 1},
    {&__pyx_n_s_plotTablePandas, __pyx_k_plotTablePandas, sizeof(__pyx_k_plotTablePandas), 0, 0, 1, 1},
    {&__pyx_n_s_plotTop10Amplitude, __pyx_k_plotTop10Amplitude, sizeof(__pyx_k_plotTop10Amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_plotTop10UpLimit, __pyx_k_plotTop10UpLimit, sizeof(__pyx_k_plotTop10UpLimit), 0, 0, 1, 1},
    {&__pyx_n_s_plotTradeDistributionLen, __pyx_k_plotTradeDistributionLen, sizeof(__pyx_k_plotTradeDistributionLen), 0, 0, 1, 1},
    {&__pyx_n_s_plotWaveDownRank, __pyx_k_plotWaveDownRank, sizeof(__pyx_k_plotWaveDownRank), 0, 0, 1, 1},
    {&__pyx_n_s_plotWaveUpRank, __pyx_k_plotWaveUpRank, sizeof(__pyx_k_plotWaveUpRank), 0, 0, 1, 1},
    {&__pyx_n_s_plot_df, __pyx_k_plot_df, sizeof(__pyx_k_plot_df), 0, 0, 1, 1},
    {&__pyx_n_s_plottable, __pyx_k_plottable, sizeof(__pyx_k_plottable), 0, 0, 1, 1},
    {&__pyx_n_s_plottable_cmap, __pyx_k_plottable_cmap, sizeof(__pyx_k_plottable_cmap), 0, 0, 1, 1},
    {&__pyx_n_s_plt, __pyx_k_plt, sizeof(__pyx_k_plt), 0, 0, 1, 1},
    {&__pyx_kp_u_png, __pyx_k_png, sizeof(__pyx_k_png), 0, 1, 0, 0},
    {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
    {&__pyx_n_s_pos_left, __pyx_k_pos_left, sizeof(__pyx_k_pos_left), 0, 0, 1, 1},
    {&__pyx_n_s_pos_right, __pyx_k_pos_right, sizeof(__pyx_k_pos_right), 0, 0, 1, 1},
    {&__pyx_n_s_pos_top, __pyx_k_pos_top, sizeof(__pyx_k_pos_top), 0, 0, 1, 1},
    {&__pyx_n_s_positive_infinity, __pyx_k_positive_infinity, sizeof(__pyx_k_positive_infinity), 0, 0, 1, 1},
    {&__pyx_n_s_pre_close, __pyx_k_pre_close, sizeof(__pyx_k_pre_close), 0, 0, 1, 1},
    {&__pyx_kp_u_pre_close_equal_zero_when_date, __pyx_k_pre_close_equal_zero_when_date, sizeof(__pyx_k_pre_close_equal_zero_when_date), 0, 1, 0, 0},
    {&__pyx_n_s_pre_fig_row, __pyx_k_pre_fig_row, sizeof(__pyx_k_pre_fig_row), 0, 0, 1, 1},
    {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
    {&__pyx_n_s_prev_date, __pyx_k_prev_date, sizeof(__pyx_k_prev_date), 0, 0, 1, 1},
    {&__pyx_n_s_previous, __pyx_k_previous, sizeof(__pyx_k_previous), 0, 0, 1, 1},
    {&__pyx_n_s_previous_session, __pyx_k_previous_session, sizeof(__pyx_k_previous_session), 0, 0, 1, 1},
    {&__pyx_n_s_price, __pyx_k_price, sizeof(__pyx_k_price), 0, 0, 1, 1},
    {&__pyx_n_s_price_amplitude, __pyx_k_price_amplitude, sizeof(__pyx_k_price_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_price_down_ratio, __pyx_k_price_down_ratio, sizeof(__pyx_k_price_down_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_price_quantile, __pyx_k_price_quantile, sizeof(__pyx_k_price_quantile), 0, 0, 1, 1},
    {&__pyx_n_s_price_up_ratio, __pyx_k_price_up_ratio, sizeof(__pyx_k_price_up_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
    {&__pyx_n_s_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 0, 1, 1},
    {&__pyx_n_s_product_name, __pyx_k_product_name, sizeof(__pyx_k_product_name), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy, __pyx_k_publishStrategy, sizeof(__pyx_k_publishStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_publishStrategy_2, __pyx_k_publishStrategy_2, sizeof(__pyx_k_publishStrategy_2), 0, 0, 1, 0},
    {&__pyx_n_s_publishStrategy___getStockLadder, __pyx_k_publishStrategy___getStockLadder, sizeof(__pyx_k_publishStrategy___getStockLadder), 0, 0, 1, 1},
    {&__pyx_kp_s_publishStrategy___init, __pyx_k_publishStrategy___init, sizeof(__pyx_k_publishStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_publishStrategy__getStockLadder, __pyx_k_publishStrategy__getStockLadder, sizeof(__pyx_k_publishStrategy__getStockLadder), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getConceptHotTab, __pyx_k_publishStrategy_getConceptHotTab, sizeof(__pyx_k_publishStrategy_getConceptHotTab), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getFutureHotTabl, __pyx_k_publishStrategy_getFutureHotTabl, sizeof(__pyx_k_publishStrategy_getFutureHotTabl), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getIndexHotTable, __pyx_k_publishStrategy_getIndexHotTable, sizeof(__pyx_k_publishStrategy_getIndexHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getIndustryConce, __pyx_k_publishStrategy_getIndustryConce, sizeof(__pyx_k_publishStrategy_getIndustryConce), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getIndustryHotTa, __pyx_k_publishStrategy_getIndustryHotTa, sizeof(__pyx_k_publishStrategy_getIndustryHotTa), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getSingleStockWa, __pyx_k_publishStrategy_getSingleStockWa, sizeof(__pyx_k_publishStrategy_getSingleStockWa), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getSingleStockWa_2, __pyx_k_publishStrategy_getSingleStockWa_2, sizeof(__pyx_k_publishStrategy_getSingleStockWa_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getSingleStockWa_3, __pyx_k_publishStrategy_getSingleStockWa_3, sizeof(__pyx_k_publishStrategy_getSingleStockWa_3), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockHoldNumb, __pyx_k_publishStrategy_getStockHoldNumb, sizeof(__pyx_k_publishStrategy_getStockHoldNumb), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockHoldNumb_2, __pyx_k_publishStrategy_getStockHoldNumb_2, sizeof(__pyx_k_publishStrategy_getStockHoldNumb_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockHotTable, __pyx_k_publishStrategy_getStockHotTable, sizeof(__pyx_k_publishStrategy_getStockHotTable), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockLadderTa, __pyx_k_publishStrategy_getStockLadderTa, sizeof(__pyx_k_publishStrategy_getStockLadderTa), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockProperty, __pyx_k_publishStrategy_getStockProperty, sizeof(__pyx_k_publishStrategy_getStockProperty), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockProperty_2, __pyx_k_publishStrategy_getStockProperty_2, sizeof(__pyx_k_publishStrategy_getStockProperty_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockProperty_3, __pyx_k_publishStrategy_getStockProperty_3, sizeof(__pyx_k_publishStrategy_getStockProperty_3), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockWavePric, __pyx_k_publishStrategy_getStockWavePric, sizeof(__pyx_k_publishStrategy_getStockWavePric), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStockWavePric_2, __pyx_k_publishStrategy_getStockWavePric_2, sizeof(__pyx_k_publishStrategy_getStockWavePric_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getStrategyDataA, __pyx_k_publishStrategy_getStrategyDataA, sizeof(__pyx_k_publishStrategy_getStrategyDataA), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getTradeDayChang, __pyx_k_publishStrategy_getTradeDayChang, sizeof(__pyx_k_publishStrategy_getTradeDayChang), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getTradeDayChang_2, __pyx_k_publishStrategy_getTradeDayChang_2, sizeof(__pyx_k_publishStrategy_getTradeDayChang_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getTradeDistribu, __pyx_k_publishStrategy_getTradeDistribu, sizeof(__pyx_k_publishStrategy_getTradeDistribu), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getTradeDistribu_2, __pyx_k_publishStrategy_getTradeDistribu_2, sizeof(__pyx_k_publishStrategy_getTradeDistribu_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_getTradeDistribu_3, __pyx_k_publishStrategy_getTradeDistribu_3, sizeof(__pyx_k_publishStrategy_getTradeDistribu_3), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_reset, __pyx_k_publishStrategy_reset, sizeof(__pyx_k_publishStrategy_reset), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_stockSingleStock, __pyx_k_publishStrategy_stockSingleStock, sizeof(__pyx_k_publishStrategy_stockSingleStock), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_stockSingleStock_2, __pyx_k_publishStrategy_stockSingleStock_2, sizeof(__pyx_k_publishStrategy_stockSingleStock_2), 0, 0, 1, 1},
    {&__pyx_n_s_publishStrategy_update_hot_table, __pyx_k_publishStrategy_update_hot_table, sizeof(__pyx_k_publishStrategy_update_hot_table), 0, 0, 1, 1},
    {&__pyx_n_s_publish_strategy, __pyx_k_publish_strategy, sizeof(__pyx_k_publish_strategy), 0, 0, 1, 1},
    {&__pyx_n_s_pyecharts, __pyx_k_pyecharts, sizeof(__pyx_k_pyecharts), 0, 0, 1, 1},
    {&__pyx_n_s_pyecharts_charts, __pyx_k_pyecharts_charts, sizeof(__pyx_k_pyecharts_charts), 0, 0, 1, 1},
    {&__pyx_n_s_pyecharts_commons_utils, __pyx_k_pyecharts_commons_utils, sizeof(__pyx_k_pyecharts_commons_utils), 0, 0, 1, 1},
    {&__pyx_n_s_pyecharts_globals, __pyx_k_pyecharts_globals, sizeof(__pyx_k_pyecharts_globals), 0, 0, 1, 1},
    {&__pyx_n_s_pyecharts_render, __pyx_k_pyecharts_render, sizeof(__pyx_k_pyecharts_render), 0, 0, 1, 1},
    {&__pyx_n_s_pyplot, __pyx_k_pyplot, sizeof(__pyx_k_pyplot), 0, 0, 1, 1},
    {&__pyx_n_s_qfq, __pyx_k_qfq, sizeof(__pyx_k_qfq), 0, 0, 1, 1},
    {&__pyx_n_s_qfq_up_rate, __pyx_k_qfq_up_rate, sizeof(__pyx_k_qfq_up_rate), 0, 0, 1, 1},
    {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
    {&__pyx_n_s_quantile_amplitude_tr, __pyx_k_quantile_amplitude_tr, sizeof(__pyx_k_quantile_amplitude_tr), 0, 0, 1, 1},
    {&__pyx_n_s_quantile_tr, __pyx_k_quantile_tr, sizeof(__pyx_k_quantile_tr), 0, 0, 1, 1},
    {&__pyx_n_s_quantile_tr_max, __pyx_k_quantile_tr_max, sizeof(__pyx_k_quantile_tr_max), 0, 0, 1, 1},
    {&__pyx_n_s_quantile_tr_min, __pyx_k_quantile_tr_min, sizeof(__pyx_k_quantile_tr_min), 0, 0, 1, 1},
    {&__pyx_n_s_quarter, __pyx_k_quarter, sizeof(__pyx_k_quarter), 0, 0, 1, 1},
    {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
    {&__pyx_n_s_query_date, __pyx_k_query_date, sizeof(__pyx_k_query_date), 0, 0, 1, 1},
    {&__pyx_n_s_query_date_str, __pyx_k_query_date_str, sizeof(__pyx_k_query_date_str), 0, 0, 1, 1},
    {&__pyx_n_s_query_stock_df_dict, __pyx_k_query_stock_df_dict, sizeof(__pyx_k_query_stock_df_dict), 0, 0, 1, 1},
    {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
    {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_n_s_range_end, __pyx_k_range_end, sizeof(__pyx_k_range_end), 0, 0, 1, 1},
    {&__pyx_n_s_rank_level, __pyx_k_rank_level, sizeof(__pyx_k_rank_level), 0, 0, 1, 1},
    {&__pyx_n_s_rate_hist_dict, __pyx_k_rate_hist_dict, sizeof(__pyx_k_rate_hist_dict), 0, 0, 1, 1},
    {&__pyx_n_s_rate_hist_dict_len, __pyx_k_rate_hist_dict_len, sizeof(__pyx_k_rate_hist_dict_len), 0, 0, 1, 1},
    {&__pyx_n_s_rate_hist_list, __pyx_k_rate_hist_list, sizeof(__pyx_k_rate_hist_list), 0, 0, 1, 1},
    {&__pyx_n_s_ratio_limit, __pyx_k_ratio_limit, sizeof(__pyx_k_ratio_limit), 0, 0, 1, 1},
    {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1},
    {&__pyx_n_s_rcParams, __pyx_k_rcParams, sizeof(__pyx_k_rcParams), 0, 0, 1, 1},
    {&__pyx_n_s_read_sql, __pyx_k_read_sql, sizeof(__pyx_k_read_sql), 0, 0, 1, 1},
    {&__pyx_n_s_rely_strategy_key_name, __pyx_k_rely_strategy_key_name, sizeof(__pyx_k_rely_strategy_key_name), 0, 0, 1, 1},
    {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
    {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
    {&__pyx_n_s_repeat_compute, __pyx_k_repeat_compute, sizeof(__pyx_k_repeat_compute), 0, 0, 1, 1},
    {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
    {&__pyx_n_s_report_date, __pyx_k_report_date, sizeof(__pyx_k_report_date), 0, 0, 1, 1},
    {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
    {&__pyx_n_s_res_list, __pyx_k_res_list, sizeof(__pyx_k_res_list), 0, 0, 1, 1},
    {&__pyx_n_s_res_names, __pyx_k_res_names, sizeof(__pyx_k_res_names), 0, 0, 1, 1},
    {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
    {&__pyx_n_s_reset_index, __pyx_k_reset_index, sizeof(__pyx_k_reset_index), 0, 0, 1, 1},
    {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
    {&__pyx_n_s_result_df, __pyx_k_result_df, sizeof(__pyx_k_result_df), 0, 0, 1, 1},
    {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
    {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
    {&__pyx_n_s_return_df, __pyx_k_return_df, sizeof(__pyx_k_return_df), 0, 0, 1, 1},
    {&__pyx_n_s_return_dict, __pyx_k_return_dict, sizeof(__pyx_k_return_dict), 0, 0, 1, 1},
    {&__pyx_n_s_returnfig, __pyx_k_returnfig, sizeof(__pyx_k_returnfig), 0, 0, 1, 1},
    {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
    {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
    {&__pyx_n_s_right_ax, __pyx_k_right_ax, sizeof(__pyx_k_right_ax), 0, 0, 1, 1},
    {&__pyx_n_s_right_index, __pyx_k_right_index, sizeof(__pyx_k_right_index), 0, 0, 1, 1},
    {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
    {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
    {&__pyx_kp_u_row_inch, __pyx_k_row_inch, sizeof(__pyx_k_row_inch), 0, 1, 0, 0},
    {&__pyx_n_s_row_inch_2, __pyx_k_row_inch_2, sizeof(__pyx_k_row_inch_2), 0, 0, 1, 1},
    {&__pyx_n_s_row_num, __pyx_k_row_num, sizeof(__pyx_k_row_num), 0, 0, 1, 1},
    {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
    {&__pyx_n_s_rsi, __pyx_k_rsi, sizeof(__pyx_k_rsi), 0, 0, 1, 1},
    {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
    {&__pyx_n_s_saveToImg, __pyx_k_saveToImg, sizeof(__pyx_k_saveToImg), 0, 0, 1, 1},
    {&__pyx_n_s_save_file, __pyx_k_save_file, sizeof(__pyx_k_save_file), 0, 0, 1, 1},
    {&__pyx_n_s_save_json, __pyx_k_save_json, sizeof(__pyx_k_save_json), 0, 0, 1, 1},
    {&__pyx_n_s_save_strategy, __pyx_k_save_strategy, sizeof(__pyx_k_save_strategy), 0, 0, 1, 1},
    {&__pyx_n_s_savefig, __pyx_k_savefig, sizeof(__pyx_k_savefig), 0, 0, 1, 1},
    {&__pyx_n_s_secondary_y, __pyx_k_secondary_y, sizeof(__pyx_k_secondary_y), 0, 0, 1, 1},
    {&__pyx_n_s_selectByArea, __pyx_k_selectByArea, sizeof(__pyx_k_selectByArea), 0, 0, 1, 1},
    {&__pyx_n_s_selectByConcept, __pyx_k_selectByConcept, sizeof(__pyx_k_selectByConcept), 0, 0, 1, 1},
    {&__pyx_n_s_selectByIndustry, __pyx_k_selectByIndustry, sizeof(__pyx_k_selectByIndustry), 0, 0, 1, 1},
    {&__pyx_n_s_selectByKeyProduct, __pyx_k_selectByKeyProduct, sizeof(__pyx_k_selectByKeyProduct), 0, 0, 1, 1},
    {&__pyx_n_s_selectByMarket, __pyx_k_selectByMarket, sizeof(__pyx_k_selectByMarket), 0, 0, 1, 1},
    {&__pyx_n_s_selectByMarketCap, __pyx_k_selectByMarketCap, sizeof(__pyx_k_selectByMarketCap), 0, 0, 1, 1},
    {&__pyx_n_s_selectByNameWord, __pyx_k_selectByNameWord, sizeof(__pyx_k_selectByNameWord), 0, 0, 1, 1},
    {&__pyx_n_s_selectByStockPrice, __pyx_k_selectByStockPrice, sizeof(__pyx_k_selectByStockPrice), 0, 0, 1, 1},
    {&__pyx_n_s_selectByStockPriceQuantile, __pyx_k_selectByStockPriceQuantile, sizeof(__pyx_k_selectByStockPriceQuantile), 0, 0, 1, 1},
    {&__pyx_n_s_selectByTechIndicator, __pyx_k_selectByTechIndicator, sizeof(__pyx_k_selectByTechIndicator), 0, 0, 1, 1},
    {&__pyx_n_s_select_code, __pyx_k_select_code, sizeof(__pyx_k_select_code), 0, 0, 1, 1},
    {&__pyx_n_s_select_df, __pyx_k_select_df, sizeof(__pyx_k_select_df), 0, 0, 1, 1},
    {&__pyx_n_s_select_market_cap_df, __pyx_k_select_market_cap_df, sizeof(__pyx_k_select_market_cap_df), 0, 0, 1, 1},
    {&__pyx_n_s_select_market_cap_stock_list, __pyx_k_select_market_cap_stock_list, sizeof(__pyx_k_select_market_cap_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_select_market_list, __pyx_k_select_market_list, sizeof(__pyx_k_select_market_list), 0, 0, 1, 1},
    {&__pyx_n_s_select_str, __pyx_k_select_str, sizeof(__pyx_k_select_str), 0, 0, 1, 1},
    {&__pyx_n_s_selection_df, __pyx_k_selection_df, sizeof(__pyx_k_selection_df), 0, 0, 1, 1},
    {&__pyx_n_s_selenium, __pyx_k_selenium, sizeof(__pyx_k_selenium), 0, 0, 1, 1},
    {&__pyx_n_s_selenium_webdriver_edge_options, __pyx_k_selenium_webdriver_edge_options, sizeof(__pyx_k_selenium_webdriver_edge_options), 0, 0, 1, 1},
    {&__pyx_n_s_selenium_webdriver_edge_service, __pyx_k_selenium_webdriver_edge_service, sizeof(__pyx_k_selenium_webdriver_edge_service), 0, 0, 1, 1},
    {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
    {&__pyx_n_s_series_name, __pyx_k_series_name, sizeof(__pyx_k_series_name), 0, 0, 1, 1},
    {&__pyx_n_s_service, __pyx_k_service, sizeof(__pyx_k_service), 0, 0, 1, 1},
    {&__pyx_n_s_session, __pyx_k_session, sizeof(__pyx_k_session), 0, 0, 1, 1},
    {&__pyx_n_s_session_offset, __pyx_k_session_offset, sizeof(__pyx_k_session_offset), 0, 0, 1, 1},
    {&__pyx_n_s_setFigureShow, __pyx_k_setFigureShow, sizeof(__pyx_k_setFigureShow), 0, 0, 1, 1},
    {&__pyx_n_s_setPlotTimeLock, __pyx_k_setPlotTimeLock, sizeof(__pyx_k_setPlotTimeLock), 0, 0, 1, 1},
    {&__pyx_n_s_setStockDataDf, __pyx_k_setStockDataDf, sizeof(__pyx_k_setStockDataDf), 0, 0, 1, 1},
    {&__pyx_n_s_setStrategyJsonFile, __pyx_k_setStrategyJsonFile, sizeof(__pyx_k_setStrategyJsonFile), 0, 0, 1, 1},
    {&__pyx_n_s_set_dpi, __pyx_k_set_dpi, sizeof(__pyx_k_set_dpi), 0, 0, 1, 1},
    {&__pyx_n_s_set_facecolor, __pyx_k_set_facecolor, sizeof(__pyx_k_set_facecolor), 0, 0, 1, 1},
    {&__pyx_n_s_set_figheight, __pyx_k_set_figheight, sizeof(__pyx_k_set_figheight), 0, 0, 1, 1},
    {&__pyx_n_s_set_figwidth, __pyx_k_set_figwidth, sizeof(__pyx_k_set_figwidth), 0, 0, 1, 1},
    {&__pyx_n_s_set_fontsize, __pyx_k_set_fontsize, sizeof(__pyx_k_set_fontsize), 0, 0, 1, 1},
    {&__pyx_n_s_set_global_opts, __pyx_k_set_global_opts, sizeof(__pyx_k_set_global_opts), 0, 0, 1, 1},
    {&__pyx_n_s_set_index, __pyx_k_set_index, sizeof(__pyx_k_set_index), 0, 0, 1, 1},
    {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
    {&__pyx_n_s_set_title, __pyx_k_set_title, sizeof(__pyx_k_set_title), 0, 0, 1, 1},
    {&__pyx_n_s_set_ylabel, __pyx_k_set_ylabel, sizeof(__pyx_k_set_ylabel), 0, 0, 1, 1},
    {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_sh_calendar, __pyx_k_sh_calendar, sizeof(__pyx_k_sh_calendar), 0, 0, 1, 1},
    {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
    {&__pyx_n_s_sheet, __pyx_k_sheet, sizeof(__pyx_k_sheet), 0, 0, 1, 1},
    {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1},
    {&__pyx_n_s_show_fig, __pyx_k_show_fig, sizeof(__pyx_k_show_fig), 0, 0, 1, 1},
    {&__pyx_n_s_show_figure, __pyx_k_show_figure, sizeof(__pyx_k_show_figure), 0, 0, 1, 1},
    {&__pyx_n_s_signalperiod, __pyx_k_signalperiod, sizeof(__pyx_k_signalperiod), 0, 0, 1, 1},
    {&__pyx_n_s_silver, __pyx_k_silver, sizeof(__pyx_k_silver), 0, 0, 1, 1},
    {&__pyx_n_s_simple_test, __pyx_k_simple_test, sizeof(__pyx_k_simple_test), 0, 0, 1, 1},
    {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1},
    {&__pyx_n_s_slowd_matype, __pyx_k_slowd_matype, sizeof(__pyx_k_slowd_matype), 0, 0, 1, 1},
    {&__pyx_n_s_slowd_period, __pyx_k_slowd_period, sizeof(__pyx_k_slowd_period), 0, 0, 1, 1},
    {&__pyx_n_s_slowk_matype, __pyx_k_slowk_matype, sizeof(__pyx_k_slowk_matype), 0, 0, 1, 1},
    {&__pyx_n_s_slowk_period, __pyx_k_slowk_period, sizeof(__pyx_k_slowk_period), 0, 0, 1, 1},
    {&__pyx_n_s_slowperiod, __pyx_k_slowperiod, sizeof(__pyx_k_slowperiod), 0, 0, 1, 1},
    {&__pyx_n_s_snapshot, __pyx_k_snapshot, sizeof(__pyx_k_snapshot), 0, 0, 1, 1},
    {&__pyx_n_s_snapshot_selenium, __pyx_k_snapshot_selenium, sizeof(__pyx_k_snapshot_selenium), 0, 0, 1, 1},
    {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1},
    {&__pyx_n_s_sort_values, __pyx_k_sort_values, sizeof(__pyx_k_sort_values), 0, 0, 1, 1},
    {&__pyx_n_s_sorted_df, __pyx_k_sorted_df, sizeof(__pyx_k_sorted_df), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_spire, __pyx_k_spire, sizeof(__pyx_k_spire), 0, 0, 1, 1},
    {&__pyx_n_s_spire_xls, __pyx_k_spire_xls, sizeof(__pyx_k_spire_xls), 0, 0, 1, 1},
    {&__pyx_n_s_spire_xls_common, __pyx_k_spire_xls_common, sizeof(__pyx_k_spire_xls_common), 0, 0, 1, 1},
    {&__pyx_n_s_spires, __pyx_k_spires, sizeof(__pyx_k_spires), 0, 0, 1, 1},
    {&__pyx_n_s_spires_common, __pyx_k_spires_common, sizeof(__pyx_k_spires_common), 0, 0, 1, 1},
    {&__pyx_n_s_splitStockData, __pyx_k_splitStockData, sizeof(__pyx_k_splitStockData), 0, 0, 1, 1},
    {&__pyx_n_s_split_number, __pyx_k_split_number, sizeof(__pyx_k_split_number), 0, 0, 1, 1},
    {&__pyx_n_s_splitext, __pyx_k_splitext, sizeof(__pyx_k_splitext), 0, 0, 1, 1},
    {&__pyx_n_s_splitline_opts, __pyx_k_splitline_opts, sizeof(__pyx_k_splitline_opts), 0, 0, 1, 1},
    {&__pyx_n_s_sql_query, __pyx_k_sql_query, sizeof(__pyx_k_sql_query), 0, 0, 1, 1},
    {&__pyx_n_s_sqlalchemy, __pyx_k_sqlalchemy, sizeof(__pyx_k_sqlalchemy), 0, 0, 1, 1},
    {&__pyx_n_s_st_stock_dict, __pyx_k_st_stock_dict, sizeof(__pyx_k_st_stock_dict), 0, 0, 1, 1},
    {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
    {&__pyx_n_s_startWithDigit, __pyx_k_startWithDigit, sizeof(__pyx_k_startWithDigit), 0, 0, 1, 1},
    {&__pyx_n_s_start_date, __pyx_k_start_date, sizeof(__pyx_k_start_date), 0, 0, 1, 1},
    {&__pyx_n_s_start_datetime, __pyx_k_start_datetime, sizeof(__pyx_k_start_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
    {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
    {&__pyx_n_s_statement, __pyx_k_statement, sizeof(__pyx_k_statement), 0, 0, 1, 1},
    {&__pyx_n_s_stockSingleStockProperty, __pyx_k_stockSingleStockProperty, sizeof(__pyx_k_stockSingleStockProperty), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd, __pyx_k_stockTechInd, sizeof(__pyx_k_stockTechInd), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_BOLL, __pyx_k_stockTechInd_BOLL, sizeof(__pyx_k_stockTechInd_BOLL), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDL2CROWS, __pyx_k_stockTechInd_CDL2CROWS, sizeof(__pyx_k_stockTechInd_CDL2CROWS), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDL3INSIDE, __pyx_k_stockTechInd_CDL3INSIDE, sizeof(__pyx_k_stockTechInd_CDL3INSIDE), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDL3STARSINSOUTH, __pyx_k_stockTechInd_CDL3STARSINSOUTH, sizeof(__pyx_k_stockTechInd_CDL3STARSINSOUTH), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDL3WHITESOLDIERS, __pyx_k_stockTechInd_CDL3WHITESOLDIERS, sizeof(__pyx_k_stockTechInd_CDL3WHITESOLDIERS), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLENGULFING, __pyx_k_stockTechInd_CDLENGULFING, sizeof(__pyx_k_stockTechInd_CDLENGULFING), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLHAMMER, __pyx_k_stockTechInd_CDLHAMMER, sizeof(__pyx_k_stockTechInd_CDLHAMMER), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLHARAMI, __pyx_k_stockTechInd_CDLHARAMI, sizeof(__pyx_k_stockTechInd_CDLHARAMI), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLMORNINGSTAR, __pyx_k_stockTechInd_CDLMORNINGSTAR, sizeof(__pyx_k_stockTechInd_CDLMORNINGSTAR), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLPIERCING, __pyx_k_stockTechInd_CDLPIERCING, sizeof(__pyx_k_stockTechInd_CDLPIERCING), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLRISEFALL3METHODS, __pyx_k_stockTechInd_CDLRISEFALL3METHODS, sizeof(__pyx_k_stockTechInd_CDLRISEFALL3METHODS), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS, __pyx_k_stockTechInd_CDLXSIDEGAP3METHODS, sizeof(__pyx_k_stockTechInd_CDLXSIDEGAP3METHODS), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_DMI, __pyx_k_stockTechInd_DMI, sizeof(__pyx_k_stockTechInd_DMI), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_EMA, __pyx_k_stockTechInd_EMA, sizeof(__pyx_k_stockTechInd_EMA), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_KDJ, __pyx_k_stockTechInd_KDJ, sizeof(__pyx_k_stockTechInd_KDJ), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_MA, __pyx_k_stockTechInd_MA, sizeof(__pyx_k_stockTechInd_MA), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_MACD, __pyx_k_stockTechInd_MACD, sizeof(__pyx_k_stockTechInd_MACD), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_MaAll, __pyx_k_stockTechInd_MaAll, sizeof(__pyx_k_stockTechInd_MaAll), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_OBV, __pyx_k_stockTechInd_OBV, sizeof(__pyx_k_stockTechInd_OBV), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_RSI, __pyx_k_stockTechInd_RSI, sizeof(__pyx_k_stockTechInd_RSI), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_WILLR, __pyx_k_stockTechInd_WILLR, sizeof(__pyx_k_stockTechInd_WILLR), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd___init, __pyx_k_stockTechInd___init, sizeof(__pyx_k_stockTechInd___init), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_setFigureShow, __pyx_k_stockTechInd_setFigureShow, sizeof(__pyx_k_stockTechInd_setFigureShow), 0, 0, 1, 1},
    {&__pyx_n_s_stockTechInd_setStockDataDf, __pyx_k_stockTechInd_setStockDataDf, sizeof(__pyx_k_stockTechInd_setStockDataDf), 0, 0, 1, 1},
    {&__pyx_n_s_stock_basic_info, __pyx_k_stock_basic_info, sizeof(__pyx_k_stock_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_basic_info_df, __pyx_k_stock_basic_info_df, sizeof(__pyx_k_stock_basic_info_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_close_price_df, __pyx_k_stock_close_price_df, sizeof(__pyx_k_stock_close_price_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_code, __pyx_k_stock_code, sizeof(__pyx_k_stock_code), 0, 0, 1, 1},
    {&__pyx_n_s_stock_code_name, __pyx_k_stock_code_name, sizeof(__pyx_k_stock_code_name), 0, 0, 1, 1},
    {&__pyx_n_s_stock_code_name_all, __pyx_k_stock_code_name_all, sizeof(__pyx_k_stock_code_name_all), 0, 0, 1, 1},
    {&__pyx_n_s_stock_concept_basic_info, __pyx_k_stock_concept_basic_info, sizeof(__pyx_k_stock_concept_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_concept_trade_day, __pyx_k_stock_concept_trade_day, sizeof(__pyx_k_stock_concept_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_data, __pyx_k_stock_data, sizeof(__pyx_k_stock_data), 0, 0, 1, 1},
    {&__pyx_n_s_stock_data_df, __pyx_k_stock_data_df, sizeof(__pyx_k_stock_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_financial_quarter, __pyx_k_stock_financial_quarter, sizeof(__pyx_k_stock_financial_quarter), 0, 0, 1, 1},
    {&__pyx_n_s_stock_financial_report, __pyx_k_stock_financial_report, sizeof(__pyx_k_stock_financial_report), 0, 0, 1, 1},
    {&__pyx_n_s_stock_hold_num_table, __pyx_k_stock_hold_num_table, sizeof(__pyx_k_stock_hold_num_table), 0, 0, 1, 1},
    {&__pyx_n_s_stock_hold_number, __pyx_k_stock_hold_number, sizeof(__pyx_k_stock_hold_number), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_basic_info, __pyx_k_stock_industry_basic_info, sizeof(__pyx_k_stock_industry_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_trade_day, __pyx_k_stock_industry_trade_day, sizeof(__pyx_k_stock_industry_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_ladder, __pyx_k_stock_ladder, sizeof(__pyx_k_stock_ladder), 0, 0, 1, 1},
    {&__pyx_n_s_stock_ladder_dict, __pyx_k_stock_ladder_dict, sizeof(__pyx_k_stock_ladder_dict), 0, 0, 1, 1},
    {&__pyx_n_s_stock_ladder_dict_yesterday, __pyx_k_stock_ladder_dict_yesterday, sizeof(__pyx_k_stock_ladder_dict_yesterday), 0, 0, 1, 1},
    {&__pyx_n_s_stock_list, __pyx_k_stock_list, sizeof(__pyx_k_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_stock_name, __pyx_k_stock_name, sizeof(__pyx_k_stock_name), 0, 0, 1, 1},
    {&__pyx_n_s_stock_query_df, __pyx_k_stock_query_df, sizeof(__pyx_k_stock_query_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_simple_info, __pyx_k_stock_simple_info, sizeof(__pyx_k_stock_simple_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tag, __pyx_k_stock_tag, sizeof(__pyx_k_stock_tag), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tmp, __pyx_k_stock_tmp, sizeof(__pyx_k_stock_tmp), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tmp_code_list, __pyx_k_stock_tmp_code_list, sizeof(__pyx_k_stock_tmp_code_list), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tmp_dict, __pyx_k_stock_tmp_dict, sizeof(__pyx_k_stock_tmp_dict), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day, __pyx_k_stock_trade_day, sizeof(__pyx_k_stock_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2024, __pyx_k_stock_trade_day_2024, sizeof(__pyx_k_stock_trade_day_2024), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_df, __pyx_k_stock_trade_day_df, sizeof(__pyx_k_stock_trade_day_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_up_limit_list_today, __pyx_k_stock_up_limit_list_today, sizeof(__pyx_k_stock_up_limit_list_today), 0, 0, 1, 1},
    {&__pyx_n_s_stock_uplimt_ladder, __pyx_k_stock_uplimt_ladder, sizeof(__pyx_k_stock_uplimt_ladder), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_down, __pyx_k_stock_wave_down, sizeof(__pyx_k_stock_wave_down), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_down_df, __pyx_k_stock_wave_down_df, sizeof(__pyx_k_stock_wave_down_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_down_dict, __pyx_k_stock_wave_down_dict, sizeof(__pyx_k_stock_wave_down_dict), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_up, __pyx_k_stock_wave_up, sizeof(__pyx_k_stock_wave_up), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_up_df, __pyx_k_stock_wave_up_df, sizeof(__pyx_k_stock_wave_up_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_wave_up_dict, __pyx_k_stock_wave_up_dict, sizeof(__pyx_k_stock_wave_up_dict), 0, 0, 1, 1},
    {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
    {&__pyx_n_s_strategyCount, __pyx_k_strategyCount, sizeof(__pyx_k_strategyCount), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_code_list, __pyx_k_strategy_code_list, sizeof(__pyx_k_strategy_code_list), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_data_df, __pyx_k_strategy_data_df, sizeof(__pyx_k_strategy_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_data_dict, __pyx_k_strategy_data_dict, sizeof(__pyx_k_strategy_data_dict), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_data_dict_2, __pyx_k_strategy_data_dict_2, sizeof(__pyx_k_strategy_data_dict_2), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_date, __pyx_k_strategy_date, sizeof(__pyx_k_strategy_date), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_img_path, __pyx_k_strategy_img_path, sizeof(__pyx_k_strategy_img_path), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_json, __pyx_k_strategy_json, sizeof(__pyx_k_strategy_json), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_json_file, __pyx_k_strategy_json_file, sizeof(__pyx_k_strategy_json_file), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_key_name, __pyx_k_strategy_key_name, sizeof(__pyx_k_strategy_key_name), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_key_name1, __pyx_k_strategy_key_name1, sizeof(__pyx_k_strategy_key_name1), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_key_name2, __pyx_k_strategy_key_name2, sizeof(__pyx_k_strategy_key_name2), 0, 0, 1, 1},
    {&__pyx_n_s_strategy_name, __pyx_k_strategy_name, sizeof(__pyx_k_strategy_name), 0, 0, 1, 1},
    {&__pyx_kp_s_strategylog_json, __pyx_k_strategylog_json, sizeof(__pyx_k_strategylog_json), 0, 0, 1, 0},
    {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1},
    {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1},
    {&__pyx_n_s_style, __pyx_k_style, sizeof(__pyx_k_style), 0, 0, 1, 1},
    {&__pyx_n_s_sub_strategy_name, __pyx_k_sub_strategy_name, sizeof(__pyx_k_sub_strategy_name), 0, 0, 1, 1},
    {&__pyx_n_s_sub_table_title, __pyx_k_sub_table_title, sizeof(__pyx_k_sub_table_title), 0, 0, 1, 1},
    {&__pyx_n_s_submit, __pyx_k_submit, sizeof(__pyx_k_submit), 0, 0, 1, 1},
    {&__pyx_n_s_subplots, __pyx_k_subplots, sizeof(__pyx_k_subplots), 0, 0, 1, 1},
    {&__pyx_n_s_subset, __pyx_k_subset, sizeof(__pyx_k_subset), 0, 0, 1, 1},
    {&__pyx_n_s_subtitle, __pyx_k_subtitle, sizeof(__pyx_k_subtitle), 0, 0, 1, 1},
    {&__pyx_n_s_succeed, __pyx_k_succeed, sizeof(__pyx_k_succeed), 0, 0, 1, 1},
    {&__pyx_n_s_suffixes, __pyx_k_suffixes, sizeof(__pyx_k_suffixes), 0, 0, 1, 1},
    {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
    {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
    {&__pyx_n_s_suspended_stock_list, __pyx_k_suspended_stock_list, sizeof(__pyx_k_suspended_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 0, 1, 1},
    {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
    {&__pyx_n_s_tab, __pyx_k_tab, sizeof(__pyx_k_tab), 0, 0, 1, 1},
    {&__pyx_kp_u_table_has_been_updated, __pyx_k_table_has_been_updated, sizeof(__pyx_k_table_has_been_updated), 0, 1, 0, 0},
    {&__pyx_kp_u_table_has_been_updated_2, __pyx_k_table_has_been_updated_2, sizeof(__pyx_k_table_has_been_updated_2), 0, 1, 0, 0},
    {&__pyx_kp_u_table_has_not_been_updated, __pyx_k_table_has_not_been_updated, sizeof(__pyx_k_table_has_not_been_updated), 0, 1, 0, 0},
    {&__pyx_n_s_table_name, __pyx_k_table_name, sizeof(__pyx_k_table_name), 0, 0, 1, 1},
    {&__pyx_n_s_table_rows, __pyx_k_table_rows, sizeof(__pyx_k_table_rows), 0, 0, 1, 1},
    {&__pyx_n_s_table_save_excel_path, __pyx_k_table_save_excel_path, sizeof(__pyx_k_table_save_excel_path), 0, 0, 1, 1},
    {&__pyx_n_s_table_save_path, __pyx_k_table_save_path, sizeof(__pyx_k_table_save_path), 0, 0, 1, 1},
    {&__pyx_n_s_table_save_png_path, __pyx_k_table_save_png_path, sizeof(__pyx_k_table_save_png_path), 0, 0, 1, 1},
    {&__pyx_n_s_table_title, __pyx_k_table_title, sizeof(__pyx_k_table_title), 0, 0, 1, 1},
    {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1},
    {&__pyx_n_s_talib, __pyx_k_talib, sizeof(__pyx_k_talib), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock, __pyx_k_tbstock, sizeof(__pyx_k_tbstock), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_dataAcquisition_models, __pyx_k_tbstock_dataAcquisition_models, sizeof(__pyx_k_tbstock_dataAcquisition_models), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_dataManagement_dataPrepr, __pyx_k_tbstock_dataManagement_dataPrepr, sizeof(__pyx_k_tbstock_dataManagement_dataPrepr), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_k_tbstock_tradeStrategy_stockStrat, sizeof(__pyx_k_tbstock_tradeStrategy_stockStrat), 0, 0, 1, 1},
    {&__pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_k_tbstock_tradeStrategy_stockStrat_2, sizeof(__pyx_k_tbstock_tradeStrategy_stockStrat_2), 0, 0, 1, 0},
    {&__pyx_n_s_tbstock_utils, __pyx_k_tbstock_utils, sizeof(__pyx_k_tbstock_utils), 0, 0, 1, 1},
    {&__pyx_n_s_tech_ind, __pyx_k_tech_ind, sizeof(__pyx_k_tech_ind), 0, 0, 1, 1},
    {&__pyx_n_s_tech_ind_method, __pyx_k_tech_ind_method, sizeof(__pyx_k_tech_ind_method), 0, 0, 1, 1},
    {&__pyx_n_s_tech_index, __pyx_k_tech_index, sizeof(__pyx_k_tech_index), 0, 0, 1, 1},
    {&__pyx_n_s_tech_name, __pyx_k_tech_name, sizeof(__pyx_k_tech_name), 0, 0, 1, 1},
    {&__pyx_n_s_technicalStockStrategy, __pyx_k_technicalStockStrategy, sizeof(__pyx_k_technicalStockStrategy), 0, 0, 1, 1},
    {&__pyx_kp_s_technicalStockStrategy___init, __pyx_k_technicalStockStrategy___init, sizeof(__pyx_k_technicalStockStrategy___init), 0, 0, 1, 0},
    {&__pyx_n_s_technicalStockStrategy_getStockB, __pyx_k_technicalStockStrategy_getStockB, sizeof(__pyx_k_technicalStockStrategy_getStockB), 0, 0, 1, 1},
    {&__pyx_n_s_technicalStockStrategy_judgeSing, __pyx_k_technicalStockStrategy_judgeSing, sizeof(__pyx_k_technicalStockStrategy_judgeSing), 0, 0, 1, 1},
    {&__pyx_n_s_technicalStockStrategy_selectByT, __pyx_k_technicalStockStrategy_selectByT, sizeof(__pyx_k_technicalStockStrategy_selectByT), 0, 0, 1, 1},
    {&__pyx_n_s_temp_dict, __pyx_k_temp_dict, sizeof(__pyx_k_temp_dict), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_n_s_test_select_stock, __pyx_k_test_select_stock, sizeof(__pyx_k_test_select_stock), 0, 0, 1, 1},
    {&__pyx_n_s_text_cmap, __pyx_k_text_cmap, sizeof(__pyx_k_text_cmap), 0, 0, 1, 1},
    {&__pyx_n_s_textprops, __pyx_k_textprops, sizeof(__pyx_k_textprops), 0, 0, 1, 1},
    {&__pyx_n_s_theme, __pyx_k_theme, sizeof(__pyx_k_theme), 0, 0, 1, 1},
    {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1},
    {&__pyx_n_s_tight, __pyx_k_tight, sizeof(__pyx_k_tight), 0, 0, 1, 1},
    {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
    {&__pyx_kp_u_time_cost, __pyx_k_time_cost, sizeof(__pyx_k_time_cost), 0, 1, 0, 0},
    {&__pyx_kp_u_time_cost_2, __pyx_k_time_cost_2, sizeof(__pyx_k_time_cost_2), 0, 1, 0, 0},
    {&__pyx_n_s_time_key, __pyx_k_time_key, sizeof(__pyx_k_time_key), 0, 0, 1, 1},
    {&__pyx_n_s_time_value, __pyx_k_time_value, sizeof(__pyx_k_time_value), 0, 0, 1, 1},
    {&__pyx_n_s_timeperiod, __pyx_k_timeperiod, sizeof(__pyx_k_timeperiod), 0, 0, 1, 1},
    {&__pyx_n_s_times, __pyx_k_times, sizeof(__pyx_k_times), 0, 0, 1, 1},
    {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
    {&__pyx_n_s_title_opts, __pyx_k_title_opts, sizeof(__pyx_k_title_opts), 0, 0, 1, 1},
    {&__pyx_kp_u_to, __pyx_k_to, sizeof(__pyx_k_to), 0, 1, 0, 0},
    {&__pyx_n_s_to_datetime, __pyx_k_to_datetime, sizeof(__pyx_k_to_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_to_dict, __pyx_k_to_dict, sizeof(__pyx_k_to_dict), 0, 0, 1, 1},
    {&__pyx_n_s_to_list, __pyx_k_to_list, sizeof(__pyx_k_to_list), 0, 0, 1, 1},
    {&__pyx_n_s_today_condition_amount, __pyx_k_today_condition_amount, sizeof(__pyx_k_today_condition_amount), 0, 0, 1, 1},
    {&__pyx_n_s_tolist, __pyx_k_tolist, sizeof(__pyx_k_tolist), 0, 0, 1, 1},
    {&__pyx_n_s_tooltip_opts, __pyx_k_tooltip_opts, sizeof(__pyx_k_tooltip_opts), 0, 0, 1, 1},
    {&__pyx_n_s_top_10_amplitude, __pyx_k_top_10_amplitude, sizeof(__pyx_k_top_10_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_top_10_amplitude_dict, __pyx_k_top_10_amplitude_dict, sizeof(__pyx_k_top_10_amplitude_dict), 0, 0, 1, 1},
    {&__pyx_n_s_top_10_up_limit, __pyx_k_top_10_up_limit, sizeof(__pyx_k_top_10_up_limit), 0, 0, 1, 1},
    {&__pyx_n_s_top_10_up_limit_dict, __pyx_k_top_10_up_limit_dict, sizeof(__pyx_k_top_10_up_limit_dict), 0, 0, 1, 1},
    {&__pyx_n_s_top_amplitude, __pyx_k_top_amplitude, sizeof(__pyx_k_top_amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_top_up_limit, __pyx_k_top_up_limit, sizeof(__pyx_k_top_up_limit), 0, 0, 1, 1},
    {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
    {&__pyx_n_s_total_operate_revenue_tb, __pyx_k_total_operate_revenue_tb, sizeof(__pyx_k_total_operate_revenue_tb), 0, 0, 1, 1},
    {&__pyx_n_s_tqdm, __pyx_k_tqdm, sizeof(__pyx_k_tqdm), 0, 0, 1, 1},
    {&__pyx_n_s_trade_date, __pyx_k_trade_date, sizeof(__pyx_k_trade_date), 0, 0, 1, 1},
    {&__pyx_n_s_trade_day_df, __pyx_k_trade_day_df, sizeof(__pyx_k_trade_day_df), 0, 0, 1, 1},
    {&__pyx_n_s_trade_day_len, __pyx_k_trade_day_len, sizeof(__pyx_k_trade_day_len), 0, 0, 1, 1},
    {&__pyx_n_s_trade_day_table_name, __pyx_k_trade_day_table_name, sizeof(__pyx_k_trade_day_table_name), 0, 0, 1, 1},
    {&__pyx_n_s_trade_distribution_code, __pyx_k_trade_distribution_code, sizeof(__pyx_k_trade_distribution_code), 0, 0, 1, 1},
    {&__pyx_n_s_trade_distribution_len, __pyx_k_trade_distribution_len, sizeof(__pyx_k_trade_distribution_len), 0, 0, 1, 1},
    {&__pyx_kp_s_trade_distribution_len_html, __pyx_k_trade_distribution_len_html, sizeof(__pyx_k_trade_distribution_len_html), 0, 0, 1, 0},
    {&__pyx_n_s_transform, __pyx_k_transform, sizeof(__pyx_k_transform), 0, 0, 1, 1},
    {&__pyx_n_s_trigger, __pyx_k_trigger, sizeof(__pyx_k_trigger), 0, 0, 1, 1},
    {&__pyx_n_s_trigger_date, __pyx_k_trigger_date, sizeof(__pyx_k_trigger_date), 0, 0, 1, 1},
    {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
    {&__pyx_n_s_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 0, 1, 1},
    {&__pyx_n_s_type_name, __pyx_k_type_name, sizeof(__pyx_k_type_name), 0, 0, 1, 1},
    {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
    {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
    {&__pyx_n_s_union_list, __pyx_k_union_list, sizeof(__pyx_k_union_list), 0, 0, 1, 1},
    {&__pyx_n_s_union_stock_list, __pyx_k_union_stock_list, sizeof(__pyx_k_union_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1},
    {&__pyx_n_s_upLimit_times, __pyx_k_upLimit_times, sizeof(__pyx_k_upLimit_times), 0, 0, 1, 1},
    {&__pyx_n_s_up_limit, __pyx_k_up_limit, sizeof(__pyx_k_up_limit), 0, 0, 1, 1},
    {&__pyx_n_s_up_limit_stocks_list, __pyx_k_up_limit_stocks_list, sizeof(__pyx_k_up_limit_stocks_list), 0, 0, 1, 1},
    {&__pyx_n_s_up_num, __pyx_k_up_num, sizeof(__pyx_k_up_num), 0, 0, 1, 1},
    {&__pyx_n_s_up_row_index, __pyx_k_up_row_index, sizeof(__pyx_k_up_row_index), 0, 0, 1, 1},
    {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
    {&__pyx_n_s_updateRateHist, __pyx_k_updateRateHist, sizeof(__pyx_k_updateRateHist), 0, 0, 1, 1},
    {&__pyx_n_s_updateRateHist_2, __pyx_k_updateRateHist_2, sizeof(__pyx_k_updateRateHist_2), 0, 0, 1, 1},
    {&__pyx_n_s_update_day_hot_info, __pyx_k_update_day_hot_info, sizeof(__pyx_k_update_day_hot_info), 0, 0, 1, 1},
    {&__pyx_n_s_update_db_logs_dir, __pyx_k_update_db_logs_dir, sizeof(__pyx_k_update_db_logs_dir), 0, 0, 1, 1},
    {&__pyx_n_s_update_hot_table, __pyx_k_update_hot_table, sizeof(__pyx_k_update_hot_table), 0, 0, 1, 1},
    {&__pyx_n_s_update_json, __pyx_k_update_json, sizeof(__pyx_k_update_json), 0, 0, 1, 1},
    {&__pyx_n_s_update_range, __pyx_k_update_range, sizeof(__pyx_k_update_range), 0, 0, 1, 1},
    {&__pyx_n_s_update_range_dict, __pyx_k_update_range_dict, sizeof(__pyx_k_update_range_dict), 0, 0, 1, 1},
    {&__pyx_n_s_update_strategy_logs_dir, __pyx_k_update_strategy_logs_dir, sizeof(__pyx_k_update_strategy_logs_dir), 0, 0, 1, 1},
    {&__pyx_n_s_updated, __pyx_k_updated, sizeof(__pyx_k_updated), 0, 0, 1, 1},
    {&__pyx_n_s_updated_database_file, __pyx_k_updated_database_file, sizeof(__pyx_k_updated_database_file), 0, 0, 1, 1},
    {&__pyx_kp_s_updatelog_json, __pyx_k_updatelog_json, sizeof(__pyx_k_updatelog_json), 0, 0, 1, 0},
    {&__pyx_n_s_uplimt_num, __pyx_k_uplimt_num, sizeof(__pyx_k_uplimt_num), 0, 0, 1, 1},
    {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
    {&__pyx_n_s_use_date, __pyx_k_use_date, sizeof(__pyx_k_use_date), 0, 0, 1, 1},
    {&__pyx_kp_s_use_date_2, __pyx_k_use_date_2, sizeof(__pyx_k_use_date_2), 0, 0, 1, 0},
    {&__pyx_n_s_use_date_now, __pyx_k_use_date_now, sizeof(__pyx_k_use_date_now), 0, 0, 1, 1},
    {&__pyx_n_s_use_date_previous, __pyx_k_use_date_previous, sizeof(__pyx_k_use_date_previous), 0, 0, 1, 1},
    {&__pyx_n_s_use_datetime, __pyx_k_use_datetime, sizeof(__pyx_k_use_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_use_ma, __pyx_k_use_ma, sizeof(__pyx_k_use_ma), 0, 0, 1, 1},
    {&__pyx_n_s_use_num_cold, __pyx_k_use_num_cold, sizeof(__pyx_k_use_num_cold), 0, 0, 1, 1},
    {&__pyx_n_s_use_num_hot, __pyx_k_use_num_hot, sizeof(__pyx_k_use_num_hot), 0, 0, 1, 1},
    {&__pyx_n_s_use_st_stock, __pyx_k_use_st_stock, sizeof(__pyx_k_use_st_stock), 0, 0, 1, 1},
    {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1},
    {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
    {&__pyx_n_s_value_dict, __pyx_k_value_dict, sizeof(__pyx_k_value_dict), 0, 0, 1, 1},
    {&__pyx_n_s_value_list, __pyx_k_value_list, sizeof(__pyx_k_value_list), 0, 0, 1, 1},
    {&__pyx_n_s_value_ratio, __pyx_k_value_ratio, sizeof(__pyx_k_value_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
    {&__pyx_kp_s_var_barData, __pyx_k_var_barData, sizeof(__pyx_k_var_barData), 0, 0, 1, 0},
    {&__pyx_n_s_visualStock, __pyx_k_visualStock, sizeof(__pyx_k_visualStock), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock___init, __pyx_k_visualStock___init, sizeof(__pyx_k_visualStock___init), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock__convertDictToPandas, __pyx_k_visualStock__convertDictToPandas, sizeof(__pyx_k_visualStock__convertDictToPandas), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock__plotHotColdTables, __pyx_k_visualStock__plotHotColdTables, sizeof(__pyx_k_visualStock__plotHotColdTables), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock__plotTablePandas, __pyx_k_visualStock__plotTablePandas, sizeof(__pyx_k_visualStock__plotTablePandas), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock__saveToImg, __pyx_k_visualStock__saveToImg, sizeof(__pyx_k_visualStock__saveToImg), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_closeDriver, __pyx_k_visualStock_closeDriver, sizeof(__pyx_k_visualStock_closeDriver), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_drawKlineChart, __pyx_k_visualStock_drawKlineChart, sizeof(__pyx_k_visualStock_drawKlineChart), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_dumpJsonToFile, __pyx_k_visualStock_dumpJsonToFile, sizeof(__pyx_k_visualStock_dumpJsonToFile), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_getWebDriver, __pyx_k_visualStock_getWebDriver, sizeof(__pyx_k_visualStock_getWebDriver), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHoldNumberDecrea, __pyx_k_visualStock_plotHoldNumberDecrea, sizeof(__pyx_k_visualStock_plotHoldNumberDecrea), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdConceptTa, __pyx_k_visualStock_plotHotColdConceptTa, sizeof(__pyx_k_visualStock_plotHotColdConceptTa), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdFutureTab, __pyx_k_visualStock_plotHotColdFutureTab, sizeof(__pyx_k_visualStock_plotHotColdFutureTab), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdIndexTabl, __pyx_k_visualStock_plotHotColdIndexTabl, sizeof(__pyx_k_visualStock_plotHotColdIndexTabl), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdIndustryC, __pyx_k_visualStock_plotHotColdIndustryC, sizeof(__pyx_k_visualStock_plotHotColdIndustryC), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdIndustryT, __pyx_k_visualStock_plotHotColdIndustryT, sizeof(__pyx_k_visualStock_plotHotColdIndustryT), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotHotColdStockTabl, __pyx_k_visualStock_plotHotColdStockTabl, sizeof(__pyx_k_visualStock_plotHotColdStockTabl), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotKline, __pyx_k_visualStock_plotKline, sizeof(__pyx_k_visualStock_plotKline), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotKlineMpl, __pyx_k_visualStock_plotKlineMpl, sizeof(__pyx_k_visualStock_plotKlineMpl), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotStockUplimtLadde, __pyx_k_visualStock_plotStockUplimtLadde, sizeof(__pyx_k_visualStock_plotStockUplimtLadde), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotStrategyFigure, __pyx_k_visualStock_plotStrategyFigure, sizeof(__pyx_k_visualStock_plotStrategyFigure), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotTop10Amplitude, __pyx_k_visualStock_plotTop10Amplitude, sizeof(__pyx_k_visualStock_plotTop10Amplitude), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotTop10UpLimit, __pyx_k_visualStock_plotTop10UpLimit, sizeof(__pyx_k_visualStock_plotTop10UpLimit), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotTradeDistributio, __pyx_k_visualStock_plotTradeDistributio, sizeof(__pyx_k_visualStock_plotTradeDistributio), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotWaveDownRank, __pyx_k_visualStock_plotWaveDownRank, sizeof(__pyx_k_visualStock_plotWaveDownRank), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_plotWaveUpRank, __pyx_k_visualStock_plotWaveUpRank, sizeof(__pyx_k_visualStock_plotWaveUpRank), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_setPlotTimeLock, __pyx_k_visualStock_setPlotTimeLock, sizeof(__pyx_k_visualStock_setPlotTimeLock), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_setStrategyJsonFile, __pyx_k_visualStock_setStrategyJsonFile, sizeof(__pyx_k_visualStock_setStrategyJsonFile), 0, 0, 1, 1},
    {&__pyx_n_s_visualStock_splitStockData, __pyx_k_visualStock_splitStockData, sizeof(__pyx_k_visualStock_splitStockData), 0, 0, 1, 1},
    {&__pyx_n_s_vols, __pyx_k_vols, sizeof(__pyx_k_vols), 0, 0, 1, 1},
    {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
    {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
    {&__pyx_n_s_wave_down_ratio_record, __pyx_k_wave_down_ratio_record, sizeof(__pyx_k_wave_down_ratio_record), 0, 0, 1, 1},
    {&__pyx_n_s_wave_ratio, __pyx_k_wave_ratio, sizeof(__pyx_k_wave_ratio), 0, 0, 1, 1},
    {&__pyx_n_s_wave_up_rank_list, __pyx_k_wave_up_rank_list, sizeof(__pyx_k_wave_up_rank_list), 0, 0, 1, 1},
    {&__pyx_n_s_wave_up_ratio_record, __pyx_k_wave_up_ratio_record, sizeof(__pyx_k_wave_up_ratio_record), 0, 0, 1, 1},
    {&__pyx_n_s_webdriver, __pyx_k_webdriver, sizeof(__pyx_k_webdriver), 0, 0, 1, 1},
    {&__pyx_n_s_week, __pyx_k_week, sizeof(__pyx_k_week), 0, 0, 1, 1},
    {&__pyx_n_s_week_2, __pyx_k_week_2, sizeof(__pyx_k_week_2), 0, 0, 1, 1},
    {&__pyx_n_s_week_levels, __pyx_k_week_levels, sizeof(__pyx_k_week_levels), 0, 0, 1, 1},
    {&__pyx_n_s_wick, __pyx_k_wick, sizeof(__pyx_k_wick), 0, 0, 1, 1},
    {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
    {&__pyx_n_s_workbook, __pyx_k_workbook, sizeof(__pyx_k_workbook), 0, 0, 1, 1},
    {&__pyx_n_s_workers, __pyx_k_workers, sizeof(__pyx_k_workers), 0, 0, 1, 1},
    {&__pyx_kp_u_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 1, 0, 0},
    {&__pyx_n_s_x_2, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 0, 1, 1},
    {&__pyx_n_s_xaxis_data, __pyx_k_xaxis_data, sizeof(__pyx_k_xaxis_data), 0, 0, 1, 1},
    {&__pyx_n_s_xaxis_index, __pyx_k_xaxis_index, sizeof(__pyx_k_xaxis_index), 0, 0, 1, 1},
    {&__pyx_n_s_xaxis_opts, __pyx_k_xaxis_opts, sizeof(__pyx_k_xaxis_opts), 0, 0, 1, 1},
    {&__pyx_n_s_xlabel, __pyx_k_xlabel, sizeof(__pyx_k_xlabel), 0, 0, 1, 1},
    {&__pyx_n_s_xls, __pyx_k_xls, sizeof(__pyx_k_xls), 0, 0, 1, 1},
    {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
    {&__pyx_n_s_y_axis, __pyx_k_y_axis, sizeof(__pyx_k_y_axis), 0, 0, 1, 1},
    {&__pyx_n_s_yaxis_index, __pyx_k_yaxis_index, sizeof(__pyx_k_yaxis_index), 0, 0, 1, 1},
    {&__pyx_n_s_yaxis_opts, __pyx_k_yaxis_opts, sizeof(__pyx_k_yaxis_opts), 0, 0, 1, 1},
    {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
    {&__pyx_n_s_year_end, __pyx_k_year_end, sizeof(__pyx_k_year_end), 0, 0, 1, 1},
    {&__pyx_n_s_year_levels, __pyx_k_year_levels, sizeof(__pyx_k_year_levels), 0, 0, 1, 1},
    {&__pyx_n_s_year_start, __pyx_k_year_start, sizeof(__pyx_k_year_start), 0, 0, 1, 1},
    {&__pyx_n_s_year_str, __pyx_k_year_str, sizeof(__pyx_k_year_str), 0, 0, 1, 1},
    {&__pyx_n_s_ylabel, __pyx_k_ylabel, sizeof(__pyx_k_ylabel), 0, 0, 1, 1},
    {&__pyx_n_s_zero_num, __pyx_k_zero_num, sizeof(__pyx_k_zero_num), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 49, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 93, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 138, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 318, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 394, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 434, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 475, __pyx_L1_error)
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(0, 721, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1804, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "tbstock/tradeStrategy/stockStrategy.py":84
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 *         self.datetime_str = self.base_filename[0:8]             # <<<<<<<<<<<<<<
 *         # print(f": {self.filename}")
 *         # print(f": {self.base_filename}")
 */
  __pyx_slice_ = PySlice_New(__pyx_int_0, __pyx_int_8, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice_);
  __Pyx_GIVEREF(__pyx_slice_);

  /* "tbstock/tradeStrategy/stockStrategy.py":142
 *         strategy_data_df[''] = strategy_data_df[''] / 100.0
 * 
 *         fig, ax = plt.subplots(figsize=(5, 8))             # <<<<<<<<<<<<<<
 *         table_title = f'{self.datetime_str}-{day_len}'
 *         ax.set_title(table_title)
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_int_5, __pyx_int_8); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "tbstock/tradeStrategy/stockStrategy.py":434
 * 
 *         if mode not in ['industry', 'concept']:
 *             raise ValueError("mode must switch in ['industry','concept']")             # <<<<<<<<<<<<<<
 * 
 *         if mode == 'industry':
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_mode_must_switch_in_industry_con); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "tbstock/tradeStrategy/stockStrategy.py":457
 *         for key_day, value in strategy_data_dict.items():
 *             if len(key_day) == 8:
 *                 new_short_day_dict[key_day[-4:]] = value             # <<<<<<<<<<<<<<
 *             else:
 *                 new_short_day_dict[key_day] = value
 */
  __pyx_slice__31 = PySlice_New(__pyx_int_neg_4, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__31);
  __Pyx_GIVEREF(__pyx_slice__31);

  /* "tbstock/tradeStrategy/stockStrategy.py":463
 *         #
 *         strategy_data_df = pd.DataFrame(new_short_day_dict)
 *         strategy_data_df.set_index('index', inplace=True)             # <<<<<<<<<<<<<<
 *         column_name_list = strategy_data_df.columns.values
 * 
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_index); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "tbstock/tradeStrategy/stockStrategy.py":492
 *                                    # PiYG_r  text_cmap
 *                                    ColDef(name=col_name, text_cmap=normed_cmap(strategy_data_df[col_name], cmap=matplotlib.cm.bwr_r)) for col_name in
 *                                    column_name_list[0:-1]             # <<<<<<<<<<<<<<
 *                                ] + [ColDef(name=column_name_list[-1],
 *                                            text_cmap=normed_cmap(strategy_data_df[column_name_list[-1]], cmap=matplotlib.cm.autumn_r))]
 */
  __pyx_slice__39 = PySlice_New(__pyx_int_0, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__39);
  __Pyx_GIVEREF(__pyx_slice__39);

  /* "tbstock/tradeStrategy/stockStrategy.py":574
 *                 near_num = len(last_five_dict)
 *                 for time_key, time_value in last_five_dict.items():
 *                     year_str = time_key[0:4]             # <<<<<<<<<<<<<<
 *                     time_key = time_key.replace(year_str, '')
 *                     key_pandas = self._convertDictToPandas(time_key, time_value)
 */
  __pyx_slice__44 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__44);
  __Pyx_GIVEREF(__pyx_slice__44);

  /* "tbstock/tradeStrategy/stockStrategy.py":686
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))             # <<<<<<<<<<<<<<
 *         ax.set_title(table_title)
 *         tab = Table(
 */
  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_int_8, __pyx_int_8); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "tbstock/tradeStrategy/stockStrategy.py":737
 *         # #  loc
 *         # new_df.loc[len(new_df)] = pd.Series(index=new_df.columns, dtype=None)
 *         new_df.set_index('key_name', inplace=True)             # <<<<<<<<<<<<<<
 *         return new_df
 * 
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_key_name); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "tbstock/tradeStrategy/stockStrategy.py":741
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):
 *         import spire.xls as spires             # <<<<<<<<<<<<<<
 *         import spire.xls.common as spires_common
 * 
 */
  __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_spire, __pyx_n_s_xls); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "tbstock/tradeStrategy/stockStrategy.py":742
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common             # <<<<<<<<<<<<<<
 * 
 *         # Workbook
 */
  __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_spire, __pyx_n_s_xls, __pyx_n_s_common); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "tbstock/tradeStrategy/stockStrategy.py":855
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high             # <<<<<<<<<<<<<<
 *         times = origin_df['date'].tolist()
 *         vols = (origin_df['volume'] / 1000000).round(2).tolist()  # ()
 */
  __pyx_slice__73 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__73);
  __Pyx_GIVEREF(__pyx_slice__73);

  /* "tbstock/tradeStrategy/stockStrategy.py":1171
 *         # mplfinanceK
 *         df.set_index(['date'], inplace=True)
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"             # <<<<<<<<<<<<<<
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),
 */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_code); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "tbstock/tradeStrategy/stockStrategy.py":1173
 *         figure_title = f"{stock_data.loc[0, 'code']} Candle Chart"
 *         figure_save_name = f"{stock_data.loc[0, 'code']}_Kline.png"
 *         fig, axes = mpf.plot(df, type='candle', style=my_style, title=figure_title, volume=True, mav=(5, 10),             # <<<<<<<<<<<<<<
 *                              returnfig=True)
 *         # tight_layout = True,
 */
  __pyx_tuple__77 = PyTuple_Pack(2, __pyx_int_5, __pyx_int_10); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "tbstock/tradeStrategy/stockStrategy.py":1214
 *             df_ma[types[i]] = talib.MA(df_ma.close, timeperiod=5, matype=i)
 *         if self.show_figure:
 *             df_ma.plot(figsize=(16, 6), title='Moving average(MA) lines', xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df_ma
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_int_16, __pyx_int_6); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "tbstock/tradeStrategy/stockStrategy.py":1269
 *         df['macd'], df['macdsignal'], df['macdhist'] = talib.MACD(df.close, fastperiod=12, slowperiod=26, signalperiod=9)
 *         if self.show_figure:
 *             df.plot(figsize=(16, 8), title='MACD', x='date', y=['close', 'macd', 'macdsignal', 'macdhist'], xlabel='date', ylabel='price')             # <<<<<<<<<<<<<<
 *             plt.show()
 *         return df
 */
  __pyx_tuple__79 = PyTuple_Pack(2, __pyx_int_16, __pyx_int_8); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "tbstock/tradeStrategy/stockStrategy.py":1571
 *             print("baseStrategy :", self.non_serializable_attrs)
 * 
 *         print("baseStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def __getstate__(self):
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_baseStrategy___init); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "tbstock/tradeStrategy/stockStrategy.py":1627
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_delist']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_delist', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         delist_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_n_s_is_delist); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "tbstock/tradeStrategy/stockStrategy.py":1636
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 *         all_stock_simple_info = all_stock_simple_info[all_stock_simple_info['is_st']]
 *         all_stock_simple_info = all_stock_simple_info.drop('is_st', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         st_stock_dict = all_stock_simple_info.set_index('code')['name'].to_dict()
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_n_s_is_st); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "tbstock/tradeStrategy/stockStrategy.py":1770
 *             data = kwargs
 *         elif not isinstance(data, dict):
 *             raise ValueError("data must be a dictionary")             # <<<<<<<<<<<<<<
 * 
 *         all_list = []
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_data_must_be_a_dictionary); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "tbstock/tradeStrategy/stockStrategy.py":1783
 *             df[strategy_name] = df.index.map(list_2_dict)
 *         df['sum'] = df.index.map(count)
 *         df.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 *         df.sort_values('sum', ascending=False, inplace=True)
 *         return df
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "tbstock/tradeStrategy/stockStrategy.py":1784
 *         df['sum'] = df.index.map(count)
 *         df.fillna(0, inplace=True)
 *         df.sort_values('sum', ascending=False, inplace=True)             # <<<<<<<<<<<<<<
 *         return df
 * 
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_s_sum); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "tbstock/tradeStrategy/stockStrategy.py":1805
 *     def __init__(self, save_json=False):
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_fundamentalStockStrategy___init); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "tbstock/tradeStrategy/stockStrategy.py":1923
 * 
 *         def select_code(code):
 *             if code[0:2] in select_str or code[0] in select_str:             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
  __pyx_slice__101 = PySlice_New(__pyx_int_0, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__101)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__101);
  __Pyx_GIVEREF(__pyx_slice__101);

  /* "tbstock/tradeStrategy/stockStrategy.py":1922
 *                 select_str.append('8')
 * 
 *         def select_code(code):             # <<<<<<<<<<<<<<
 *             if code[0:2] in select_str or code[0] in select_str:
 *                 return True
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_n_s_code); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 1922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_select_code, 1922, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1922, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2006
 *                     stock_tmp.loc[len(stock_tmp.index)] = new_record
 *         elif multi_type == 'thread':
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for stock_code, stock_name in update_range_dict.items():
 */
  __pyx_tuple__109 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 2006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "tbstock/tradeStrategy/stockStrategy.py":2066
 *         max_price = stock_data['close'].max()
 *         min_price = stock_data['close'].min()
 *         now_price = stock_data.loc[0, 'close']             # <<<<<<<<<<<<<<
 * 
 *         price_quantile = (now_price - min_price) / (max_price - min_price)
 */
  __pyx_tuple__110 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_close); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "tbstock/tradeStrategy/stockStrategy.py":2088
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 *         print("technicalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_technicalStockStrategy___init); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "tbstock/tradeStrategy/stockStrategy.py":2246
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 *         print("financialStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 */
  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_financialStockStrategy___init); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "tbstock/tradeStrategy/stockStrategy.py":2250
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],             # <<<<<<<<<<<<<<
 *                            'total_operate_revenue_tb': [100.0, utils.positive_infinity],
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 */
  __pyx_tuple__113 = PyTuple_Pack(3, __pyx_int_2024, __pyx_int_6, __pyx_int_30); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_tuple__114 = PyTuple_Pack(3, __pyx_int_2024, __pyx_int_3, __pyx_int_31); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_tuple__115 = PyTuple_Pack(3, __pyx_int_2023, __pyx_int_12, __pyx_int_31); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "tbstock/tradeStrategy/stockStrategy.py":2254
 *                            'kf_net_profit_tb': [100.0, utils.positive_infinity], 'gross_profit_ratio': [10.0, utils.positive_infinity]}
 *         elif not isinstance(filter_dict['report_date'], list):
 *             raise ValueError("filter_dict['report_date'] should be a list.")             # <<<<<<<<<<<<<<
 * 
 *         # query_stock_list = []
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s_filter_dict_report_date_should_b); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "tbstock/tradeStrategy/stockStrategy.py":2284
 *         else:
 *             if isinstance(filter_dict['report_date'], list):
 *                 raise ValueError("filter_dict['report_date'] should not be a list.")             # <<<<<<<<<<<<<<
 * 
 *         if financial_mode == "quarter":
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_filter_dict_report_date_should_n); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 2284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "tbstock/tradeStrategy/stockStrategy.py":2371
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 *         print("capitalStockStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_capitalStockStrategy___init); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "tbstock/tradeStrategy/stockStrategy.py":2501
 *             print("publishStrategy :", self.non_serializable_attrs)
 * 
 *         print("publishStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def reset(self, use_date):
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_publishStrategy___init); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "tbstock/tradeStrategy/stockStrategy.py":2513
 *         ## 1:
 *         # top_10_up_limit, top_10_amplitude = self.getStockProperty_(trade_day_len=30, use_st_stock=False, num_tr=15, save_file=True)
 *         top_10_up_limit, top_10_amplitude = self.getStockProperty(30, False, 15, True, 'process')             # <<<<<<<<<<<<<<
 *         # print('top_10_up_limit:', top_10_up_limit)
 *         # print('top_10_amplitude:', top_10_amplitude)
 */
  __pyx_tuple__121 = PyTuple_Pack(5, __pyx_int_30, Py_False, __pyx_int_15, Py_True, __pyx_n_s_process); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 2513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "tbstock/tradeStrategy/stockStrategy.py":2619
 *         #
 *         grouped_df = grouped_df[['name', 'code', 'upLimit_times', 'average_amplitude']]
 *         grouped_df.set_index('name', inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         sorted_df = grouped_df.sort_values(by=['upLimit_times', 'average_amplitude'], ascending=[False, False])
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 2619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "tbstock/tradeStrategy/stockStrategy.py":2800
 *         #
 *         if multi_type not in ['single', 'thread', 'process']:
 *             raise ValueError(f"multi_type parameter set wrong.")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_multi_type_parameter_set_wrong); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 2800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "tbstock/tradeStrategy/stockStrategy.py":2949
 * 
 *             max_price_index = 0
 *             max_price_date = datetime(1900, 1, 1)             # <<<<<<<<<<<<<<
 *             max_price = 0
 * 
 */
  __pyx_tuple__124 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "tbstock/tradeStrategy/stockStrategy.py":2941
 *         stock_close_price_df = stock_data[['date', 'close']]
 * 
 *         def getOneWaveRatio(stock_close_price_df: pd.DataFrame, wave_up_rank_list: list, mode='up', depth=0):             # <<<<<<<<<<<<<<
 *             row_num = stock_close_price_df.shape[0]
 *             if row_num == 1 or depth >= max_depth:
 */
  __pyx_tuple__125 = PyTuple_Pack(24, __pyx_n_s_stock_close_price_df, __pyx_n_s_wave_up_rank_list, __pyx_n_s_mode, __pyx_n_s_depth, __pyx_n_s_row_num, __pyx_n_s_max_item_down, __pyx_n_s_max_item_up, __pyx_n_s_max_price_index, __pyx_n_s_max_price_date, __pyx_n_s_max_price, __pyx_n_s_min_price_index, __pyx_n_s_min_price_date, __pyx_n_s_min_price, __pyx_n_s_i, __pyx_n_s_current_date, __pyx_n_s_current_price, __pyx_n_s_price_up_ratio, __pyx_n_s_item_up, __pyx_n_s_price_down_ratio, __pyx_n_s_item_down, __pyx_n_s_index_left, __pyx_n_s_index_right, __pyx_n_s_df_left, __pyx_n_s_df_right); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getOneWaveRatio, 2941, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __pyx_tuple__127 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_up), ((PyObject *)__pyx_int_0)); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "tbstock/tradeStrategy/stockStrategy.py":3059
 *         prev_date = utils.sh_calendar.previous_session(new_date).strftime('%Y%m%d')
 * 
 *         def updateRateHist(stock_code, stock_name, prev_date, new_date, rate_hist_dict):             # <<<<<<<<<<<<<<
 *             res = False
 *             stock_data = pd.DataFrame()
 */
  __pyx_tuple__130 = PyTuple_Pack(9, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_prev_date, __pyx_n_s_new_date, __pyx_n_s_rate_hist_dict, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_up_limit, __pyx_n_s_qfq_up_rate); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 3059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_updateRateHist, 3059, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 3059, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3106
 *                     rate_hist_dict[''].append(stock_code)
 * 
 *         def updateRateHist_(stock_code, stock_name, prev_date, new_date):             # <<<<<<<<<<<<<<
 *             res_list = {}
 *             res, stock_data = self.dataproc.getStockTradeDayInfoSqlalchemy(stock_code, prev_date, new_date)
 */
  __pyx_tuple__132 = PyTuple_Pack(9, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_prev_date, __pyx_n_s_new_date, __pyx_n_s_res_list, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_up_limit, __pyx_n_s_qfq_up_rate); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 3106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_updateRateHist_2, 3106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 3106, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3417
 * 
 *         # price
 *         def cumulative_product(group):             # <<<<<<<<<<<<<<
 *             group['cumprod_change_ratio'] = group['change_ratio'].cumprod()
 *             return group
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_n_s_group); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 3417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_cumulative_product, 3417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 3417, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3423
 *         #
 *         df_grouped['group_column'] = df_grouped['code']
 *         result_df = df_grouped.groupby('group_column', group_keys=False).apply(cumulative_product, include_groups=False)             # <<<<<<<<<<<<<<
 * 
 *         if result_df['date'].dtype == 'datetime64[ns]':
 */
  __pyx_tuple__136 = PyTuple_Pack(1, __pyx_n_s_group_column); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "tbstock/tradeStrategy/stockStrategy.py":3468
 *                 hot_table_near_day = {}
 *                 near_levels = hot_table['num_tr']
 *                 near_day = int(key[5:]) - 1             # <<<<<<<<<<<<<<
 *                 start_date = utils.sh_calendar.session_offset(trade_date, -near_day)
 *                 head_tail_df = self.getTradeDayChangeRankBetweenDate(table_name, start_date, trade_date, near_levels)
 */
  __pyx_slice__137 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__137)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__137);
  __Pyx_GIVEREF(__pyx_slice__137);

  /* "tbstock/tradeStrategy/stockStrategy.py":3961
 *     def __init__(self, save_json=False):
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")             # <<<<<<<<<<<<<<
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_s_pacoSelectStrategy___init); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "tbstock/tradeStrategy/stockStrategy.py":3996
 * 
 *         if not intersect_stock_list:
 *             raise ValueError(f"intersect_stock_list is empty")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_u_intersect_stock_list_is_empty); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "tbstock/tradeStrategy/stockStrategy.py":4057
 * 
 *         # near_day
 *         top_up_limit, top_amplitude = self.getStockProperty(50, False, -1, False, 'process', input_codes=concept_stock_list)             # <<<<<<<<<<<<<<
 *         name_up_limit_times = top_up_limit['upLimit_times'].to_dict()
 *         limit_up_code_list = top_up_limit['code'].to_list()
 */
  __pyx_tuple__146 = PyTuple_Pack(5, __pyx_int_50, Py_False, __pyx_int_neg_1, Py_False, __pyx_n_s_process); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "tbstock/tradeStrategy/stockStrategy.py":4169
 *     print(select_df)
 * 
 *     ret = my_method.getSingleStockPriceQuantile('300416', 60)             # <<<<<<<<<<<<<<
 *     print(ret)
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_kp_s_300416, __pyx_int_60); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 4169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "tbstock/tradeStrategy/stockStrategy.py":8
 * from datetime import datetime
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
 * import matplotlib.pyplot as plt             # <<<<<<<<<<<<<<
 * import matplotlib
 * import pandas as pd
 */
  __pyx_tuple__154 = PyTuple_Pack(2, __pyx_n_s_matplotlib, __pyx_n_s_pyplot); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "tbstock/tradeStrategy/stockStrategy.py":15
 * from typing import Union, Dict, List
 * from collections import Counter
 * import tbstock.dataManagement.dataPreprocess as dataproc             # <<<<<<<<<<<<<<
 * from tbstock.utils import utils
 * from tbstock.dataAcquisition.models import *
 */
  __pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_tbstock, __pyx_n_s_dataManagement, __pyx_n_s_dataPreprocess); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "tbstock/tradeStrategy/stockStrategy.py":45
 *                               gridcolor='(0.82, 0.83, 0.85)')
 * 
 * plt.rc("font", family="AR PL UKai CN")  ###             # <<<<<<<<<<<<<<
 * plt.rcParams['axes.unicode_minus'] = False  #
 * 
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_s_font); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "tbstock/tradeStrategy/stockStrategy.py":49
 * 
 * 
 * class visualStock(object):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "tbstock/tradeStrategy/stockStrategy.py":57
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 57, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":63
 *         self.getWebDriver()
 * 
 *     def getWebDriver(self):             # <<<<<<<<<<<<<<
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()
 */
  __pyx_tuple__161 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_service, __pyx_n_s_options); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getWebDriver, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 63, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":69
 *         # self.driver.close()
 * 
 *     def closeDriver(self):             # <<<<<<<<<<<<<<
 *         self.driver.close()
 *         self.driver.quit()
 */
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_closeDriver, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 69, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":73
 *         self.driver.quit()
 * 
 *     def setPlotTimeLock(self):             # <<<<<<<<<<<<<<
 *         '''
 *         True:
 */
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_setPlotTimeLock, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 73, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":81
 *         self.lock_time = False
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 */
  __pyx_tuple__165 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_strategy_json_file, __pyx_n_s_file_extension); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_setStrategyJsonFile, 81, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 81, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":95
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 */
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_dumpJsonToFile, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 95, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":99
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 * 
 *     def plotStrategyFigure(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 */
  __pyx_tuple__168 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_strategy_json_file); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotStrategyFigure, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 99, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":121
 *         self.dumpJsonToFile()
 * 
 *     def plotTop10UpLimit(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 */
  __pyx_tuple__170 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_day_len, __pyx_n_s_strategy_data_df, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_table_title, __pyx_n_s_tab, __pyx_n_s_table_save_path, __pyx_n_s_temp_dict); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotTop10UpLimit, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 121, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":165
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTop10Amplitude(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 */
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotTop10Amplitude, 165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 165, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":207
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveUpRank(self, show_fig=False):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_up'
 * 
 */
  __pyx_tuple__173 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_show_fig, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_day_len, __pyx_n_s_strategy_data_df, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_table_title, __pyx_n_s_tab, __pyx_n_s_table_save_path, __pyx_n_s_temp_dict); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotWaveUpRank, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 207, __pyx_L1_error)
  __pyx_tuple__175 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "tbstock/tradeStrategy/stockStrategy.py":255
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveDownRank(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_down'
 * 
 */
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotWaveDownRank, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 255, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":302
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTradeDistributionLen(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 */
  __pyx_tuple__177 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_key_list, __pyx_n_s_value_list, __pyx_n_s_up_num, __pyx_n_s_zero_num, __pyx_n_s_down_num, __pyx_n_s_uplimt_num, __pyx_n_s_downlimt_num, __pyx_n_s_table_save_path, __pyx_n_s_table_title, __pyx_n_s_sub_table_title, __pyx_n_s_color_function, __pyx_n_s_init_opts, __pyx_n_s_fig_bar, __pyx_n_s_temp_dict); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotTradeDistributionLen, 302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 302, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":367
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotStockUplimtLadder(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 */
  __pyx_tuple__179 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_max_level, __pyx_n_s_foot_size, __pyx_n_s_max_rows, __pyx_n_s_first_uplimit_num, __pyx_n_s_per_row_num, __pyx_n_s_pre_fig_row, __pyx_n_s_interval, __pyx_n_s_strategy_data_dict_2, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_codes_list, __pyx_n_s_i, __pyx_n_s_codes_str, __pyx_n_s_strategy_data_df, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_table_title, __pyx_n_s_tab, __pyx_n_s_table_save_path, __pyx_n_s_temp_dict); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotStockUplimtLadder, 367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 367, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":431
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):             # <<<<<<<<<<<<<<
 * 
 *         if mode not in ['industry', 'concept']:
 */
  __pyx_tuple__181 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_show_fig, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_near_day, __pyx_n_s_new_short_day_dict, __pyx_n_s_key_day, __pyx_n_s_value, __pyx_n_s_strategy_data_df, __pyx_n_s_column_name_list, __pyx_n_s_index_list, __pyx_n_s_up_row_index, __pyx_n_s_down_row_index, __pyx_n_s_foot_size, __pyx_n_s_row_num, __pyx_n_s_row_inch_2, __pyx_n_s_col_inch_2, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_table_title, __pyx_n_s_tab, __pyx_n_s_table_save_path, __pyx_n_s_temp_dict, __pyx_n_s_col_name); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdIndustryConceptFreque, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_tuple__183 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_industry), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "tbstock/tradeStrategy/stockStrategy.py":508
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 */
  __pyx_tuple__184 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_strategy_key_name, __pyx_n_s_type_name); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdIndustryTable, 508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 508, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":518
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */
  __pyx_tuple__186 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_strategy_key_name, __pyx_n_s_type_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_num_rank, __pyx_n_s_near_num, __pyx_n_s_all_time_day_df, __pyx_n_s_key, __pyx_n_s_value_dict, __pyx_n_s_last_five_items, __pyx_n_s_last_five_dict, __pyx_n_s_time_key, __pyx_n_s_time_value, __pyx_n_s_key_pandas, __pyx_n_s_base_list, __pyx_n_s_color_list, __pyx_n_s_i, __pyx_n_s_new_base_list, __pyx_n_s_table_title, __pyx_n_s_col_title, __pyx_n_s_sub_strategy_name, __pyx_n_s_table_save_png_path, __pyx_n_s_all_time_week_df, __pyx_n_s_year_str, __pyx_n_s_all_time_month_df, __pyx_n_s_all_near_df, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_j); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdTables, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 518, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":684
 *         # # self.strategy_json[strategy_key_name]['strategy_img_path'] = table_save_png_path
 * 
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):             # <<<<<<<<<<<<<<
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 */
  __pyx_tuple__188 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_plot_df, __pyx_n_s_table_title, __pyx_n_s_table_save_png_path, __pyx_n_s_col_title, __pyx_n_s_color_list, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_tab, __pyx_n_s_i); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotTablePandas, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 684, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":712
 *         plt.close()
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         if time_key:
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 */
  __pyx_tuple__190 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_near_name, __pyx_n_s_ori_dict, __pyx_n_s_time_key, __pyx_n_s_new_dict, __pyx_n_s_num_k, __pyx_n_s_num_rank, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_value_ratio, __pyx_n_s_new_df); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_convertDictToPandas, 712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_tuple__192 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__23)); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "tbstock/tradeStrategy/stockStrategy.py":740
 *         return new_df
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):             # <<<<<<<<<<<<<<
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common
 */
  __pyx_tuple__193 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_table_save_excel_path, __pyx_n_s_table_save_png_path, __pyx_n_s_spires, __pyx_n_s_spires_common, __pyx_n_s_workbook, __pyx_n_s_sheet, __pyx_n_s_image); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_saveToImg, 740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 740, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":759
 *         workbook.Dispose()
 * 
 *     def plotHotColdConceptTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 */
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdConceptTable, 759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 759, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":769
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdStockTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 */
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdStockTable, 769, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":779
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdFutureTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 */
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdFutureTable, 779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 779, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":789
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdIndexTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 */
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHotColdIndexTable, 789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 789, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":799
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 */
  __pyx_tuple__199 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_table_rows, __pyx_n_s_strategy_key_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_day_len, __pyx_n_s_strategy_data_df, __pyx_n_s_fig, __pyx_n_s_ax, __pyx_n_s_table_title, __pyx_n_s_table_save_path, __pyx_n_s_tab, __pyx_n_s_temp_dict); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotHoldNumberDecrease, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 799, __pyx_L1_error)
  __pyx_tuple__201 = PyTuple_Pack(1, ((PyObject *)__pyx_int_25)); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "tbstock/tradeStrategy/stockStrategy.py":854
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:             # <<<<<<<<<<<<<<
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()
 */
  __pyx_tuple__202 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_origin_df, __pyx_n_s_datas, __pyx_n_s_times, __pyx_n_s_vols, __pyx_n_s_difs, __pyx_n_s_deas, __pyx_n_s_macds, __pyx_n_s_ma_5, __pyx_n_s_ma_10, __pyx_n_s_ma_20, __pyx_n_s_ma_30, __pyx_n_s_ma_60); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_splitStockData, 854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 854, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":880
 *         }
 * 
 *     def drawKlineChart(self, data, stock_code):             # <<<<<<<<<<<<<<
 *         kline = (
 *             Kline()
 */
  __pyx_tuple__204 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_stock_code, __pyx_n_s_kline, __pyx_n_s_kline_line, __pyx_n_s_overlap_kline_line, __pyx_n_s_bar_1, __pyx_n_s_bar_2, __pyx_n_s_line_2, __pyx_n_s_overlap_bar_line, __pyx_n_s_grid_chart); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_drawKlineChart, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 880, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1149
 *         # make_snapshot(fun_driver, file_name=f"{stock_code}_kline.html", output_name=f"{stock_code}_kline.png", driver=self.driver)
 * 
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)
 */
  __pyx_tuple__206 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_tech_index, __pyx_n_s_macd_df, __pyx_n_s_ema_df, __pyx_n_s_all_data, __pyx_n_s_data); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotKline, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __pyx_tuple__208 = PyTuple_Pack(3, ((PyObject*)__pyx_kp_s_601360), ((PyObject*)__pyx_kp_s_20240101), ((PyObject*)__pyx_kp_s_20240625)); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "tbstock/tradeStrategy/stockStrategy.py":1163
 *         self.drawKlineChart(data, stock_code)
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:
 */
  __pyx_tuple__209 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_df, __pyx_n_s_figure_title, __pyx_n_s_figure_save_name, __pyx_n_s_fig, __pyx_n_s_axes); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_plotKlineMpl, 1163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_tuple__211 = PyTuple_Pack(3, ((PyObject*)__pyx_kp_s_601360), ((PyObject*)__pyx_kp_s_20240101), ((PyObject*)__pyx_kp_s_20240813)); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "tbstock/tradeStrategy/stockStrategy.py":1187
 * 
 * 
 * class stockTechInd(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, stock_data, figure=False):
 *         '''
 */
  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "tbstock/tradeStrategy/stockStrategy.py":1188
 * 
 * class stockTechInd(object):
 *     def __init__(self, stock_data, figure=False):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_data,code,date,open,high,low,close,volume,amount,turn_over
 */
  __pyx_tuple__214 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stock_data, __pyx_n_s_figure); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 1188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1188, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1197
 *         self.show_figure = figure
 * 
 *     def setStockDataDf(self, stock_data_df):             # <<<<<<<<<<<<<<
 *         self.stock_data = stock_data_df
 * 
 */
  __pyx_tuple__216 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_stock_data_df); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_setStockDataDf, 1197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1197, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1200
 *         self.stock_data = stock_data_df
 * 
 *     def setFigureShow(self, figure):             # <<<<<<<<<<<<<<
 *         self.show_figure = figure
 * 
 */
  __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_figure); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_setFigureShow, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 1200, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1204
 * 
 *     # MA
 *     def MaAll(self):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__220 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_df_ma, __pyx_n_s_types, __pyx_n_s_i); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_MaAll, 1204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 1204, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1218
 *         return df_ma
 * 
 *     def MA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__222 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_ma_column, __pyx_n_s_ma_time, __pyx_n_s_ma_name, __pyx_n_s_df, __pyx_n_s_i, __pyx_n_s_time); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_MA, 1218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __pyx_tuple__224 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_close), Py_None); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "tbstock/tradeStrategy/stockStrategy.py":1237
 * 
 *     # EMA
 *     def EMA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_EMA, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 1237, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1258
 * 
 *     # MACD
 *     def MACD(self):             # <<<<<<<<<<<<<<
 *         '''
 *         difDIFEMA-EMADEADIF9EMA
 */
  __pyx_tuple__226 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_df); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_MACD, 1258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1258, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1274
 * 
 *     # RSI
 *     def RSI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 */
  __pyx_tuple__228 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_ax); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_RSI, 1274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 1274, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1285
 * 
 *     # BOLL
 *     def BOLL(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 */
  __pyx_tuple__230 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_H_line, __pyx_n_s_M_line, __pyx_n_s_L_line); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_BOLL, 1285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 1285, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1298
 * 
 *     # KDJ
 *     def KDJ(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 */
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_KDJ, 1298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 1298, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1312
 * 
 *     # W&M
 *     def WILLR(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_WILLR, 1312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 1312, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1322
 * 
 *     # DMI
 *     def DMI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_DMI, 1322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 1322, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1335
 * 
 *     # OBV
 *     def OBV(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close', 'volume']].copy()
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 */
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_OBV, 1335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 1335, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1344
 *         return df
 * 
 *     def CDL2CROWS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL2CROWS
 */
  __pyx_tuple__236 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_figure_title); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDL2CROWS, 1344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 1344, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1360
 *         return df
 * 
 *     def CDL3WHITESOLDIERS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3WHITESOLDIERS
 */
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDL3WHITESOLDIERS, 1360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 1360, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1377
 *         return df
 * 
 *     def CDL3STARSINSOUTH(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3STARSINSOUTH
 */
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDL3STARSINSOUTH, 1377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 1377, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1394
 *         return df
 * 
 *     def CDLHARAMI(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHARAMI
 */
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLHARAMI, 1394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 1394, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1410
 *         return df
 * 
 *     def CDLRISEFALL3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLRISEFALL3METHODS
 */
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLRISEFALL3METHODS, 1410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 1410, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1427
 *         return df
 * 
 *     def CDLXSIDEGAP3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLXSIDEGAP3METHODS
 */
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLXSIDEGAP3METHODS, 1427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 1427, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1444
 *         return df
 * 
 *     def CDL3INSIDE(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3INSIDE
 */
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDL3INSIDE, 1444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1444, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1461
 *         return df
 * 
 *     def CDLPIERCING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLPIERCING
 */
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLPIERCING, 1461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 1461, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1478
 *         return df
 * 
 *     def CDLHAMMER(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHAMMER
 */
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLHAMMER, 1478, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 1478, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1495
 *         return df
 * 
 *     def CDLMORNINGSTAR(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLMORNINGSTAR
 */
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLMORNINGSTAR, 1495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 1495, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1512
 *         return df
 * 
 *     def CDLENGULFING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLENGULFING
 */
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_CDLENGULFING, 1512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1512, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1530
 * 
 * 
 * class baseStrategy(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):
 *         self.dataproc = dataproc.dataPreprocess()
 */
  __pyx_tuple__248 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_tuple__249 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "tbstock/tradeStrategy/stockStrategy.py":1531
 * 
 * class baseStrategy(object):
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):             # <<<<<<<<<<<<<<
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 */
  __pyx_tuple__250 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_save_json, __pyx_n_s_strategy_date); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 1531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 1531, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1573
 *         print("baseStrategy.__init__")
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         #
 *         state = self.__dict__.copy()
 */
  __pyx_tuple__252 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_state); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getstate, 1573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 1573, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1580
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         #
 *         self.__dict__.update(state)
 */
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_setstate, 1580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 1580, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1586
 *         # self.non_serializable_attribute = None  #
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 */
  __pyx_tuple__255 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_use_date); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_reset, 1586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 1586, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1597
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 * 
 *     def checkDatabaseTableUpdate(self):             # <<<<<<<<<<<<<<
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 */
  __pyx_tuple__257 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_updated_database_file); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_checkDatabaseTableUpdate, 1597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 1597, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1609
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 */
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_dumpJsonToFile, 1609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 1609, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1613
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:             # <<<<<<<<<<<<<<
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)
 */
  __pyx_tuple__260 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_name_list, __pyx_n_s_name); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockNameByCode, 1613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 1613, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1623
 *         return name
 * 
 *     def getAllDelistStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 */
  __pyx_tuple__262 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_all_stock_simple_info, __pyx_n_s_delist_stock_dict); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getAllDelistStock, 1623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 1623, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1632
 *         return delist_stock_dict
 * 
 *     def getAllStStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 */
  __pyx_tuple__264 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_all_stock_simple_info, __pyx_n_s_st_stock_dict); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getAllStStock, 1632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 1632, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1641
 *         return st_stock_dict
 * 
 *     def getAllNewStock(self, new_thr: int = 90) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__266 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_new_thr, __pyx_n_s_now_datetime, __pyx_n_s_new_stock_thr_date, __pyx_n_s_data, __pyx_n_s_new_stock_dict); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getAllNewStock, 1641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 1641, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1654
 *         return new_stock_dict
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):             # <<<<<<<<<<<<<<
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 */
  __pyx_tuple__268 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_new_thr); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isNewStock, 1654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 1654, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1662
 *             return False
 * 
 *     def isDelistStock(self, stock_tag: str):             # <<<<<<<<<<<<<<
 *         '''
 *         ""
 */
  __pyx_tuple__270 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_stock_tag, __pyx_n_s_is_code, __pyx_n_s_stock_name); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isDelistStock, 1662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 1662, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1676
 *             return False
 * 
 *     def isStStock(self, stock_tag):             # <<<<<<<<<<<<<<
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 */
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isStStock, 1676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 1676, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1687
 *             return False
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */
  __pyx_tuple__273 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_close, __pyx_n_s_pre_close, __pyx_n_s_stock_name, __pyx_n_s_ratio_limit, __pyx_n_s_is_up_limit); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isUpLimit, 1687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __pyx_tuple__275 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_0)); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "tbstock/tradeStrategy/stockStrategy.py":1695
 *         return is_up_limit
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */
  __pyx_tuple__276 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_close, __pyx_n_s_pre_close, __pyx_n_s_stock_name, __pyx_n_s_ratio_limit, __pyx_n_s_is_down_limit); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isDownLimit, 1695, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 1695, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1702
 *         return is_down_limit
 * 
 *     def listIntersection(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         use example:
 */
  __pyx_tuple__278 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_data_list, __pyx_n_s_args, __pyx_n_s_data, __pyx_n_s_intersection_list, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_listIntersection, 1702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __pyx_tuple__280 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "tbstock/tradeStrategy/stockStrategy.py":1727
 *         return intersection_list
 * 
 *     def listUnion(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */
  __pyx_tuple__281 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_data_list, __pyx_n_s_args, __pyx_n_s_data, __pyx_n_s_union_list, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_listUnion, 1727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 1727, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1753
 *         return union_list
 * 
 *     def strategyCount(self, data: Union[Dict, None] = None, **kwargs) -> pd.DataFrame():             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */
  __pyx_tuple__283 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_kwargs, __pyx_n_s_all_list, __pyx_n_s_strategy_name, __pyx_n_s_strategy_code_list, __pyx_n_s_count, __pyx_n_s_df, __pyx_n_s_list_2_dict, __pyx_n_s_key); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_strategyCount, 1753, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 1753, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1803
 *     """
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")
 */
  __pyx_tuple__285 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_save_json); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 1803, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 1803, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__287 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_cal_min_th, __pyx_n_s_cal_max_th, __pyx_n_s_use_st_stock, __pyx_n_s_select_market_cap_stock_list, __pyx_n_s_res, __pyx_n_s_stock_trade_day_df, __pyx_n_s_exclude_codes, __pyx_n_s_select_market_cap_df); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByMarketCap, 1807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 1807, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1847
 *         return select_market_cap_stock_list
 * 
 *     def selectByKeyProduct(self, product_name) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__289 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_product_name, __pyx_n_s_res_names, __pyx_n_s_stock_basic_info_df, __pyx_n_s_index, __pyx_n_s_row); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);
  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByKeyProduct, 1847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 1847, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1860
 *         return res_names
 * 
 *     def selectByNameWord(self, key_word) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__291 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_key_word, __pyx_n_s_res_names, __pyx_n_s_index, __pyx_n_s_row); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByNameWord, 1860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 1860, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1872
 *         return res_names
 * 
 *     def selectByArea(self, area_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__293 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_area_list, __pyx_n_s_stock_list); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByArea, 1872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 1872, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1881
 *         return stock_list
 * 
 *     def selectByIndustry(self, industry_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__295 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_industry_list, __pyx_n_s_stock_list); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByIndustry, 1881, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 1881, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1890
 *         return stock_list
 * 
 *     def selectByConcept(self, concept_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__297 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_concept_list, __pyx_n_s_stock_list); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByConcept, 1890, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 1890, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */
  __pyx_tuple__299 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_market_type, __pyx_n_s_data_simple_info_df, __pyx_n_s_select_str, __pyx_n_s_market, __pyx_n_s_select_code, __pyx_n_s_select_code); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByMarket, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(0, 1899, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */
  __pyx_tuple__301 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_min_price, __pyx_n_s_max_price, __pyx_n_s_use_st_stock, __pyx_n_s_select_market_list, __pyx_n_s_res, __pyx_n_s_stock_trade_day_df, __pyx_n_s_exclude_codes, __pyx_n_s_select_market_cap_df); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByStockPrice, 1932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(0, 1932, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":1963
 *         return select_market_list
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,             # <<<<<<<<<<<<<<
 *                                    input_codes=None):
 *         if use_st_stock is None:
 */
  __pyx_tuple__303 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_day_len, __pyx_n_s_quantile_amplitude_tr, __pyx_n_s_use_st_stock, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_input_codes, __pyx_n_s_fun_name, __pyx_n_s_end_date, __pyx_n_s_start_date, __pyx_n_s_update_range, __pyx_n_s_all_stock_simple_info, __pyx_n_s_exclude_codes, __pyx_n_s_update_range_dict, __pyx_n_s_stock_tmp, __pyx_n_s_desc_name, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_succeed, __pyx_n_s_new_record, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_stock_tmp_code_list, __pyx_n_s_x_2, __pyx_n_s_code); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);
  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByStockPriceQuantile, 1963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __pyx_tuple__305 = PyTuple_Pack(6, ((PyObject *)__pyx_int_30), Py_None, Py_None, ((PyObject*)__pyx_n_s_process), ((PyObject *)__pyx_int_12), Py_None); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "tbstock/tradeStrategy/stockStrategy.py":2036
 *         # return stock_tmp_code_list
 * 
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,             # <<<<<<<<<<<<<<
 *                                     multi_type='single'):
 *         if stock_name is None:
 */
  __pyx_tuple__306 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_day_len, __pyx_n_s_stock_name, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_multi_type, __pyx_n_s_engine, __pyx_n_s_session, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_num_rows, __pyx_n_s_max_price, __pyx_n_s_min_price, __pyx_n_s_now_price, __pyx_n_s_price_quantile, __pyx_n_s_price_amplitude, __pyx_n_s_new_record); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);
  __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getSingleStockPriceQuantile, 2036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __pyx_tuple__308 = PyTuple_Pack(4, Py_None, Py_None, Py_None, ((PyObject*)__pyx_n_s_single)); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "tbstock/tradeStrategy/stockStrategy.py":2085
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 2085, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 2085, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2090
 *         print("technicalStockStrategy.__init__")
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 */
  __pyx_tuple__310 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_date_end, __pyx_n_s_date_start, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_tech_ind); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_selectByTechIndicator, 2090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __pyx_tuple__312 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_300416)); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "tbstock/tradeStrategy/stockStrategy.py":2109
 *         tech_ind.CDL3WHITESOLDIERS()
 * 
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if multi_type == 'process':
 */
  __pyx_tuple__313 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_tech_name, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_multi_type, __pyx_n_s_engine, __pyx_n_s_session, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_tech_ind, __pyx_n_s_tech_ind_method, __pyx_n_s_df, __pyx_n_s_near_datetime, __pyx_n_s_date_list, __pyx_n_s_date_str, __pyx_n_s_return_dict, __pyx_n_s_x_2); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);
  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_judgeSingleStockByTechIndicator, 2109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __pyx_tuple__315 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_single)); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "tbstock/tradeStrategy/stockStrategy.py":2143
 *             return False, {}
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                                 input_codes: list = None):
 * 
 */
  __pyx_tuple__316 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_tech_name, __pyx_n_s_trade_day_len, __pyx_n_s_use_st_stock, __pyx_n_s_save_file, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_input_codes, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_end_date, __pyx_n_s_start_date, __pyx_n_s_update_range, __pyx_n_s_all_stock_simple_info, __pyx_n_s_exclude_codes, __pyx_n_s_update_range_dict, __pyx_n_s_stock_tmp, __pyx_n_s_desc_name, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_hit, __pyx_n_s_new_record, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_stock_tmp_dict, __pyx_n_s_x_2, __pyx_n_s_code); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);
  __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockByTechIndicator, 2143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __pyx_tuple__318 = PyTuple_Pack(6, ((PyObject *)__pyx_int_60), ((PyObject *)Py_False), ((PyObject *)Py_False), ((PyObject*)__pyx_n_s_thread), ((PyObject *)__pyx_int_12), Py_None); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "tbstock/tradeStrategy/stockStrategy.py":2243
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 2243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(0, 2243, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2248
 *         print("financialStockStrategy.__init__")
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 */
  __pyx_tuple__320 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_financial_mode, __pyx_n_s_filter_dict, __pyx_n_s_use_st_stock, __pyx_n_s_save_file, __pyx_n_s_input_codes, __pyx_n_s_query_stock_df_dict, __pyx_n_s_query_date, __pyx_n_s_filter_dict_item, __pyx_n_s_query_date_str, __pyx_n_s_stock_query_df, __pyx_n_s_date_str, __pyx_n_s_merged_df, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockMultiFinancialData, 2248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __pyx_tuple__322 = PyTuple_Pack(5, ((PyObject*)__pyx_n_s_quarter), Py_None, ((PyObject *)Py_False), ((PyObject *)Py_False), Py_None); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "tbstock/tradeStrategy/stockStrategy.py":2278
 *         return merged_df
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 */
  __pyx_tuple__323 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_financial_mode, __pyx_n_s_filter_dict, __pyx_n_s_use_st_stock, __pyx_n_s_save_file, __pyx_n_s_input_codes, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_filter_list, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_sql_query, __pyx_n_s_stock_tmp, __pyx_n_s_col_list, __pyx_n_s_exclude_codes, __pyx_n_s_stock_tmp_dict); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);
  __pyx_codeobj__324 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockByFinancialData, 2278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__324)) __PYX_ERR(0, 2278, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2368
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 */
  __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 2368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 2368, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2373
 *         print("capitalStockStrategy.__init__")
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:             # <<<<<<<<<<<<<<
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 */
  __pyx_tuple__326 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_amount_th, __pyx_n_s_use_ma, __pyx_n_s_ma_time_list, __pyx_n_s_date_end, __pyx_n_s_date_start, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_tech_ind, __pyx_n_s_df, __pyx_n_s_today_condition_amount); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);
  __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_isLowAmountStock, 2373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __pyx_tuple__328 = PyTuple_Pack(2, ((PyObject *)__pyx_int_50000000), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "tbstock/tradeStrategy/stockStrategy.py":2405
 *             return False
 * 
 *     def getAllHighAmountStock(self, amount_th=50000000, use_ma=True, use_st_stock=False):             # <<<<<<<<<<<<<<
 *         '''
 *         1. use_ma=False:  >
 */
  __pyx_tuple__329 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_amount_th, __pyx_n_s_use_ma, __pyx_n_s_use_st_stock, __pyx_n_s_high_amount_stock_list, __pyx_n_s_ma_time_list, __pyx_n_s_date_end, __pyx_n_s_date_start, __pyx_n_s_res, __pyx_n_s_data_simple_info_df, __pyx_n_s_exclude_codes, __pyx_n_s_ma_name); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);
  __pyx_codeobj__330 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getAllHighAmountStock, 2405, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__330)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __pyx_tuple__331 = PyTuple_Pack(3, ((PyObject *)__pyx_int_50000000), ((PyObject *)Py_True), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);

  /* "tbstock/tradeStrategy/stockStrategy.py":2493
 *     '''
 * 
 *     def __init__(self, save_json=True):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 2493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __pyx_tuple__333 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "tbstock/tradeStrategy/stockStrategy.py":2503
 *         print("publishStrategy.__init__")
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).reset(use_date)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_reset, 2503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(0, 2503, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2507
 *         self.checkDatabaseTableUpdate()
 * 
 *     def getStrategyDataAndImg(self):             # <<<<<<<<<<<<<<
 * 
 *         print('use_date = ', self.use_date)
 */
  __pyx_tuple__335 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_top_10_up_limit, __pyx_n_s_top_10_amplitude, __pyx_n_s_stock_wave_up_df, __pyx_n_s_stock_wave_down_df, __pyx_n_s_new_date, __pyx_n_s_rate_hist_dict, __pyx_n_s_rate_hist_dict_len, __pyx_n_s_max_level, __pyx_n_s_stock_ladder); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);
  __pyx_codeobj__336 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStrategyDataAndImg, 2507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__336)) __PYX_ERR(0, 2507, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */
  __pyx_tuple__337 = PyTuple_Pack(22, __pyx_n_s_self, __pyx_n_s_trade_day_len, __pyx_n_s_use_st_stock, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_input_codes, __pyx_n_s_strategy_key_name1, __pyx_n_s_strategy_key_name2, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_end_date, __pyx_n_s_start_date, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_exclude_codes, __pyx_n_s_grouped_df, __pyx_n_s_sorted_df, __pyx_n_s_top_up_limit, __pyx_n_s_top_10_up_limit_dict, __pyx_n_s_top_amplitude, __pyx_n_s_top_10_amplitude_dict); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);
  __pyx_codeobj__338 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockProperty_2, 2554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__338)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __pyx_tuple__339 = PyTuple_Pack(5, ((PyObject *)__pyx_int_60), ((PyObject *)Py_False), ((PyObject *)__pyx_int_15), ((PyObject *)Py_True), Py_None); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */
  __pyx_tuple__340 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_multi_type, __pyx_n_s_engine, __pyx_n_s_session, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_upLimit_times, __pyx_n_s_average_amplitude, __pyx_n_s_new_record); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);
  __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_stockSingleStockProperty, 2647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(0, 2647, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":2673
 *         return new_record
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                          input_codes: list = None):
 *         '''
 */
  __pyx_tuple__342 = PyTuple_Pack(34, __pyx_n_s_self, __pyx_n_s_trade_day_len, __pyx_n_s_use_st_stock, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_input_codes, __pyx_n_s_strategy_key_name1, __pyx_n_s_strategy_key_name2, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_end_date, __pyx_n_s_start_date, __pyx_n_s_update_range, __pyx_n_s_all_stock_simple_info, __pyx_n_s_exclude_codes, __pyx_n_s_update_range_dict, __pyx_n_s_stock_tmp, __pyx_n_s_desc_name, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_new_record, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_sorted_df, __pyx_n_s_top_up_limit, __pyx_n_s_top_10_up_limit_dict, __pyx_n_s_top_amplitude, __pyx_n_s_top_10_amplitude_dict, __pyx_n_s_x_2, __pyx_n_s_code); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);
  __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 34, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockProperty, 2673, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __pyx_tuple__344 = PyTuple_Pack(7, ((PyObject *)__pyx_int_60), ((PyObject *)Py_False), ((PyObject *)__pyx_int_15), ((PyObject *)Py_False), ((PyObject*)__pyx_n_s_thread), ((PyObject *)__pyx_int_12), Py_None); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__345 = PyTuple_Pack(38, __pyx_n_s_self, __pyx_n_s_trade_day_len, __pyx_n_s_use_st_stock, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_max_depth, __pyx_n_s_strategy_key_name1, __pyx_n_s_strategy_key_name2, __pyx_n_s_fun_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_key_list, __pyx_n_s_stock_wave_down_dict, __pyx_n_s_stock_wave_up_dict, __pyx_n_s_end_date, __pyx_n_s_start_date, __pyx_n_s_exclude_codes, __pyx_n_s_all_stock_simple_info, __pyx_n_s_update_range, __pyx_n_s_desc_name, __pyx_n_s_stock_code, __pyx_n_s_wave_up_ratio_record, __pyx_n_s_wave_down_ratio_record, __pyx_n_s_list_item, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_stock_wave_up_df, __pyx_n_s_sorted_df, __pyx_n_s_stock_wave_up, __pyx_n_s_stock_wave_down_df, __pyx_n_s_stock_wave_down, __pyx_n_s_key, __pyx_n_s_x_2); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);
  __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 38, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockWavePriceRatio, 2781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __pyx_tuple__347 = PyTuple_Pack(7, ((PyObject *)__pyx_int_60), ((PyObject *)Py_False), ((PyObject *)__pyx_int_15), ((PyObject *)Py_True), ((PyObject*)__pyx_n_s_process), ((PyObject *)__pyx_int_12), ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__348 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_max_depth, __pyx_n_s_multi_type, __pyx_n_s_TIMI_COUNT, __pyx_n_s_wave_up_ratio_record, __pyx_n_s_wave_down_ratio_record, __pyx_n_s_start, __pyx_n_s_engine, __pyx_n_s_session, __pyx_n_s_res, __pyx_n_s_stock_data, __pyx_n_s_end1, __pyx_n_s_stock_close_price_df, __pyx_n_s_getOneWaveRatio, __pyx_n_s_getOneWaveRatio, __pyx_n_s_end5); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getSingleStockWavePriceRatio, 2903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __pyx_tuple__350 = PyTuple_Pack(2, ((PyObject *)__pyx_int_1), ((PyObject*)__pyx_n_s_single)); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */
  __pyx_tuple__351 = PyTuple_Pack(29, __pyx_n_s_self, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name1, __pyx_n_s_strategy_key_name2, __pyx_n_s_fun_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_rate_hist_list, __pyx_n_s_rate_hist_dict, __pyx_n_s_new_date, __pyx_n_s_prev_date, __pyx_n_s_updateRateHist, __pyx_n_s_updateRateHist, __pyx_n_s_updateRateHist_2, __pyx_n_s_updateRateHist_2, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_res, __pyx_n_s_rate_hist_dict_len, __pyx_n_s_key, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);
  __pyx_codeobj__352 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getTradeDistributionTable, 3019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__352)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __pyx_tuple__353 = PyTuple_Pack(3, ((PyObject *)Py_True), ((PyObject *)__pyx_int_12), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "tbstock/tradeStrategy/stockStrategy.py":3197
 *         return new_date, rate_hist_dict, rate_hist_dict_len
 * 
 *     def getStockLadderTable(self, use_st_stock=False, ladder_max=7, save_file=True) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__354 = PyTuple_Pack(28, __pyx_n_s_self, __pyx_n_s_use_st_stock, __pyx_n_s_ladder_max, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_dependent_table, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_stock_ladder, __pyx_n_s_max_level, __pyx_n_s_first_use_date, __pyx_n_s_use_date, __pyx_n_s_i, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_stock_ladder_dict, __pyx_n_s_new_date, __pyx_n_s_rate_hist_dict, __pyx_n_s_rate_hist_dict_len, __pyx_n_s_up_limit_stocks_list, __pyx_n_s_key, __pyx_n_s_x_2, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_x_2); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);
  __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockLadderTable, 3197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __pyx_tuple__356 = PyTuple_Pack(3, ((PyObject *)Py_False), ((PyObject *)__pyx_int_7), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "tbstock/tradeStrategy/stockStrategy.py":3284
 *         return max_level, stock_ladder
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__357 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_day_len, __pyx_n_s_new_date_len, __pyx_n_s_quantile_tr, __pyx_n_s_save_file, __pyx_n_s_input_codes, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_now_datetime, __pyx_n_s_start_datetime, __pyx_n_s_data, __pyx_n_s_exclude_codes, __pyx_n_s_df_filtered, __pyx_n_s_new_datetime_threshold, __pyx_n_s_return_df, __pyx_n_s_stock_hold_num_table); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);
  __pyx_codeobj__358 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockHoldNumberChangeTable, 3284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__358)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_tuple__359 = PyTuple_Pack(5, ((PyObject *)__pyx_int_90), ((PyObject *)__pyx_int_neg_1), ((PyObject*)__pyx_float_0_1), ((PyObject *)Py_True), Py_None); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "tbstock/tradeStrategy/stockStrategy.py":3366
 *         return return_df
 * 
 *     def __getStockLadder(self, stock_ladder_dict_yesterday: dict, stock_up_limit_list_today: list) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 *          stock_uplimt_ladder  stock_uplimt_ladder
 */
  __pyx_tuple__360 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_stock_ladder_dict_yesterday, __pyx_n_s_stock_up_limit_list_today, __pyx_n_s_stock_ladder, __pyx_n_s_is_get_max_level, __pyx_n_s_max_level, __pyx_n_s_level, __pyx_n_s_level_code_list, __pyx_n_s_x_2); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);
  __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockLadder, 3366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 3366, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3391
 *         return max_level, stock_ladder
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):             # <<<<<<<<<<<<<<
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 */
  __pyx_tuple__362 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_table_name, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_rank_level, __pyx_n_s_trade_day_df, __pyx_n_s_exclude_codes, __pyx_n_s_df_grouped, __pyx_n_s_cumulative_product, __pyx_n_s_cumulative_product, __pyx_n_s_result_df, __pyx_n_s_head_tail_df); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);
  __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getTradeDayChangeRankBetweenDate, 3391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __pyx_tuple__364 = PyTuple_Pack(1, ((PyObject *)__pyx_int_3)); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "tbstock/tradeStrategy/stockStrategy.py":3436
 *         return head_tail_df
 * 
 *     def update_hot_table(self, table_name: str, trade_date: datetime, hot_table: dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__365 = PyTuple_Pack(32, __pyx_n_s_self, __pyx_n_s_table_name, __pyx_n_s_trade_date, __pyx_n_s_hot_table, __pyx_n_s_update_day_hot_info, __pyx_n_s_code_name_table, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_hot_table_near_day, __pyx_n_s_near_levels, __pyx_n_s_near_day, __pyx_n_s_start_date, __pyx_n_s_head_tail_df, __pyx_n_s_i, __pyx_n_s_name, __pyx_n_s_change_ratio, __pyx_n_s_hot_table_day, __pyx_n_s_hot_table_day_name, __pyx_n_s_day_levels, __pyx_n_s_hot_table_week, __pyx_n_s_week_levels, __pyx_n_s_is_week_last, __pyx_n_s_end_date, __pyx_n_s_hot_table_week_name, __pyx_n_s_hot_table_month, __pyx_n_s_month_levels, __pyx_n_s_is_month_last, __pyx_n_s_hot_table_month_name, __pyx_n_s_hot_table_year, __pyx_n_s_year_levels, __pyx_n_s_is_year_last, __pyx_n_s_hot_table_year_name); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);
  __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 32, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_update_hot_table, 3436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(0, 3436, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3551
 *             hot_table['year']['updated'] = True
 * 
 *     def getIndustryConceptHotFrequency(self, mode='industry', near_day=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__367 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_near_day, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_rely_strategy_key_name, __pyx_n_s_fun_name, __pyx_n_s_strategy_data_dict, __pyx_n_s_num_rank, __pyx_n_s_day_hot_dict, __pyx_n_s_day_cold_dict, __pyx_n_s_day_hot_cold_dict, __pyx_n_s_near_day_list, __pyx_n_s_near_day_dict, __pyx_n_s_time_key, __pyx_n_s_time_value, __pyx_n_s_day_hot_frequency_df, __pyx_n_s_use_num_hot, __pyx_n_s_day_cold_frequency_df, __pyx_n_s_use_num_cold, __pyx_n_s_new_row_hot, __pyx_n_s_new_row_cold, __pyx_n_s_day_hot_cold_frequency_df, __pyx_n_s_day_hot_cold_frequency_dict, __pyx_n_s_key, __pyx_n_s_key); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getIndustryConceptHotFrequency, 3551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __pyx_tuple__369 = PyTuple_Pack(3, ((PyObject*)__pyx_n_s_industry), ((PyObject *)__pyx_int_5), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "tbstock/tradeStrategy/stockStrategy.py":3622
 *         return day_hot_cold_frequency_df
 * 
 *     def getIndustryHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__370 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_hot_industry_table, __pyx_n_s_trade_day_table_name, __pyx_n_s_use_date_now, __pyx_n_s_use_date_previous, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_repeat_compute, __pyx_n_s_year_start, __pyx_n_s_year_end); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getIndustryHotTable, 3622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __pyx_tuple__372 = PyTuple_Pack(2, ((PyObject *)__pyx_int_5), ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "tbstock/tradeStrategy/stockStrategy.py":3692
 *         return hot_industry_table
 * 
 *     def getConceptHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__373 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_hot_concept_table, __pyx_n_s_trade_day_table_name, __pyx_n_s_use_date_now, __pyx_n_s_use_date_previous, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_repeat_compute, __pyx_n_s_year_start, __pyx_n_s_year_end); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);
  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getConceptHotTable, 3692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 3692, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3762
 *         return hot_concept_table
 * 
 *     def getStockHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__375 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_hot_stock_table, __pyx_n_s_trade_day_table_name, __pyx_n_s_use_date_now, __pyx_n_s_use_date_previous, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_repeat_compute, __pyx_n_s_year_start, __pyx_n_s_year_end); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);
  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStockHotTable, 3762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 3762, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3827
 *         return hot_stock_table
 * 
 *     def getFutureHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__377 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_hot_future_table, __pyx_n_s_trade_day_table_name, __pyx_n_s_use_date_now, __pyx_n_s_use_date_previous, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_repeat_compute, __pyx_n_s_year_start, __pyx_n_s_year_end); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 3827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);
  __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getFutureHotTable, 3827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(0, 3827, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3892
 *         return hot_future_table
 * 
 *     def getIndexHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__379 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_num_tr, __pyx_n_s_save_file, __pyx_n_s_strategy_key_name, __pyx_n_s_need_database_tables, __pyx_n_s_data_table, __pyx_n_s_fun_name, __pyx_n_s_hot_index_table, __pyx_n_s_trade_day_table_name, __pyx_n_s_use_date_now, __pyx_n_s_use_date_previous, __pyx_n_s_json_file_name, __pyx_n_s_load_json_file, __pyx_n_s_has_strategy_file, __pyx_n_s_strategy_json, __pyx_n_s_repeat_compute, __pyx_n_s_year_start, __pyx_n_s_year_end); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 3892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);
  __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getIndexHotTable, 3892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 3892, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3959
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")
 */
  __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_init, 3959, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(0, 3959, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":3963
 *         print("pacoSelectStrategy.__init__")
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):             # <<<<<<<<<<<<<<
 *         '''
 *         near_day
 */
  __pyx_tuple__382 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_near_day, __pyx_n_s_market_type, __pyx_n_s_marker_stock_list, __pyx_n_s_industry_list, __pyx_n_s_industry_stock_list, __pyx_n_s_concept_list, __pyx_n_s_concept_stock_list, __pyx_n_s_area_list, __pyx_n_s_area_stock_list, __pyx_n_s_union_stock_list, __pyx_n_s_intersect_stock_list, __pyx_n_s_financial_mode, __pyx_n_s_filter_dict, __pyx_n_s_selection_df, __pyx_n_s_stock_hold_num_table, __pyx_n_s_code); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getPotentialLimitUpStockNearDay, 3963, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __pyx_tuple__384 = PyTuple_Pack(1, ((PyObject *)__pyx_int_30)); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);

  /* "tbstock/tradeStrategy/stockStrategy.py":4051
 *         return stock_hold_num_table
 * 
 *     def getPotentialConceptStock(self, concept_list=None):             # <<<<<<<<<<<<<<
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']
 */
  __pyx_tuple__385 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_concept_list, __pyx_n_s_concept_stock_list, __pyx_n_s_top_up_limit, __pyx_n_s_top_amplitude, __pyx_n_s_name_up_limit_times, __pyx_n_s_limit_up_code_list, __pyx_n_s_stock_hold_num_table); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);
  __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getPotentialConceptStock, 4051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(0, 4051, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4067
 *         return stock_hold_num_table
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):             # <<<<<<<<<<<<<<
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']
 */
  __pyx_tuple__387 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_industry_list, __pyx_n_s_industry_stock_list, __pyx_n_s_top_up_limit, __pyx_n_s_top_amplitude, __pyx_n_s_name_up_limit_times, __pyx_n_s_limit_up_code_list, __pyx_n_s_stock_hold_num_table); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);
  __pyx_codeobj__388 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getPotentialIndustryStock, 4067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__388)) __PYX_ERR(0, 4067, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4084
 * 
 * 
 * def test_select_stock():             # <<<<<<<<<<<<<<
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 */
  __pyx_tuple__389 = PyTuple_Pack(7, __pyx_n_s_save_strategy, __pyx_n_s_my_method, __pyx_n_s_start, __pyx_n_s_my_dict, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_end); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);
  __pyx_codeobj__390 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_test_select_stock, 4084, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__390)) __PYX_ERR(0, 4084, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4106
 * 
 * 
 * def getStrategyDataAndImg_new():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 * 
 */
  __pyx_tuple__391 = PyTuple_Pack(5, __pyx_n_s_save_strategy, __pyx_n_s_start, __pyx_n_s_publish_strategy, __pyx_n_s_my_plot, __pyx_n_s_end); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 4106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_getStrategyDataAndImg_new, 4106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(0, 4106, __pyx_L1_error)

  /* "tbstock/tradeStrategy/stockStrategy.py":4121
 * 
 * 
 * def simple_test():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 *     # my_method = publishStrategy(save_json=save_strategy)
 */
  __pyx_tuple__393 = PyTuple_Pack(9, __pyx_n_s_save_strategy, __pyx_n_s_my_method, __pyx_n_s_start, __pyx_n_s_market_type, __pyx_n_s_input_codes, __pyx_n_s_quantile_amplitude_tr, __pyx_n_s_select_df, __pyx_n_s_ret, __pyx_n_s_end); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);
  __pyx_codeobj__394 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_tradeStrategy_stockStrat_2, __pyx_n_s_simple_test, 4121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__394)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_items.method_name = &__pyx_n_s_items;
  __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_keys.method_name = &__pyx_n_s_keys;
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_pop.method_name = &__pyx_n_s_pop;
  __pyx_umethod_PyList_Type_index.type = (PyObject*)&PyList_Type;
  __pyx_umethod_PyList_Type_index.method_name = &__pyx_n_s_index;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_2 = PyFloat_FromDouble(0.2); if (unlikely(!__pyx_float_0_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_3 = PyFloat_FromDouble(0.3); if (unlikely(!__pyx_float_0_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_4 = PyFloat_FromDouble(0.4); if (unlikely(!__pyx_float_0_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_8 = PyFloat_FromDouble(0.8); if (unlikely(!__pyx_float_0_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_5 = PyFloat_FromDouble(1.5); if (unlikely(!__pyx_float_1_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_5_0 = PyFloat_FromDouble(5.0); if (unlikely(!__pyx_float_5_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_10_0 = PyFloat_FromDouble(10.0); if (unlikely(!__pyx_float_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_25_0 = PyFloat_FromDouble(25.0); if (unlikely(!__pyx_float_25_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_30_0 = PyFloat_FromDouble(30.0); if (unlikely(!__pyx_float_30_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_50_0 = PyFloat_FromDouble(50.0); if (unlikely(!__pyx_float_50_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_9_85 = PyFloat_FromDouble(9.85); if (unlikely(!__pyx_float_9_85)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_100_0 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_float_100_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_neg_9_85 = PyFloat_FromDouble(-9.85); if (unlikely(!__pyx_float_neg_9_85)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_250 = PyInt_FromLong(250); if (unlikely(!__pyx_int_250)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_252 = PyInt_FromLong(252); if (unlikely(!__pyx_int_252)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_300 = PyInt_FromLong(300); if (unlikely(!__pyx_int_300)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_500 = PyInt_FromLong(500); if (unlikely(!__pyx_int_500)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1900 = PyInt_FromLong(1900); if (unlikely(!__pyx_int_1900)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2023 = PyInt_FromLong(2023); if (unlikely(!__pyx_int_2023)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2024 = PyInt_FromLong(2024); if (unlikely(!__pyx_int_2024)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000000 = PyInt_FromLong(1000000L); if (unlikely(!__pyx_int_1000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50000000 = PyInt_FromLong(50000000L); if (unlikely(!__pyx_int_50000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100000000 = PyInt_FromLong(100000000L); if (unlikely(!__pyx_int_100000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_4 = PyInt_FromLong(-4); if (unlikely(!__pyx_int_neg_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_5 = PyInt_FromLong(-5); if (unlikely(!__pyx_int_neg_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_59 = PyInt_FromLong(-59); if (unlikely(!__pyx_int_neg_59)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap)) __PYX_ERR(0, 1807, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct__selectByMarketCap->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket)) __PYX_ERR(0, 1899, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_1_selectByMarket->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice)) __PYX_ERR(0, 1932, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_2_selectByStockPrice->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty__spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_)) __PYX_ERR(0, 2554, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty__spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_) < 0) __PYX_ERR(0, 2554, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_ = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_) < 0) __PYX_ERR(0, 2554, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_3_getStockProperty_->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty)) __PYX_ERR(0, 2647, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_4_stockSingleStockProperty->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio)) __PYX_ERR(0, 2781, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_5_getStockWavePriceRatio->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio)) __PYX_ERR(0, 2903, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio) < 0) __PYX_ERR(0, 2903, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio) < 0) __PYX_ERR(0, 2903, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_6_getSingleStockWavePriceRatio->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable)) __PYX_ERR(0, 3019, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable_spec, __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable = &__pyx_type_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable->tp_dictoffset && __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_13tradeStrategy_13stockStrategy___pyx_scope_struct_7_getTradeDistributionTable->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_stockStrategy(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_stockStrategy},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "stockStrategy",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initstockStrategy(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initstockStrategy(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_stockStrategy(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_stockStrategy(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_stockStrategy(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'stockStrategy' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("stockStrategy", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "stockStrategy" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_stockStrategy(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_tbstock__tradeStrategy__stockStrategy) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "tbstock.tradeStrategy.stockStrategy")) {
      if (unlikely((PyDict_SetItemString(modules, "tbstock.tradeStrategy.stockStrategy", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "tbstock/tradeStrategy/stockStrategy.py":1
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * import time
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * import time
 * import math
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3
 * import os
 * import sys
 * import time             # <<<<<<<<<<<<<<
 * import math
 * from copy import deepcopy
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_time, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4
 * import sys
 * import time
 * import math             # <<<<<<<<<<<<<<
 * from copy import deepcopy
 * from datetime import datetime
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_math, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_2) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":5
 * import time
 * import math
 * from copy import deepcopy             # <<<<<<<<<<<<<<
 * from datetime import datetime
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_deepcopy);
  __Pyx_GIVEREF(__pyx_n_s_deepcopy);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_deepcopy)) __PYX_ERR(0, 5, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_copy, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deepcopy, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":6
 * import math
 * from copy import deepcopy
 * from datetime import datetime             # <<<<<<<<<<<<<<
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
 * import matplotlib.pyplot as plt
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_datetime)) __PYX_ERR(0, 6, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_3) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":7
 * from copy import deepcopy
 * from datetime import datetime
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor             # <<<<<<<<<<<<<<
 * import matplotlib.pyplot as plt
 * import matplotlib
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ThreadPoolExecutor);
  __Pyx_GIVEREF(__pyx_n_s_ThreadPoolExecutor);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ThreadPoolExecutor)) __PYX_ERR(0, 7, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_as_completed);
  __Pyx_GIVEREF(__pyx_n_s_as_completed);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_as_completed)) __PYX_ERR(0, 7, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ProcessPoolExecutor);
  __Pyx_GIVEREF(__pyx_n_s_ProcessPoolExecutor);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_ProcessPoolExecutor)) __PYX_ERR(0, 7, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_concurrent_futures, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ThreadPoolExecutor, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_as_completed, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessPoolExecutor, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":8
 * from datetime import datetime
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
 * import matplotlib.pyplot as plt             # <<<<<<<<<<<<<<
 * import matplotlib
 * import pandas as pd
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_matplotlib_pyplot, __pyx_tuple__154); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_plt, __pyx_t_3) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":9
 * from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
 * import matplotlib.pyplot as plt
 * import matplotlib             # <<<<<<<<<<<<<<
 * import pandas as pd
 * import talib
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_matplotlib, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_matplotlib, __pyx_t_3) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":10
 * import matplotlib.pyplot as plt
 * import matplotlib
 * import pandas as pd             # <<<<<<<<<<<<<<
 * import talib
 * from tqdm import tqdm
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_pandas, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pd, __pyx_t_3) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":11
 * import matplotlib
 * import pandas as pd
 * import talib             # <<<<<<<<<<<<<<
 * from tqdm import tqdm
 * from typing import Union, Dict, List
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_talib, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_talib, __pyx_t_3) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":12
 * import pandas as pd
 * import talib
 * from tqdm import tqdm             # <<<<<<<<<<<<<<
 * from typing import Union, Dict, List
 * from collections import Counter
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_tqdm);
  __Pyx_GIVEREF(__pyx_n_s_tqdm);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_tqdm)) __PYX_ERR(0, 12, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_tqdm, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tqdm, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":13
 * import talib
 * from tqdm import tqdm
 * from typing import Union, Dict, List             # <<<<<<<<<<<<<<
 * from collections import Counter
 * import tbstock.dataManagement.dataPreprocess as dataproc
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Union);
  __Pyx_GIVEREF(__pyx_n_s_Union);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Union)) __PYX_ERR(0, 13, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Dict)) __PYX_ERR(0, 13, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_List)) __PYX_ERR(0, 13, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Union, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":14
 * from tqdm import tqdm
 * from typing import Union, Dict, List
 * from collections import Counter             # <<<<<<<<<<<<<<
 * import tbstock.dataManagement.dataPreprocess as dataproc
 * from tbstock.utils import utils
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Counter);
  __Pyx_GIVEREF(__pyx_n_s_Counter);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Counter)) __PYX_ERR(0, 14, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Counter, __pyx_t_3) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":15
 * from typing import Union, Dict, List
 * from collections import Counter
 * import tbstock.dataManagement.dataPreprocess as dataproc             # <<<<<<<<<<<<<<
 * from tbstock.utils import utils
 * from tbstock.dataAcquisition.models import *
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_tbstock_dataManagement_dataPrepr, __pyx_tuple__155); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dataproc, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":16
 * from collections import Counter
 * import tbstock.dataManagement.dataPreprocess as dataproc
 * from tbstock.utils import utils             # <<<<<<<<<<<<<<
 * from tbstock.dataAcquisition.models import *
 * from sqlalchemy import and_, or_, not_
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_utils);
  __Pyx_GIVEREF(__pyx_n_s_utils);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_utils)) __PYX_ERR(0, 16, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_tbstock_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":17
 * import tbstock.dataManagement.dataPreprocess as dataproc
 * from tbstock.utils import utils
 * from tbstock.dataAcquisition.models import *             # <<<<<<<<<<<<<<
 * from sqlalchemy import and_, or_, not_
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s__58);
  __Pyx_GIVEREF(__pyx_n_s__58);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s__58)) __PYX_ERR(0, 17, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_tbstock_dataAcquisition_models, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":18
 * from tbstock.utils import utils
 * from tbstock.dataAcquisition.models import *
 * from sqlalchemy import and_, or_, not_             # <<<<<<<<<<<<<<
 * 
 * from selenium.webdriver.edge.options import Options
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_and);
  __Pyx_GIVEREF(__pyx_n_s_and);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_and)) __PYX_ERR(0, 18, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_or);
  __Pyx_GIVEREF(__pyx_n_s_or);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_or)) __PYX_ERR(0, 18, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_not);
  __Pyx_GIVEREF(__pyx_n_s_not);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_not)) __PYX_ERR(0, 18, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_sqlalchemy, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_and); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_and, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_or); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_or, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_not); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_not, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":20
 * from sqlalchemy import and_, or_, not_
 * 
 * from selenium.webdriver.edge.options import Options             # <<<<<<<<<<<<<<
 * from selenium.webdriver.edge.service import Service
 * from selenium import webdriver
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Options);
  __Pyx_GIVEREF(__pyx_n_s_Options);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Options)) __PYX_ERR(0, 20, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_selenium_webdriver_edge_options, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Options, __pyx_t_3) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":21
 * 
 * from selenium.webdriver.edge.options import Options
 * from selenium.webdriver.edge.service import Service             # <<<<<<<<<<<<<<
 * from selenium import webdriver
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Service);
  __Pyx_GIVEREF(__pyx_n_s_Service);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Service)) __PYX_ERR(0, 21, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_selenium_webdriver_edge_service, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Service); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Service, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":22
 * from selenium.webdriver.edge.options import Options
 * from selenium.webdriver.edge.service import Service
 * from selenium import webdriver             # <<<<<<<<<<<<<<
 * 
 * from snapshot_selenium import snapshot as fun_driver
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_webdriver);
  __Pyx_GIVEREF(__pyx_n_s_webdriver);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_webdriver)) __PYX_ERR(0, 22, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_selenium, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_webdriver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_webdriver, __pyx_t_3) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":24
 * from selenium import webdriver
 * 
 * from snapshot_selenium import snapshot as fun_driver             # <<<<<<<<<<<<<<
 * from pyecharts.render import make_snapshot
 * from pyecharts import options as opts
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_snapshot);
  __Pyx_GIVEREF(__pyx_n_s_snapshot);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_snapshot)) __PYX_ERR(0, 24, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_snapshot_selenium, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_snapshot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fun_driver, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":25
 * 
 * from snapshot_selenium import snapshot as fun_driver
 * from pyecharts.render import make_snapshot             # <<<<<<<<<<<<<<
 * from pyecharts import options as opts
 * from pyecharts.commons.utils import JsCode
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_make_snapshot);
  __Pyx_GIVEREF(__pyx_n_s_make_snapshot);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_make_snapshot)) __PYX_ERR(0, 25, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyecharts_render, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_make_snapshot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_snapshot, __pyx_t_3) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":26
 * from snapshot_selenium import snapshot as fun_driver
 * from pyecharts.render import make_snapshot
 * from pyecharts import options as opts             # <<<<<<<<<<<<<<
 * from pyecharts.commons.utils import JsCode
 * from pyecharts.charts import Kline, Line, Bar, Grid
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_options);
  __Pyx_GIVEREF(__pyx_n_s_options);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_options)) __PYX_ERR(0, 26, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_pyecharts, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_opts, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":27
 * from pyecharts.render import make_snapshot
 * from pyecharts import options as opts
 * from pyecharts.commons.utils import JsCode             # <<<<<<<<<<<<<<
 * from pyecharts.charts import Kline, Line, Bar, Grid
 * from pyecharts.globals import ThemeType
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_JsCode);
  __Pyx_GIVEREF(__pyx_n_s_JsCode);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_JsCode)) __PYX_ERR(0, 27, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyecharts_commons_utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_JsCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_JsCode, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":28
 * from pyecharts import options as opts
 * from pyecharts.commons.utils import JsCode
 * from pyecharts.charts import Kline, Line, Bar, Grid             # <<<<<<<<<<<<<<
 * from pyecharts.globals import ThemeType
 * from plottable import ColDef, Table
 */
  __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Kline);
  __Pyx_GIVEREF(__pyx_n_s_Kline);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Kline)) __PYX_ERR(0, 28, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Line);
  __Pyx_GIVEREF(__pyx_n_s_Line);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Line)) __PYX_ERR(0, 28, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Bar);
  __Pyx_GIVEREF(__pyx_n_s_Bar);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_Bar)) __PYX_ERR(0, 28, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Grid);
  __Pyx_GIVEREF(__pyx_n_s_Grid);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_Grid)) __PYX_ERR(0, 28, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_pyecharts_charts, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Kline); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Kline, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Line, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Bar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Bar, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Grid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Grid, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":29
 * from pyecharts.commons.utils import JsCode
 * from pyecharts.charts import Kline, Line, Bar, Grid
 * from pyecharts.globals import ThemeType             # <<<<<<<<<<<<<<
 * from plottable import ColDef, Table
 * from plottable.cmap import normed_cmap
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_ThemeType);
  __Pyx_GIVEREF(__pyx_n_s_ThemeType);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ThemeType)) __PYX_ERR(0, 29, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyecharts_globals, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ThemeType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ThemeType, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":30
 * from pyecharts.charts import Kline, Line, Bar, Grid
 * from pyecharts.globals import ThemeType
 * from plottable import ColDef, Table             # <<<<<<<<<<<<<<
 * from plottable.cmap import normed_cmap
 * import mplfinance as mpf
 */
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ColDef);
  __Pyx_GIVEREF(__pyx_n_s_ColDef);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ColDef)) __PYX_ERR(0, 30, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Table);
  __Pyx_GIVEREF(__pyx_n_s_Table);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Table)) __PYX_ERR(0, 30, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_plottable, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ColDef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ColDef, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Table); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Table, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":31
 * from pyecharts.globals import ThemeType
 * from plottable import ColDef, Table
 * from plottable.cmap import normed_cmap             # <<<<<<<<<<<<<<
 * import mplfinance as mpf
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_normed_cmap);
  __Pyx_GIVEREF(__pyx_n_s_normed_cmap);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_normed_cmap)) __PYX_ERR(0, 31, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_plottable_cmap, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_normed_cmap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_normed_cmap, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":32
 * from plottable import ColDef, Table
 * from plottable.cmap import normed_cmap
 * import mplfinance as mpf             # <<<<<<<<<<<<<<
 * 
 * # mplfinanceupdown
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_mplfinance, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpf, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":35
 * 
 * # mplfinanceupdown
 * my_color = mpf.make_marketcolors(up='r',             # <<<<<<<<<<<<<<
 *                                  down='g',
 *                                  edge='inherit',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mpf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_make_marketcolors); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_up, __pyx_n_s_r) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_down, __pyx_n_s_g) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_edge, __pyx_n_s_inherit) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wick, __pyx_n_s_inherit) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_volume, __pyx_n_s_inherit) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_my_color, __pyx_t_4) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":41
 *                                  volume='inherit')
 * #
 * my_style = mpf.make_mpf_style(marketcolors=my_color,             # <<<<<<<<<<<<<<
 *                               figcolor='(0.82, 0.83, 0.85)',
 *                               gridcolor='(0.82, 0.83, 0.85)')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_mpf); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_make_mpf_style); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_my_color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_marketcolors, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_figcolor, __pyx_kp_s_0_82_0_83_0_85) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_gridcolor, __pyx_kp_s_0_82_0_83_0_85) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_my_style, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":45
 *                               gridcolor='(0.82, 0.83, 0.85)')
 * 
 * plt.rc("font", family="AR PL UKai CN")  ###             # <<<<<<<<<<<<<<
 * plt.rcParams['axes.unicode_minus'] = False  #
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_plt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_rc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_family, __pyx_kp_s_AR_PL_UKai_CN) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__156, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":46
 * 
 * plt.rc("font", family="AR PL UKai CN")  ###
 * plt.rcParams['axes.unicode_minus'] = False  #             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_plt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rcParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_kp_s_axes_unicode_minus, Py_False) < 0))) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":49
 * 
 * 
 * class visualStock(object):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_tuple__158); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_visualStock, __pyx_n_s_visualStock, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_K_2_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_tuple__158) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__158) < 0))) __PYX_ERR(0, 49, __pyx_L1_error)
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":57
 *     """
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.my_dataproc = dataproc.dataPreprocess()
 *         self.img_save_path_root = utils.img_save_path_root
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_1__init__, 0, __pyx_n_s_visualStock___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":63
 *         self.getWebDriver()
 * 
 *     def getWebDriver(self):             # <<<<<<<<<<<<<<
 *         service = Service(executable_path=utils.edge_driver_path)
 *         options = Options()
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_3getWebDriver, 0, __pyx_n_s_visualStock_getWebDriver, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getWebDriver, __pyx_t_5) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":69
 *         # self.driver.close()
 * 
 *     def closeDriver(self):             # <<<<<<<<<<<<<<
 *         self.driver.close()
 *         self.driver.quit()
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_5closeDriver, 0, __pyx_n_s_visualStock_closeDriver, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_closeDriver, __pyx_t_5) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":73
 *         self.driver.quit()
 * 
 *     def setPlotTimeLock(self):             # <<<<<<<<<<<<<<
 *         '''
 *         True:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_7setPlotTimeLock, 0, __pyx_n_s_visualStock_setPlotTimeLock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setPlotTimeLock, __pyx_t_5) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":81
 *         self.lock_time = False
 * 
 *     def setStrategyJsonFile(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.filename = os.path.basename(strategy_json_file)
 *         self.base_filename, file_extension = os.path.splitext(self.filename)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_9setStrategyJsonFile, 0, __pyx_n_s_visualStock_setStrategyJsonFile, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setStrategyJsonFile, __pyx_t_5) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":95
 *             raise RuntimeError(f"{strategy_json_file}.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_11dumpJsonToFile, 0, __pyx_n_s_visualStock_dumpJsonToFile, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_dumpJsonToFile, __pyx_t_5) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":99
 *         utils.dumpJsonToFile(self.strategy_json_file, self.strategy_json, self.filename, False)
 * 
 *     def plotStrategyFigure(self, strategy_json_file):             # <<<<<<<<<<<<<<
 *         self.setStrategyJsonFile(strategy_json_file)
 *         if 'figured' in self.strategy_json and self.strategy_json['figured']:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_13plotStrategyFigure, 0, __pyx_n_s_visualStock_plotStrategyFigure, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotStrategyFigure, __pyx_t_5) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":121
 *         self.dumpJsonToFile()
 * 
 *     def plotTop10UpLimit(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_up_limit'
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_15plotTop10UpLimit, 0, __pyx_n_s_visualStock_plotTop10UpLimit, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotTop10UpLimit, __pyx_t_5) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":165
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTop10Amplitude(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'top_10_amplitude'
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_17plotTop10Amplitude, 0, __pyx_n_s_visualStock_plotTop10Amplitude, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotTop10Amplitude, __pyx_t_5) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":207
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveUpRank(self, show_fig=False):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_up'
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_19plotWaveUpRank, 0, __pyx_n_s_visualStock_plotWaveUpRank, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotWaveUpRank, __pyx_t_5) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":255
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotWaveDownRank(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_wave_down'
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_21plotWaveDownRank, 0, __pyx_n_s_visualStock_plotWaveDownRank, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotWaveDownRank, __pyx_t_5) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":302
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotTradeDistributionLen(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'trade_distribution_len'
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_23plotTradeDistributionLen, 0, __pyx_n_s_visualStock_plotTradeDistributio, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotTradeDistributionLen, __pyx_t_5) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":367
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotStockUplimtLadder(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'stock_uplimt_ladder'
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_25plotStockUplimtLadder, 0, __pyx_n_s_visualStock_plotStockUplimtLadde, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotStockUplimtLadder, __pyx_t_5) < 0) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":431
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryConceptFrequency(self, mode='industry', show_fig=False):             # <<<<<<<<<<<<<<
 * 
 *         if mode not in ['industry', 'concept']:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_27plotHotColdIndustryConceptFrequency, 0, __pyx_n_s_visualStock_plotHotColdIndustryC, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__183);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdIndustryConceptFreque, __pyx_t_5) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":508
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def plotHotColdIndustryTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_industry_table'
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_29plotHotColdIndustryTable, 0, __pyx_n_s_visualStock_plotHotColdIndustryT, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdIndustryTable, __pyx_t_5) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":518
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def _plotHotColdTables(self, strategy_key_name, type_name):             # <<<<<<<<<<<<<<
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = {}
 *         strategy_data_dict = deepcopy(self.strategy_json[strategy_key_name])
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_31_plotHotColdTables, 0, __pyx_n_s_visualStock__plotHotColdTables, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdTables, __pyx_t_5) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":684
 *         # # self.strategy_json[strategy_key_name]['strategy_img_path'] = table_save_png_path
 * 
 *     def _plotTablePandas(self, plot_df, table_title, table_save_png_path, col_title, color_list):             # <<<<<<<<<<<<<<
 *         ##
 *         fig, ax = plt.subplots(figsize=(8, 8))
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_33_plotTablePandas, 0, __pyx_n_s_visualStock__plotTablePandas, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotTablePandas, __pyx_t_5) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":712
 *         plt.close()
 * 
 *     def _convertDictToPandas(self, near_name, ori_dict, time_key='') -> pd.DataFrame:             # <<<<<<<<<<<<<<
 *         if time_key:
 *             new_dict = {'key_time': [], 'key_name': [], '': [], '': [], '': [], '': [], '': []}
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_kp_s_pd_DataFrame) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_35_convertDictToPandas, 0, __pyx_n_s_visualStock__convertDictToPandas, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__192);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_convertDictToPandas, __pyx_t_6) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":740
 *         return new_df
 * 
 *     def _saveToImg(self, table_save_excel_path, table_save_png_path):             # <<<<<<<<<<<<<<
 *         import spire.xls as spires
 *         import spire.xls.common as spires_common
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_37_saveToImg, 0, __pyx_n_s_visualStock__saveToImg, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_saveToImg, __pyx_t_6) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":759
 *         workbook.Dispose()
 * 
 *     def plotHotColdConceptTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_concept_table'
 *         #
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_39plotHotColdConceptTable, 0, __pyx_n_s_visualStock_plotHotColdConceptTa, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdConceptTable, __pyx_t_6) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":769
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdStockTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_stock_table'
 *         #
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_41plotHotColdStockTable, 0, __pyx_n_s_visualStock_plotHotColdStockTabl, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdStockTable, __pyx_t_6) < 0) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":779
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdFutureTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_future_table'
 *         #
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_43plotHotColdFutureTable, 0, __pyx_n_s_visualStock_plotHotColdFutureTab, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdFutureTable, __pyx_t_6) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":789
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHotColdIndexTable(self):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hot_cold_index_table'
 *         #
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_45plotHotColdIndexTable, 0, __pyx_n_s_visualStock_plotHotColdIndexTabl, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHotColdIndexTable, __pyx_t_6) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":799
 *         self._plotHotColdTables(strategy_key_name, type_name)
 * 
 *     def plotHoldNumberDecrease(self, table_rows=25):             # <<<<<<<<<<<<<<
 *         strategy_key_name = 'hold_number_decrease'
 *         #
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_47plotHoldNumberDecrease, 0, __pyx_n_s_visualStock_plotHoldNumberDecrea, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__201);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotHoldNumberDecrease, __pyx_t_6) < 0) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":854
 *         self.strategy_json[strategy_key_name]['strategy_img_path'] = temp_dict
 * 
 *     def splitStockData(self, origin_df: pd.DataFrame) -> dict:             # <<<<<<<<<<<<<<
 *         datas = origin_df.loc[:, ['open', 'close', 'low', 'high']].round(2).values.tolist()  # open,close,low,high
 *         times = origin_df['date'].tolist()
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_origin_df, __pyx_kp_s_pd_DataFrame) < 0) __PYX_ERR(0, 854, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_49splitStockData, 0, __pyx_n_s_visualStock_splitStockData, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_splitStockData, __pyx_t_5) < 0) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":880
 *         }
 * 
 *     def drawKlineChart(self, data, stock_code):             # <<<<<<<<<<<<<<
 *         kline = (
 *             Kline()
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_51drawKlineChart, 0, __pyx_n_s_visualStock_drawKlineChart, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_drawKlineChart, __pyx_t_5) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1149
 *         # make_snapshot(fun_driver, file_name=f"{stock_code}_kline.html", output_name=f"{stock_code}_kline.png", driver=self.driver)
 * 
 *     def plotKline(self, stock_code='601360', start_date='20240101', end_date='20240625'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         tech_index = stockTechInd(stock_data)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_53plotKline, 0, __pyx_n_s_visualStock_plotKline, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__208);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotKline, __pyx_t_5) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1163
 *         self.drawKlineChart(data, stock_code)
 * 
 *     def plotKlineMpl(self, stock_code='601360', start_date='20240101', end_date='20240813'):             # <<<<<<<<<<<<<<
 *         res, stock_data = self.my_dataproc.getStockTradeDayInfoFq(stock_code, 'qfq', start_date, end_date)
 *         if not res:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_11visualStock_55plotKlineMpl, 0, __pyx_n_s_visualStock_plotKlineMpl, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__211);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_plotKlineMpl, __pyx_t_5) < 0) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":49
 * 
 * 
 * class visualStock(object):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_visualStock, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_visualStock, __pyx_t_5) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1187
 * 
 * 
 * class stockTechInd(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, stock_data, figure=False):
 *         '''
 */
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_tuple__213); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_stockTechInd, __pyx_n_s_stockTechInd, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_tuple__213) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__213) < 0))) __PYX_ERR(0, 1187, __pyx_L1_error)
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1188
 * 
 * class stockTechInd(object):
 *     def __init__(self, stock_data, figure=False):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_data,code,date,open,high,low,close,volume,amount,turn_over
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_1__init__, 0, __pyx_n_s_stockTechInd___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1197
 *         self.show_figure = figure
 * 
 *     def setStockDataDf(self, stock_data_df):             # <<<<<<<<<<<<<<
 *         self.stock_data = stock_data_df
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_3setStockDataDf, 0, __pyx_n_s_stockTechInd_setStockDataDf, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setStockDataDf, __pyx_t_5) < 0) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1200
 *         self.stock_data = stock_data_df
 * 
 *     def setFigureShow(self, figure):             # <<<<<<<<<<<<<<
 *         self.show_figure = figure
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_5setFigureShow, 0, __pyx_n_s_stockTechInd_setFigureShow, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setFigureShow, __pyx_t_5) < 0) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1204
 * 
 *     # MA
 *     def MaAll(self):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_7MaAll, 0, __pyx_n_s_stockTechInd_MaAll, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_MaAll, __pyx_t_5) < 0) __PYX_ERR(0, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1218
 *         return df_ma
 * 
 *     def MA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_9MA, 0, __pyx_n_s_stockTechInd_MA, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__224);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_MA, __pyx_t_5) < 0) __PYX_ERR(0, 1218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1237
 * 
 *     # EMA
 *     def EMA(self, ma_column='close', ma_time=None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_11EMA, 0, __pyx_n_s_stockTechInd_EMA, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__224);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_EMA, __pyx_t_5) < 0) __PYX_ERR(0, 1237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1258
 * 
 *     # MACD
 *     def MACD(self):             # <<<<<<<<<<<<<<
 *         '''
 *         difDIFEMA-EMADEADIF9EMA
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_13MACD, 0, __pyx_n_s_stockTechInd_MACD, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_MACD, __pyx_t_5) < 0) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1274
 * 
 *     # RSI
 *     def RSI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         df["rsi"] = talib.RSI(df.close, timeperiod=14)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_15RSI, 0, __pyx_n_s_stockTechInd_RSI, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_RSI, __pyx_t_5) < 0) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1285
 * 
 *     # BOLL
 *     def BOLL(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close']].copy()
 *         H_line, M_line, L_line = talib.BBANDS(df.close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_17BOLL, 0, __pyx_n_s_stockTechInd_BOLL, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_BOLL, __pyx_t_5) < 0) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1298
 * 
 *     # KDJ
 *     def KDJ(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['K'], df['D'] = talib.STOCH(df.high, df.low, df.close, fastk_period=9, slowk_period=3,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_19KDJ, 0, __pyx_n_s_stockTechInd_KDJ, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_KDJ, __pyx_t_5) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1312
 * 
 *     # W&M
 *     def WILLR(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_21WILLR, 0, __pyx_n_s_stockTechInd_WILLR, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_WILLR, __pyx_t_5) < 0) __PYX_ERR(0, 1312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1322
 * 
 *     # DMI
 *     def DMI(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'high', 'low', 'close']].copy()
 *         df['ADX'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, timeperiod=14)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_23DMI, 0, __pyx_n_s_stockTechInd_DMI, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_DMI, __pyx_t_5) < 0) __PYX_ERR(0, 1322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1335
 * 
 *     # OBV
 *     def OBV(self):             # <<<<<<<<<<<<<<
 *         df = self.stock_data[['date', 'close', 'volume']].copy()
 *         df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_25OBV, 0, __pyx_n_s_stockTechInd_OBV, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_OBV, __pyx_t_5) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1344
 *         return df
 * 
 *     def CDL2CROWS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL2CROWS
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_27CDL2CROWS, 0, __pyx_n_s_stockTechInd_CDL2CROWS, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDL2CROWS, __pyx_t_5) < 0) __PYX_ERR(0, 1344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1360
 *         return df
 * 
 *     def CDL3WHITESOLDIERS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3WHITESOLDIERS
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_29CDL3WHITESOLDIERS, 0, __pyx_n_s_stockTechInd_CDL3WHITESOLDIERS, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDL3WHITESOLDIERS, __pyx_t_5) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1377
 *         return df
 * 
 *     def CDL3STARSINSOUTH(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3STARSINSOUTH
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_31CDL3STARSINSOUTH, 0, __pyx_n_s_stockTechInd_CDL3STARSINSOUTH, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDL3STARSINSOUTH, __pyx_t_5) < 0) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1394
 *         return df
 * 
 *     def CDLHARAMI(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHARAMI
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_33CDLHARAMI, 0, __pyx_n_s_stockTechInd_CDLHARAMI, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLHARAMI, __pyx_t_5) < 0) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1410
 *         return df
 * 
 *     def CDLRISEFALL3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLRISEFALL3METHODS
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_35CDLRISEFALL3METHODS, 0, __pyx_n_s_stockTechInd_CDLRISEFALL3METHODS, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLRISEFALL3METHODS, __pyx_t_5) < 0) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1427
 *         return df
 * 
 *     def CDLXSIDEGAP3METHODS(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLXSIDEGAP3METHODS
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_37CDLXSIDEGAP3METHODS, 0, __pyx_n_s_stockTechInd_CDLXSIDEGAP3METHODS, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLXSIDEGAP3METHODS, __pyx_t_5) < 0) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1444
 *         return df
 * 
 *     def CDL3INSIDE(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDL3INSIDE
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_39CDL3INSIDE, 0, __pyx_n_s_stockTechInd_CDL3INSIDE, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDL3INSIDE, __pyx_t_5) < 0) __PYX_ERR(0, 1444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1461
 *         return df
 * 
 *     def CDLPIERCING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLPIERCING
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_41CDLPIERCING, 0, __pyx_n_s_stockTechInd_CDLPIERCING, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLPIERCING, __pyx_t_5) < 0) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1478
 *         return df
 * 
 *     def CDLHAMMER(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLHAMMER
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_43CDLHAMMER, 0, __pyx_n_s_stockTechInd_CDLHAMMER, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLHAMMER, __pyx_t_5) < 0) __PYX_ERR(0, 1478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1495
 *         return df
 * 
 *     def CDLMORNINGSTAR(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLMORNINGSTAR
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_45CDLMORNINGSTAR, 0, __pyx_n_s_stockTechInd_CDLMORNINGSTAR, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLMORNINGSTAR, __pyx_t_5) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1512
 *         return df
 * 
 *     def CDLENGULFING(self):             # <<<<<<<<<<<<<<
 *         '''
 *         CDLENGULFING
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12stockTechInd_47CDLENGULFING, 0, __pyx_n_s_stockTechInd_CDLENGULFING, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_CDLENGULFING, __pyx_t_5) < 0) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1187
 * 
 * 
 * class stockTechInd(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, stock_data, figure=False):
 *         '''
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_stockTechInd, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stockTechInd, __pyx_t_5) < 0) __PYX_ERR(0, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1530
 * 
 * 
 * class baseStrategy(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):
 *         self.dataproc = dataproc.dataPreprocess()
 */
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_tuple__249); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_baseStrategy_2, __pyx_n_s_baseStrategy_2, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_tuple__249) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__249) < 0))) __PYX_ERR(0, 1530, __pyx_L1_error)
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1531
 * 
 * class baseStrategy(object):
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):             # <<<<<<<<<<<<<<
 *         self.dataproc = dataproc.dataPreprocess()
 *         self.stock_code_name = self.dataproc.getStockSimpleInfo()
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_strategy_date, __pyx_n_s_str) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_1__init__, 0, __pyx_kp_s_baseStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_8))) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_6)->__pyx_arg_strategy_date = ((PyObject*)__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_6__defaults__);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1573
 *         print("baseStrategy.__init__")
 * 
 *     def __getstate__(self):             # <<<<<<<<<<<<<<
 *         #
 *         state = self.__dict__.copy()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_3__getstate__, 0, __pyx_n_s_baseStrategy___getstate, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_6) < 0) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1580
 *         return state
 * 
 *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
 *         #
 *         self.__dict__.update(state)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_5__setstate__, 0, __pyx_n_s_baseStrategy___setstate, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_setstate, __pyx_t_6) < 0) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1586
 *         # self.non_serializable_attribute = None  #
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         self.use_date = use_date
 *         self.use_datetime = datetime.strptime(self.use_date, '%Y%m%d')
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_7reset, 0, __pyx_n_s_baseStrategy_reset, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_reset, __pyx_t_6) < 0) __PYX_ERR(0, 1586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1597
 *             self.has_strategy_file, self.strategy_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 * 
 *     def checkDatabaseTableUpdate(self):             # <<<<<<<<<<<<<<
 *         json_file_name = self.use_date + '_updatelog.json'
 *         load_json_file = utils.update_db_logs_dir + json_file_name
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_9checkDatabaseTableUpdate, 0, __pyx_n_s_baseStrategy_checkDatabaseTableU, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_checkDatabaseTableUpdate, __pyx_t_6) < 0) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1609
 *             raise RuntimeError(f"{self.use_date}Mysql.")
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_11dumpJsonToFile, 0, __pyx_n_s_baseStrategy_dumpJsonToFile, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_dumpJsonToFile, __pyx_t_6) < 0) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1613
 *         utils.dumpJsonToFile(self.load_json_file, self.strategy_json, self.json_file_name, False)
 * 
 *     def getStockNameByCode(self, stock_code: str) -> str:             # <<<<<<<<<<<<<<
 *         if not isinstance(stock_code, str):
 *             stock_code = str(stock_code)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_stock_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 1613, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_str) < 0) __PYX_ERR(0, 1613, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_13getStockNameByCode, 0, __pyx_n_s_baseStrategy_getStockNameByCode, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockNameByCode, __pyx_t_5) < 0) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1623
 *         return name
 * 
 *     def getAllDelistStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_delist'] = all_stock_simple_info['name'].apply(self.isDelistStock)
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1623, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_15getAllDelistStock, 0, __pyx_n_s_baseStrategy_getAllDelistStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getAllDelistStock, __pyx_t_6) < 0) __PYX_ERR(0, 1623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1632
 *         return delist_stock_dict
 * 
 *     def getAllStStock(self) -> dict:             # <<<<<<<<<<<<<<
 *         all_stock_simple_info = self.dataproc.loadTable('stock_simple_info')
 *         all_stock_simple_info['is_st'] = all_stock_simple_info['name'].apply(self.isStStock)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_17getAllStStock, 0, __pyx_n_s_baseStrategy_getAllStStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getAllStStock, __pyx_t_5) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1641
 *         return st_stock_dict
 * 
 *     def getAllNewStock(self, new_thr: int = 90) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_new_thr, __pyx_n_s_int) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_19getAllNewStock, 0, __pyx_n_s_baseStrategy_getAllNewStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_int_90)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_int_90))) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_INCREF(__pyx_int_90);
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_6)->__pyx_arg_new_thr = ((PyObject*)__pyx_int_90);
  __Pyx_GIVEREF(__pyx_int_90);
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_8__defaults__);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getAllNewStock, __pyx_t_6) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1654
 *         return new_stock_dict
 * 
 *     def isNewStock(self, stock_code: str, new_thr: int = 90):             # <<<<<<<<<<<<<<
 *         if not self.new_stock_dict:
 *             self.new_stock_dict = self.getAllNewStock(new_thr)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_stock_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_new_thr, __pyx_n_s_int) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_21isNewStock, 0, __pyx_n_s_baseStrategy_isNewStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 1654, __pyx_L1_error)
  if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_int_90)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_int_90))) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_INCREF(__pyx_int_90);
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_5)->__pyx_arg_new_thr = ((PyObject*)__pyx_int_90);
  __Pyx_GIVEREF(__pyx_int_90);
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_7tbstock_13tradeStrategy_13stockStrategy_10__defaults__);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_isNewStock, __pyx_t_5) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1662
 *             return False
 * 
 *     def isDelistStock(self, stock_tag: str):             # <<<<<<<<<<<<<<
 *         '''
 *         ""
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_stock_tag, __pyx_n_s_str) < 0) __PYX_ERR(0, 1662, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_23isDelistStock, 0, __pyx_n_s_baseStrategy_isDelistStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_isDelistStock, __pyx_t_6) < 0) __PYX_ERR(0, 1662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1676
 *             return False
 * 
 *     def isStStock(self, stock_tag):             # <<<<<<<<<<<<<<
 *         is_code = utils.startWithDigit(stock_tag)
 *         if is_code:
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_25isStStock, 0, __pyx_n_s_baseStrategy_isStStock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_isStStock, __pyx_t_6) < 0) __PYX_ERR(0, 1676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1687
 *             return False
 * 
 *     def isUpLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 1687, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_27isUpLimit, 0, __pyx_n_s_baseStrategy_isUpLimit, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__275);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_isUpLimit, __pyx_t_5) < 0) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1695
 *         return is_up_limit
 * 
 *     def isDownLimit(self, stock_code, close, pre_close, stock_name='0') -> bool:             # <<<<<<<<<<<<<<
 *         if stock_name == '0':
 *             stock_name = self.getStockNameByCode(stock_code)
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 1695, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_29isDownLimit, 0, __pyx_n_s_baseStrategy_isDownLimit, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__275);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_isDownLimit, __pyx_t_6) < 0) __PYX_ERR(0, 1695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1702
 *         return is_down_limit
 * 
 *     def listIntersection(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         use example:
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data_list, __pyx_kp_s_Union_List_None) < 0) __PYX_ERR(0, 1702, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1702, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_31listIntersection, 0, __pyx_n_s_baseStrategy_listIntersection, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_listIntersection, __pyx_t_5) < 0) __PYX_ERR(0, 1702, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1727
 *         return intersection_list
 * 
 *     def listUnion(self, data_list: Union[List, None] = None, *args) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_data_list, __pyx_kp_s_Union_List_None) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_33listUnion, 0, __pyx_n_s_baseStrategy_listUnion, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_listUnion, __pyx_t_6) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1753
 *         return union_list
 * 
 *     def strategyCount(self, data: Union[Dict, None] = None, **kwargs) -> pd.DataFrame():             # <<<<<<<<<<<<<<
 *         '''
 *         list
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_kp_s_Union_Dict_None) < 0) __PYX_ERR(0, 1753, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_kp_s_pd_DataFrame_2) < 0) __PYX_ERR(0, 1753, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_12baseStrategy_35strategyCount, 0, __pyx_n_s_baseStrategy_strategyCount, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_strategyCount, __pyx_t_5) < 0) __PYX_ERR(0, 1753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1530
 * 
 * 
 * class baseStrategy(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, save_json=True, strategy_date: str = utils.latest_trade_day):
 *         self.dataproc = dataproc.dataPreprocess()
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_baseStrategy_2, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_baseStrategy_2, __pyx_t_5) < 0) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1788
 * 
 * 
 * class fundamentalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_baseStrategy_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_fundamentalStockStrategy, __pyx_n_s_fundamentalStockStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_finished_2_finished_3_finishe); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_3 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 1788, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1803
 *     """
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(fundamentalStockStrategy, self).__init__(save_json=save_json)
 *         print("fundamentalStockStrategy.__init__")
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_1__init__, 0, __pyx_kp_s_fundamentalStockStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1807
 *         print("fundamentalStockStrategy.__init__")
 * 
 *     def selectByMarketCap(self, cal_min_th=None, cal_max_th=None, use_st_stock=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_3selectByMarketCap, 0, __pyx_n_s_fundamentalStockStrategy_selectB_4, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__109);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByMarketCap, __pyx_t_6) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1847
 *         return select_market_cap_stock_list
 * 
 *     def selectByKeyProduct(self, product_name) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_5selectByKeyProduct, 0, __pyx_n_s_fundamentalStockStrategy_selectB_5, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByKeyProduct, __pyx_t_2) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1860
 *         return res_names
 * 
 *     def selectByNameWord(self, key_word) -> dict:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_7selectByNameWord, 0, __pyx_n_s_fundamentalStockStrategy_selectB_6, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByNameWord, __pyx_t_6) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1872
 *         return res_names
 * 
 *     def selectByArea(self, area_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_9selectByArea, 0, __pyx_n_s_fundamentalStockStrategy_selectB_7, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByArea, __pyx_t_2) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1881
 *         return stock_list
 * 
 *     def selectByIndustry(self, industry_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1881, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_11selectByIndustry, 0, __pyx_n_s_fundamentalStockStrategy_selectB_8, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByIndustry, __pyx_t_6) < 0) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1890
 *         return stock_list
 * 
 *     def selectByConcept(self, concept_list=None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1890, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_13selectByConcept, 0, __pyx_n_s_fundamentalStockStrategy_selectB_9, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByConcept, __pyx_t_2) < 0) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1899
 *         return stock_list
 * 
 *     def selectByMarket(self, market_type: list = None) -> list:             # <<<<<<<<<<<<<<
 *         '''
 *         market_type = [, , , ]
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_market_type, __pyx_n_s_list) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_15selectByMarket, 0, __pyx_n_s_fundamentalStockStrategy_selectB_10, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__280);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByMarket, __pyx_t_6) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1932
 *         return data_simple_info_df['code'].tolist()
 * 
 *     def selectByStockPrice(self, min_price=None, max_price=None, use_st_stock=None):             # <<<<<<<<<<<<<<
 *         if min_price == None:
 *             min_price = 0
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_17selectByStockPrice, 0, __pyx_n_s_fundamentalStockStrategy_selectB_11, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__109);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByStockPrice, __pyx_t_6) < 0) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1963
 *         return select_market_list
 * 
 *     def selectByStockPriceQuantile(self, day_len=30, quantile_amplitude_tr: dict = None, use_st_stock=None, multi_type='process', workers=12,             # <<<<<<<<<<<<<<
 *                                    input_codes=None):
 *         if use_st_stock is None:
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_quantile_amplitude_tr, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 1963, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_19selectByStockPriceQuantile, 0, __pyx_n_s_fundamentalStockStrategy_selectB_12, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__305);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_selectByStockPriceQuantile, __pyx_t_2) < 0) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2036
 *         # return stock_tmp_code_list
 * 
 *     def getSingleStockPriceQuantile(self, stock_code, day_len, stock_name: str = None, start_date: str = None, end_date: str = None,             # <<<<<<<<<<<<<<
 *                                     multi_type='single'):
 *         if stock_name is None:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_stock_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 2036, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start_date, __pyx_n_s_str) < 0) __PYX_ERR(0, 2036, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end_date, __pyx_n_s_str) < 0) __PYX_ERR(0, 2036, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_24fundamentalStockStrategy_21getSingleStockPriceQuantile, 0, __pyx_n_s_fundamentalStockStrategy_getSing, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__308);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_getSingleStockPriceQuantile, __pyx_t_6) < 0) __PYX_ERR(0, 2036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":1788
 * 
 * 
 * class fundamentalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     """
 * 
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_fundamentalStockStrategy, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fundamentalStockStrategy, __pyx_t_6) < 0) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2076
 * 
 * 
 * class technicalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_baseStrategy_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_technicalStockStrategy, __pyx_n_s_technicalStockStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_K_2_3_4_MACD_KDJ_RSI_BOLL_BBI); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_3 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 2076, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2085
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(technicalStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_1__init__, 0, __pyx_kp_s_technicalStockStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 2085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2090
 *         print("technicalStockStrategy.__init__")
 * 
 *     def selectByTechIndicator(self, stock_code='300416'):             # <<<<<<<<<<<<<<
 *         date_end = self.use_date
 *         date_start = utils.sh_calendar.session_offset(date_end, -(60 - 1)).strftime('%Y%m%d')  # 60
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_3selectByTechIndicator, 0, __pyx_n_s_technicalStockStrategy_selectByT, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__312);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_selectByTechIndicator, __pyx_t_4) < 0) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2109
 *         tech_ind.CDL3WHITESOLDIERS()
 * 
 *     def judgeSingleStockByTechIndicator(self, tech_name, stock_code, stock_name, start_date, end_date, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if multi_type == 'process':
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_5judgeSingleStockByTechIndicator, 0, __pyx_n_s_technicalStockStrategy_judgeSing, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__315);
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_judgeSingleStockByTechIndicator, __pyx_t_4) < 0) __PYX_ERR(0, 2109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2143
 *             return False, {}
 * 
 *     def getStockByTechIndicator(self, tech_name, trade_day_len=60, use_st_stock=False, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                                 input_codes: list = None):
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 2143, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22technicalStockStrategy_7getStockByTechIndicator, 0, __pyx_n_s_technicalStockStrategy_getStockB, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__318);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_getStockByTechIndicator, __pyx_t_2) < 0) __PYX_ERR(0, 2143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2076
 * 
 * 
 * class technicalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_technicalStockStrategy, __pyx_t_3, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_technicalStockStrategy, __pyx_t_2) < 0) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2232
 * 
 * 
 * class financialStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_baseStrategy_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 2232, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_3, __pyx_n_s_financialStockStrategy, __pyx_n_s_financialStockStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_2_3_4_quarter_finished_4_repo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__pyx_t_3 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 2232, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2243
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(financialStockStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_1__init__, 0, __pyx_kp_s_financialStockStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2248
 *         print("financialStockStrategy.__init__")
 * 
 *     def getStockMultiFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': [datetime(2024, 6, 30).date(), datetime(2024, 3, 31).date(), datetime(2023, 12, 31).date()],
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 2248, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_3getStockMultiFinancialData, 0, __pyx_n_s_financialStockStrategy_getStockM, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__322);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getStockMultiFinancialData, __pyx_t_4) < 0) __PYX_ERR(0, 2248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2278
 *         return merged_df
 * 
 *     def getStockByFinancialData(self, financial_mode='quarter', filter_dict=None, use_st_stock=False, save_file=False, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         if filter_dict is None:
 *             filter_dict = {'report_date': datetime(2024, 6, 30).date(), 'total_operate_revenue_tb': [50.0, utils.positive_infinity],
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_22financialStockStrategy_5getStockByFinancialData, 0, __pyx_n_s_financialStockStrategy_getStockB, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__324)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__322);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_getStockByFinancialData, __pyx_t_5) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2232
 * 
 * 
 * class financialStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_financialStockStrategy, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_financialStockStrategy, __pyx_t_5) < 0) __PYX_ERR(0, 2232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2359
 * 
 * 
 * class capitalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_baseStrategy_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 2359, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_capitalStockStrategy, __pyx_n_s_capitalStockStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_2_3_4_finished); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_3 != __pyx_t_6) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 2359, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2368
 *     '''
 * 
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(capitalStockStrategy, self).__init__(save_json=save_json)
 *         self.high_amount_stock_list = self.getAllHighAmountStock()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_1__init__, 0, __pyx_kp_s_capitalStockStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_6) < 0) __PYX_ERR(0, 2368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2373
 *         print("capitalStockStrategy.__init__")
 * 
 *     def isLowAmountStock(self, stock_code, amount_th=50000000, use_ma=True) -> bool:             # <<<<<<<<<<<<<<
 *         # high_amount_stock_list
 *         if self.high_amount_stock_list:
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 2373, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_3isLowAmountStock, 0, __pyx_n_s_capitalStockStrategy_isLowAmount, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__328);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_isLowAmountStock, __pyx_t_4) < 0) __PYX_ERR(0, 2373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2405
 *             return False
 * 
 *     def getAllHighAmountStock(self, amount_th=50000000, use_ma=True, use_st_stock=False):             # <<<<<<<<<<<<<<
 *         '''
 *         1. use_ma=False:  >
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_20capitalStockStrategy_5getAllHighAmountStock, 0, __pyx_n_s_capitalStockStrategy_getAllHighA, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__330)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__331);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_getAllHighAmountStock, __pyx_t_4) < 0) __PYX_ERR(0, 2405, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2359
 * 
 * 
 * class capitalStockStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_capitalStockStrategy, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_capitalStockStrategy, __pyx_t_4) < 0) __PYX_ERR(0, 2359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2451
 * 
 * 
 * class publishStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_baseStrategy_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_publishStrategy, __pyx_n_s_publishStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_kp_s_1_x_finished_x_finished_x_finis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 2451, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2493
 *     '''
 * 
 *     def __init__(self, save_json=True):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).__init__(save_json=save_json)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_1__init__, 0, __pyx_kp_s_publishStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__333);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2503
 *         print("publishStrategy.__init__")
 * 
 *     def reset(self, use_date):             # <<<<<<<<<<<<<<
 *         super(publishStrategy, self).reset(use_date)
 *         self.checkDatabaseTableUpdate()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_3reset, 0, __pyx_n_s_publishStrategy_reset, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_reset, __pyx_t_2) < 0) __PYX_ERR(0, 2503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2507
 *         self.checkDatabaseTableUpdate()
 * 
 *     def getStrategyDataAndImg(self):             # <<<<<<<<<<<<<<
 * 
 *         print('use_date = ', self.use_date)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_5getStrategyDataAndImg, 0, __pyx_n_s_publishStrategy_getStrategyDataA, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__336)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStrategyDataAndImg, __pyx_t_2) < 0) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2554
 *         self.dumpJsonToFile()
 * 
 *     def getStockProperty_(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         strategy_key_name1 = 'top_10_up_limit'
 *         strategy_key_name2 = 'top_10_amplitude'  # trade_day_len
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 2554, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_7getStockProperty_, 0, __pyx_n_s_publishStrategy_getStockProperty_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__338)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__339);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockProperty_2, __pyx_t_6) < 0) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2647
 *         return top_up_limit, top_amplitude
 * 
 *     def stockSingleStockProperty(self, stock_code, stock_name, start_date, end_date, multi_type='single') -> dict:             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             engine, session = create_engine_session()
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_9stockSingleStockProperty, 0, __pyx_n_s_publishStrategy_stockSingleStock_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__341)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__315);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_stockSingleStockProperty, __pyx_t_2) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2673
 *         return new_record
 * 
 *     def getStockProperty(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=False, multi_type='thread', workers=12,             # <<<<<<<<<<<<<<
 *                          input_codes: list = None):
 *         '''
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 2673, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_11getStockProperty, 0, __pyx_n_s_publishStrategy_getStockProperty_3, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__343)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__344);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockProperty, __pyx_t_6) < 0) __PYX_ERR(0, 2673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2781
 *         return top_up_limit, top_amplitude
 * 
 *     def getStockWavePriceRatio(self, trade_day_len=60, use_st_stock=False, num_tr=15, save_file=True, multi_type='process', workers=12, max_depth=1):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_13getStockWavePriceRatio, 0, __pyx_n_s_publishStrategy_getStockWavePric_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__347);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockWavePriceRatio, __pyx_t_6) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2903
 *         return stock_wave_up, stock_wave_down
 * 
 *     def getSingleStockWavePriceRatio(self, stock_code, start_date, end_date, max_depth=1, multi_type='single'):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_15getSingleStockWavePriceRatio, 0, __pyx_n_s_publishStrategy_getSingleStockWa_3, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__350);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getSingleStockWavePriceRatio, __pyx_t_6) < 0) __PYX_ERR(0, 2903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3019
 *         return wave_up_ratio_record[0:max_depth], wave_down_ratio_record[0:max_depth]
 * 
 *     def getTradeDistributionTable(self, multi_thread=True, workers=12, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 *         TODO: dataframe
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_17getTradeDistributionTable, 0, __pyx_n_s_publishStrategy_getTradeDistribu_3, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__352)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__353);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getTradeDistributionTable, __pyx_t_6) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3197
 *         return new_date, rate_hist_dict, rate_hist_dict_len
 * 
 *     def getStockLadderTable(self, use_st_stock=False, ladder_max=7, save_file=True) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_kp_s_int_dict) < 0) __PYX_ERR(0, 3197, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_19getStockLadderTable, 0, __pyx_n_s_publishStrategy_getStockLadderTa, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__355)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__356);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockLadderTable, __pyx_t_2) < 0) __PYX_ERR(0, 3197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3284
 *         return max_level, stock_ladder
 * 
 *     def getStockHoldNumberChangeTable(self, day_len=90, new_date_len=-1, quantile_tr=0.1, save_file=True, input_codes: list = None):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_input_codes, __pyx_n_s_list) < 0) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_21getStockHoldNumberChangeTable, 0, __pyx_n_s_publishStrategy_getStockHoldNumb_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__358)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__359);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockHoldNumberChangeTable, __pyx_t_6) < 0) __PYX_ERR(0, 3284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3366
 *         return return_df
 * 
 *     def __getStockLadder(self, stock_ladder_dict_yesterday: dict, stock_up_limit_list_today: list) -> (int, dict):             # <<<<<<<<<<<<<<
 *         '''
 *          stock_uplimt_ladder  stock_uplimt_ladder
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_stock_ladder_dict_yesterday, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 3366, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_stock_up_limit_list_today, __pyx_n_s_list) < 0) __PYX_ERR(0, 3366, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_kp_s_int_dict) < 0) __PYX_ERR(0, 3366, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_23__getStockLadder, 0, __pyx_n_s_publishStrategy___getStockLadder, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_publishStrategy__getStockLadder, __pyx_t_2) < 0) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3391
 *         return max_level, stock_ladder
 * 
 *     def getTradeDayChangeRankBetweenDate(self, table_name, start_date: datetime, end_date: datetime, rank_level=3):             # <<<<<<<<<<<<<<
 *         trade_day_df = self.dataproc.loadTableContentByDate(table_name, start_date, end_date)
 *         if table_name == 'stock_industry_trade_day':
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start_date, __pyx_n_s_datetime) < 0) __PYX_ERR(0, 3391, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end_date, __pyx_n_s_datetime) < 0) __PYX_ERR(0, 3391, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_25getTradeDayChangeRankBetweenDate, 0, __pyx_n_s_publishStrategy_getTradeDayChang_2, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__363)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__364);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getTradeDayChangeRankBetweenDate, __pyx_t_6) < 0) __PYX_ERR(0, 3391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3436
 *         return head_tail_df
 * 
 *     def update_hot_table(self, table_name: str, trade_date: datetime, hot_table: dict):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_table_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 3436, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_trade_date, __pyx_n_s_datetime) < 0) __PYX_ERR(0, 3436, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_hot_table, __pyx_n_s_dict_2) < 0) __PYX_ERR(0, 3436, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_27update_hot_table, 0, __pyx_n_s_publishStrategy_update_hot_table, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_update_hot_table, __pyx_t_2) < 0) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3551
 *             hot_table['year']['updated'] = True
 * 
 *     def getIndustryConceptHotFrequency(self, mode='industry', near_day=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_29getIndustryConceptHotFrequency, 0, __pyx_n_s_publishStrategy_getIndustryConce, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__369);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getIndustryConceptHotFrequency, __pyx_t_2) < 0) __PYX_ERR(0, 3551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3622
 *         return day_hot_cold_frequency_df
 * 
 *     def getIndustryHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_31getIndustryHotTable, 0, __pyx_n_s_publishStrategy_getIndustryHotTa, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getIndustryHotTable, __pyx_t_2) < 0) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3692
 *         return hot_industry_table
 * 
 *     def getConceptHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_33getConceptHotTable, 0, __pyx_n_s_publishStrategy_getConceptHotTab, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getConceptHotTable, __pyx_t_2) < 0) __PYX_ERR(0, 3692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3762
 *         return hot_concept_table
 * 
 *     def getStockHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_35getStockHotTable, 0, __pyx_n_s_publishStrategy_getStockHotTable, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getStockHotTable, __pyx_t_2) < 0) __PYX_ERR(0, 3762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3827
 *         return hot_stock_table
 * 
 *     def getFutureHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_37getFutureHotTable, 0, __pyx_n_s_publishStrategy_getFutureHotTabl, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__378)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getFutureHotTable, __pyx_t_2) < 0) __PYX_ERR(0, 3827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3892
 *         return hot_future_table
 * 
 *     def getIndexHotTable(self, num_tr=5, save_file=True):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_15publishStrategy_39getIndexHotTable, 0, __pyx_n_s_publishStrategy_getIndexHotTable, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__372);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getIndexHotTable, __pyx_t_2) < 0) __PYX_ERR(0, 3892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":2451
 * 
 * 
 * class publishStrategy(baseStrategy):             # <<<<<<<<<<<<<<
 *     '''
 * 
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_publishStrategy, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_publishStrategy, __pyx_t_2) < 0) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3958
 * 
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):             # <<<<<<<<<<<<<<
 *     def __init__(self, save_json=False):
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_publishStrategy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_fundamentalStockStrategy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_technicalStockStrategy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_financialStockStrategy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_capitalStockStrategy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 3958, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5)) __PYX_ERR(0, 3958, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4)) __PYX_ERR(0, 3958, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_2)) __PYX_ERR(0, 3958, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_6)) __PYX_ERR(0, 3958, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_6, __pyx_n_s_pacoSelectStrategy, __pyx_n_s_pacoSelectStrategy, (PyObject *) NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_6 != __pyx_t_8) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 3958, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3959
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):
 *     def __init__(self, save_json=False):             # <<<<<<<<<<<<<<
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 *         print("pacoSelectStrategy.__init__")
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_1__init__, 0, __pyx_kp_s_pacoSelectStrategy___init, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__175);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 3959, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3963
 *         print("pacoSelectStrategy.__init__")
 * 
 *     def getPotentialLimitUpStockNearDay(self, near_day=30):             # <<<<<<<<<<<<<<
 *         '''
 *         near_day
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_3getPotentialLimitUpStockNearDay, 0, __pyx_n_s_pacoSelectStrategy_getPotentialL, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__383)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__384);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getPotentialLimitUpStockNearDay, __pyx_t_8) < 0) __PYX_ERR(0, 3963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4051
 *         return stock_hold_num_table
 * 
 *     def getPotentialConceptStock(self, concept_list=None):             # <<<<<<<<<<<<<<
 *         if concept_list == None:
 *             concept_list = ['DRG/DIP']
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_5getPotentialConceptStock, 0, __pyx_n_s_pacoSelectStrategy_getPotentialC, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__386)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__280);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getPotentialConceptStock, __pyx_t_8) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4067
 *         return stock_hold_num_table
 * 
 *     def getPotentialIndustryStock(self, industry_list=None):             # <<<<<<<<<<<<<<
 *         if industry_list == None:
 *             industry_list = ['', '', '', '']
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_18pacoSelectStrategy_7getPotentialIndustryStock, 0, __pyx_n_s_pacoSelectStrategy_getPotentialI, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__388)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__280);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getPotentialIndustryStock, __pyx_t_8) < 0) __PYX_ERR(0, 4067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":3958
 * 
 * 
 * class pacoSelectStrategy(publishStrategy, fundamentalStockStrategy, technicalStockStrategy, financialStockStrategy, capitalStockStrategy):             # <<<<<<<<<<<<<<
 *     def __init__(self, save_json=False):
 *         super(pacoSelectStrategy, self).__init__(save_json=save_json)
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_pacoSelectStrategy, __pyx_t_6, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pacoSelectStrategy, __pyx_t_8) < 0) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4084
 * 
 * 
 * def test_select_stock():             # <<<<<<<<<<<<<<
 *     save_strategy = False
 *     my_method = fundamentalStockStrategy(save_json=save_strategy)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_1test_select_stock, 0, __pyx_n_s_test_select_stock, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__390)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_select_stock, __pyx_t_6) < 0) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4106
 * 
 * 
 * def getStrategyDataAndImg_new():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_3getStrategyDataAndImg_new, 0, __pyx_n_s_getStrategyDataAndImg_new, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__392)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getStrategyDataAndImg_new, __pyx_t_6) < 0) __PYX_ERR(0, 4106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4121
 * 
 * 
 * def simple_test():             # <<<<<<<<<<<<<<
 *     save_strategy = True
 *     # my_method = publishStrategy(save_json=save_strategy)
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_13tradeStrategy_13stockStrategy_5simple_test, 0, __pyx_n_s_simple_test, NULL, __pyx_n_s_tbstock_tradeStrategy_stockStrat, __pyx_d, ((PyObject *)__pyx_codeobj__394)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_simple_test, __pyx_t_6) < 0) __PYX_ERR(0, 4121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/tradeStrategy/stockStrategy.py":4247
 * 
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     getStrategyDataAndImg_new()
 *     # simple_test()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 4247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_9) {

    /* "tbstock/tradeStrategy/stockStrategy.py":4248
 * 
 * if __name__ == "__main__":
 *     getStrategyDataAndImg_new()             # <<<<<<<<<<<<<<
 *     # simple_test()
 *     # test_select_stock()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_getStrategyDataAndImg_new); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/tradeStrategy/stockStrategy.py":4247
 * 
 * 
 * if __name__ == "__main__":             # <<<<<<<<<<<<<<
 *     getStrategyDataAndImg_new()
 *     # simple_test()
 */
  }

  /* "tbstock/tradeStrategy/stockStrategy.py":1
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * import time
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init tbstock.tradeStrategy.stockStrategy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init tbstock.tradeStrategy.stockStrategy");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
    PyObject *dict;
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        Py_XDECREF(key); key = NULL;
        Py_XDECREF(value); value = NULL;
        if (kwds_is_tuple) {
            Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(kwds);
#else
            size = PyTuple_Size(kwds);
            if (size < 0) goto bad;
#endif
            if (pos >= size) break;
#if CYTHON_AVOID_BORROWED_REFS
            key = __Pyx_PySequence_ITEM(kwds, pos);
            if (!key) goto bad;
#elif CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kwds, pos);
#else
            key = PyTuple_GetItem(kwds, pos);
            if (!key) goto bad;
#endif
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
#endif
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(value);
            Py_DECREF(key);
#endif
            key = NULL;
            value = NULL;
            continue;
        }
#if !CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(key);
#endif
        Py_INCREF(value);
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    Py_XDECREF(key);
    Py_XDECREF(value);
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    Py_XDECREF(key);
    Py_XDECREF(value);
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    #endif
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
        #if PY_VERSION_HEX < 0x03090000
        vectorcallfunc f = _PyVectorcall_Function(func);
        #else
        vectorcallfunc f = PyVectorcall_Function(func);
        #endif
        if (f) {
            return f(func, args, (size_t)nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, (size_t)nargs, NULL);
        }
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
      #if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
      #elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a - (unsigned long)b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return PyLong_FromLong(-intval);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
        
            x = (long)((unsigned long)a - (unsigned long)b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (length <= 0) {
        return PyList_New(0);
    }
    return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length);
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length);
}
#endif

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) {
                return PyFloat_FromDouble((double)a / (double)b);
            }
            return PyInt_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            }
        }
                if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                        || __Pyx_PyLong_DigitCount(op1) <= 52 / PyLong_SHIFT) {
                    return PyFloat_FromDouble((double)a / (double)b);
                }
                return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            return PyLong_FromLong(x);
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("divide", return NULL)
            result = ((double)a) / (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                lla = a;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long b = PyInt_AS_LONG(op2);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                llb = b;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_GetMethod;
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* StringJoin */
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    (void) __Pyx_PyObject_CallMethod1;
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3
    return _PyString_Join(sep, values);
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    return _PyBytes_Join(sep, values);
#else
    return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values);
#endif
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = __Pyx_PyObject_GetIterNextFunc(iter);
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
#if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
#include <string.h>
#endif
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* UnpackUnboundCMethod */
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
     METH_VARARGS | METH_KEYWORDS,
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #else
    if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            target->method = unbound_method;
        }
    }
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CIntToDigits */
static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(Py_ssize_t)*3+2];
    char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    Py_ssize_t remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (Py_ssize_t) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (Py_ssize_t) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (Py_ssize_t) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    assert(!last_one_off || *dpos == '0');
    dpos += last_one_off;
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyIntFromDouble */
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value) {
    if (value >= (double)LONG_MIN && value <= (double)LONG_MAX) {
        return PyInt_FromLong((long)value);
    }
    return PyLong_FromDouble(value);
}
#endif

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
    Py_ssize_t i, nparts;
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (unlikely(!module)) {
        return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
    }
    return module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__58;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
#if PY_VERSION_HEX >= 0x030C00A7
    if (likely(__Pyx_PyLong_IsCompact(n))) {
        return PyLong_FromSize_t(__Pyx_PyLong_CompactValueUnsigned(n));
    }
#else
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromUnsignedLong(__Pyx_PyLong_Digits(n)[0]);
    }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            #if PY_VERSION_HEX >= 0x030C00A7
            ((PyLongObject*)copy)->long_value.lv_tag = ((PyLongObject*)copy)->long_value.lv_tag & ~_PyLong_SIGN_MASK;
            #else
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
            #endif
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* RaiseClosureNameError */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#elif PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyObject *py_name = NULL;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
    if (!py_name) return NULL;
    PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
                 py_name);
    Py_DECREF(py_name);
#else
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
#endif
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_MACROS
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(!argc) < 0) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if PY_VERSION_HEX >= 0x030d00A4
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o))
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C00A6
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
    if (unlikely(tstate->current_exception))
#elif CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) == 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_FALSE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* py_dict_keys */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
    else
        return PyDict_Keys(d);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 & PY_VERSION_HEX < 0x030d0000
    if ((1)) {
        return _PyDict_Pop(d, key, default_value);
    } else
#endif
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
    }
}

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a == b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* RaiseUnboundLocalError */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_SubtractObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
    }
        PyFPE_START_PROTECT("subtract", return NULL)
        result = a - b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
    }
        PyFPE_START_PROTECT("add", return NULL)
        result = a + b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 0;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a != b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) != 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 1;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 1;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal != 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a != (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) != 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_TRUE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* bytes_tailmatch */
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
                                         Py_ssize_t start, Py_ssize_t end, int direction) {
    const char* self_ptr = PyBytes_AS_STRING(self);
    Py_ssize_t self_len = PyBytes_GET_SIZE(self);
    const char* sub_ptr;
    Py_ssize_t sub_len;
    int retval;
    Py_buffer view;
    view.obj = NULL;
    if ( PyBytes_Check(arg) ) {
        sub_ptr = PyBytes_AS_STRING(arg);
        sub_len = PyBytes_GET_SIZE(arg);
    }
#if PY_MAJOR_VERSION < 3
    else if ( PyUnicode_Check(arg) ) {
        return (int) PyUnicode_Tailmatch(self, arg, start, end, direction);
    }
#endif
    else {
        if (unlikely(PyObject_GetBuffer(arg, &view, PyBUF_SIMPLE) == -1))
            return -1;
        sub_ptr = (const char*) view.buf;
        sub_len = view.len;
    }
    if (end > self_len)
        end = self_len;
    else if (end < 0)
        end += self_len;
    if (end < 0)
        end = 0;
    if (start < 0)
        start += self_len;
    if (start < 0)
        start = 0;
    if (direction > 0) {
        if (end-sub_len > start)
            start = end - sub_len;
    }
    if (start + sub_len <= end)
        retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len);
    else
        retval = 0;
    if (view.obj)
        PyBuffer_Release(&view);
    return retval;
}
static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings,
                                        Py_ssize_t start, Py_ssize_t end, int direction) {
    Py_ssize_t i, count = PyTuple_GET_SIZE(substrings);
    for (i = 0; i < count; i++) {
        int result;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i),
                                               start, end, direction);
#else
        PyObject* sub = PySequence_ITEM(substrings, i);
        if (unlikely(!sub)) return -1;
        result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction);
        Py_DECREF(sub);
#endif
        if (result) {
            return result;
        }
    }
    return 0;
}
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
                                   Py_ssize_t start, Py_ssize_t end, int direction) {
    if (unlikely(PyTuple_Check(substr))) {
        return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction);
    }
    return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction);
}

/* unicode_tailmatch */
static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings,
                                          Py_ssize_t start, Py_ssize_t end, int direction) {
    Py_ssize_t i, count = PyTuple_GET_SIZE(substrings);
    for (i = 0; i < count; i++) {
        Py_ssize_t result;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i),
                                     start, end, direction);
#else
        PyObject* sub = PySequence_ITEM(substrings, i);
        if (unlikely(!sub)) return -1;
        result = PyUnicode_Tailmatch(s, sub, start, end, direction);
        Py_DECREF(sub);
#endif
        if (result) {
            return (int) result;
        }
    }
    return 0;
}
static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
                                     Py_ssize_t start, Py_ssize_t end, int direction) {
    if (unlikely(PyTuple_Check(substr))) {
        return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction);
    }
    return (int) PyUnicode_Tailmatch(s, substr, start, end, direction);
}

/* str_tailmatch */
static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start,
                                               Py_ssize_t end, int direction)
{
    if (PY_MAJOR_VERSION < 3)
        return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction);
    else
        return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction);
}

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_MACROS
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (n < 0) return -1;
#endif
    for (i = 1; i < n; i++)
    {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__92);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
    size_bases = PyTuple_GET_SIZE(bases);
    for (i = 0; i < size_bases; i++) {
        base  = PyTuple_GET_ITEM(bases, i);
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                base = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base);
                Py_INCREF(base);
            }
        }
        j = PyList_GET_SIZE(new_bases);
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
    return result;
error:
    Py_XDECREF(new_bases);
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_MACROS
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
    if (unlikely(!code_object)) goto bad;
    py_py_line = PyLong_FromLong(py_line);
    if (unlikely(!py_py_line)) goto bad;
    py_funcname = PyUnicode_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    dict = PyDict_New();
    if (unlikely(!dict)) goto bad;
    {
        PyObject *old_code_object = code_object;
        code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
        Py_DECREF(old_code_object);
    }
    if (unlikely(!code_object)) goto bad;
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name_2);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s__395);
    }
    return name;
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CStringEquals */
static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    return *s1 == *s2;
}

/* CheckBinaryVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    const char* rt_version = Py_GetVersion();
    unsigned long version = 0;
    unsigned long factor = 0x01000000UL;
    unsigned int digit = 0;
    int i = 0;
    while (factor) {
        while ('0' <= rt_version[i] && rt_version[i] <= '9') {
            digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
            ++i;
        }
        version += factor * digit;
        if (rt_version[i] != '.')
            break;
        digit = 0;
        factor >>= 8;
        ++i;
    }
    return version;
#endif
}
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
