mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 02:48:57 +08:00
update documents
This commit is contained in:
parent
c7d5c105cc
commit
5064e7e3b1
@ -228,7 +228,15 @@
|
||||
:param Datetime datetime: 指定时刻
|
||||
:param Query.KType ktype: K线类型
|
||||
:rtype: FundsRecord
|
||||
|
||||
.. py:method:: get_funds_list(self, datetime, [ktype = Query.DAY])
|
||||
|
||||
获取指定日期列表每日资产记录
|
||||
|
||||
:param Datetime datetime: 指定时刻
|
||||
:param Query.KType ktype: K线类型
|
||||
:rtype: FundsList
|
||||
|
||||
.. py:method:: get_funds_curve(self, dates[, ktype = Query.DAY])
|
||||
|
||||
获取资产净值曲线
|
||||
|
@ -129,4 +129,13 @@
|
||||
.. py:attribute:: base_cash 当前投入本金(float)
|
||||
.. py:attribute:: base_asset 当前投入的资产价值(float)
|
||||
.. py:attribute:: borrow_cash 当前借入的资金(float),即负债
|
||||
.. py:attribute:: borrow_asset 当前借入证券资产价值(float)
|
||||
.. py:attribute:: borrow_asset 当前借入证券资产价值(float)
|
||||
|
||||
只读属性,自动根据上面的属性计算得到的结果:
|
||||
|
||||
.. py:attribute:: total_assets 总资产
|
||||
.. py:attribute:: net_assets 净资产
|
||||
.. py:attribute:: total_borrow 总负债
|
||||
.. py:attribute:: total_base 投入本值资产(本钱)
|
||||
.. py:attribute:: profit 收益
|
||||
|
||||
|
@ -235,7 +235,7 @@
|
||||
|
||||
克隆操作
|
||||
|
||||
.. py:method:: _calculate(self)
|
||||
.. py:method:: _calculate(self, kdata)
|
||||
|
||||
【重载接口】子类计算接口
|
||||
|
||||
|
@ -752,14 +752,12 @@ def sys_performance(sys, ref_stk=None):
|
||||
|
||||
ref_dates = ref_k.get_datetime_list()
|
||||
|
||||
profit = sys.tm.get_profit_curve(ref_dates)
|
||||
profit = VALUE(profit)
|
||||
funds = sys.tm.get_funds_curve(ref_dates)
|
||||
funds_list = sys.tm.get_funds_list(ref_dates)
|
||||
funds = [f.total_assets for f in funds_list]
|
||||
funds = VALUE(funds)
|
||||
funds_return = profit / REF(funds, 1) + 1
|
||||
# funds_return = cum_return(funds)
|
||||
funds_return = [f.total_assets / f.total_base for f in funds_list]
|
||||
funds_return = VALUE(funds_return)
|
||||
funds_return.name = "系统累积收益率"
|
||||
# cum_return = get_part("default.ind.累积收益率")
|
||||
ref_return = ROCR(ref_k.close, 0)
|
||||
ref_return.name = ref_stk.name
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user