How to use the hikyuu.util.unicode.reprFunc function in hikyuu

To help you get started, we’ve selected a few hikyuu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fasiondog / hikyuu / tools / hikyuu / data_driver / data_driver.py View on Github external
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.



from ._data_driver import (DataDriverFactory,
                           BaseInfoDriver,
                           BlockInfoDriver,
                           KDataDriver)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)


BaseInfoDriver.__unicode__ = unicodeFunc
BaseInfoDriver.__repr__ = reprFunc

BlockInfoDriver.__unicode__ = unicodeFunc
BlockInfoDriver.__repr__ = reprFunc

KDataDriver.__unicode__ = unicodeFunc
KDataDriver.__repr__ = reprFunc
github fasiondog / hikyuu / tools / hikyuu / trade_sys / allocatefunds.py View on Github external
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from ._trade_sys import (AllocateFundsBase,
                         SystemWeight,
                         SystemWeightList, 
                         AF_EqualWeight)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)
from hikyuu.util.slice import list_getitem

AllocateFundsBase.__unicode__ = unicodeFunc
AllocateFundsBase.__repr__ = reprFunc

SystemWeight.__unicode__ = unicodeFunc
SystemWeight.__repr = reprFunc

SystemWeightList.__getitem__ = list_getitem
github fasiondog / hikyuu / hikyuu / trade_sys / allocatefunds.py View on Github external
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from ._trade_sys import (AllocateFundsBase,
                         SystemWeight,
                         SystemWeightList, 
                         AF_EqualWeight)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)
from hikyuu.util.slice import list_getitem

AllocateFundsBase.__unicode__ = unicodeFunc
AllocateFundsBase.__repr__ = reprFunc

SystemWeight.__unicode__ = unicodeFunc
SystemWeight.__repr = reprFunc

SystemWeightList.__getitem__ = list_getitem
github fasiondog / hikyuu / hikyuu / data_driver / data_driver.py View on Github external
# SOFTWARE.



from ._data_driver import (DataDriverFactory,
                           BaseInfoDriver,
                           BlockInfoDriver,
                           KDataDriver)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)


BaseInfoDriver.__unicode__ = unicodeFunc
BaseInfoDriver.__repr__ = reprFunc

BlockInfoDriver.__unicode__ = unicodeFunc
BlockInfoDriver.__repr__ = reprFunc

KDataDriver.__unicode__ = unicodeFunc
KDataDriver.__repr__ = reprFunc
github fasiondog / hikyuu / hikyuu / data_driver / data_driver.py View on Github external
from ._data_driver import (DataDriverFactory,
                           BaseInfoDriver,
                           BlockInfoDriver,
                           KDataDriver)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)


BaseInfoDriver.__unicode__ = unicodeFunc
BaseInfoDriver.__repr__ = reprFunc

BlockInfoDriver.__unicode__ = unicodeFunc
BlockInfoDriver.__repr__ = reprFunc

KDataDriver.__unicode__ = unicodeFunc
KDataDriver.__repr__ = reprFunc
github fasiondog / hikyuu / hikyuu / trade_sys / allocatefunds.py View on Github external
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from ._trade_sys import (AllocateFundsBase,
                         SystemWeight,
                         SystemWeightList, 
                         AF_EqualWeight)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)
from hikyuu.util.slice import list_getitem

AllocateFundsBase.__unicode__ = unicodeFunc
AllocateFundsBase.__repr__ = reprFunc

SystemWeight.__unicode__ = unicodeFunc
SystemWeight.__repr = reprFunc

SystemWeightList.__getitem__ = list_getitem
github fasiondog / hikyuu / tools / hikyuu / data_driver / data_driver.py View on Github external
# SOFTWARE.



from ._data_driver import (DataDriverFactory,
                           BaseInfoDriver,
                           BlockInfoDriver,
                           KDataDriver)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)


BaseInfoDriver.__unicode__ = unicodeFunc
BaseInfoDriver.__repr__ = reprFunc

BlockInfoDriver.__unicode__ = unicodeFunc
BlockInfoDriver.__repr__ = reprFunc

KDataDriver.__unicode__ = unicodeFunc
KDataDriver.__repr__ = reprFunc
github fasiondog / hikyuu / tools / hikyuu / data_driver / data_driver.py View on Github external
from ._data_driver import (DataDriverFactory,
                           BaseInfoDriver,
                           BlockInfoDriver,
                           KDataDriver)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)


BaseInfoDriver.__unicode__ = unicodeFunc
BaseInfoDriver.__repr__ = reprFunc

BlockInfoDriver.__unicode__ = unicodeFunc
BlockInfoDriver.__repr__ = reprFunc

KDataDriver.__unicode__ = unicodeFunc
KDataDriver.__repr__ = reprFunc
github fasiondog / hikyuu / tools / hikyuu / trade_sys / allocatefunds.py View on Github external
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from ._trade_sys import (AllocateFundsBase,
                         SystemWeight,
                         SystemWeightList, 
                         AF_EqualWeight)
from hikyuu.util.unicode import (unicodeFunc, reprFunc)
from hikyuu.util.slice import list_getitem

AllocateFundsBase.__unicode__ = unicodeFunc
AllocateFundsBase.__repr__ = reprFunc

SystemWeight.__unicode__ = unicodeFunc
SystemWeight.__repr = reprFunc

SystemWeightList.__getitem__ = list_getitem
github fasiondog / hikyuu / hikyuu / trade_manage / trade.py View on Github external
BUSINESS.GIFT = BUSINESS.BUSINESS_GIFT
BUSINESS.BONUS = BUSINESS.BUSINESS_BONUS
BUSINESS.CHECKIN = BUSINESS.BUSINESS_CHECKIN
BUSINESS.CHECKOUT = BUSINESS.BUSINESS_CHECKOUT
BUSINESS.INVALID = BUSINESS.INVALID_BUSINESS

TradeManager.__unicode__ = unicodeFunc
TradeManager.__repr__ = reprFunc
CostRecord.__unicode__ = unicodeFunc
CostRecord.__repr__ = reprFunc
TradeRecord.__unicode__ = unicodeFunc
TradeRecord.__repr__ = reprFunc
PositionRecord.__unicode__ = unicodeFunc
PositionRecord.__repr__ = reprFunc
TradeCostBase.__unicode__ = unicodeFunc
TradeCostBase.__repr__ = reprFunc
FundsRecord.__unicode__ = unicodeFunc
FundsRecord.__repr__ = reprFunc
BorrowRecord.__unicode__ = unicodeFunc
BorrowRecord.__repr__ = reprFunc
OrderBrokerBase.__unicode__ = unicodeFunc
OrderBrokerBase.__repr__ = reprFunc

BorrowRecordList.__getitem__ = list_getitem
PositionRecordList.__getitem__ = list_getitem
TradeRecordList.__getitem__ = list_getitem

try:
    import numpy as np
    import pandas as pd

    def TradeList_to_np(t_list):