以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 公式模型编写问题提交 (http://222.73.7.161/bbs/list.asp?boardid=4) ---- [原创]期货成本价计算 (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=5206) |
-- 作者:z7c9 -- 发布时间:2011/2/18 19:27:49 -- [原创]期货成本价计算 //做多,固定手续费 costprice*multiplier*lots-enterprice*multiplier*lots = 2*commission*lots; (costprice-enterprice)*multiplier = 2*commission; costprice-enterprice = 2*commission/multiplier; costprice = enterprice+2*commission/multiplier; costprice = trimprice(enterprice+2*commission/multiplier)+mindiff; //做空,固定手续费 enterprice*multiplier*lots - costprice*multiplier*lots = 2*commission*lots; (enterprice-costprice)*multiplier = 2*commission; enterprice-costprice = 2*commission/multiplier; costprice = enterprice-2*commission; costprice = trimprice(enterprice-2*commission/multiplier)-mindiff; //做多,百分比手续费 costprice*multiplier*lots - enterprice*multiplier*lots = enterprice*multiplier*lots*commission + costprice*multiplier*lots*commission; costprice-enterprice = enterprice*commission + costprice*commission; costprice-costprice*commission = enterprice+enterprice*commission; costprice*(1-commission) = enterprice*(1+commission); costprice = enterprice*(1+commission)/(1-commission); costprice = trimprice(enterprice*(1+commission)/(1-commission))+mindiff; //做空,百分比手续费 enterprice*multiplier*lots - costprice*multiplier*lots = enterprice*multiplier*lots*commission + costprice*multiplier*lots*commission; enterprice-costprice = enterprice*commission + costprice*commission; costprice+costprice*commission = enterprice-enterprice*commission; costprice*(1+commission) = enterprice*(1-commission); costprice = enterprice*(1-commission)/(1+commission); costprice = trimprice(enterprice*(1+commission)/(1-commission))-mindiff; |