保证金算法&资金计算
This commit is contained in:
@@ -225,6 +225,18 @@ namespace YLErp.Modules.DataProviderModule
|
||||
};
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取中债估值最新价格
|
||||
/// </summary>
|
||||
/// <param name="valueDate"></param>
|
||||
/// <param name="underlyingCode"></param>
|
||||
/// <returns></returns>
|
||||
public static ChinaBondValuation GetChinaBondPrice(DateTime valueDate, string underlyingCode)
|
||||
{
|
||||
using var db = DbContextFactory.GetYLDbContext();
|
||||
var bondPrice = db.china_bond_valuation.Where(x => x.bond_id == underlyingCode && x.valuation_date <= valueDate).OrderByDescending(o => o.credibility).ThenByDescending(o => o.valuation_date).FirstOrDefault();
|
||||
return bondPrice;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取标的收盘价格
|
||||
/// </summary>
|
||||
/// <param name="code">标的代码</param>
|
||||
|
||||
Reference in New Issue
Block a user