Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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
# 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
# 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
# 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
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
# 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
# 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
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
# 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
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):