def m_nav(args):
    print("母基金净值分析 - 样本数:{}".format(args.samples))
    print_head()

    for premium in ["3", "4", "5"]:
        for m_nav in ["0.65", "0.80", "1.00", "1.20", "1.45"]:
            m0 = float(premium)/100
            m_nav0 = float(m_nav) / 100
            base = Simulation(m=m0, m_nav=m_nav0, debug=args.debug)
            multi_sim = MultiSimulation(base, size=args.samples)
            multi_sim.perform()
            print("{}%\t{}%\t{:.2f}".format(premium, m_nav, multi_sim.mean_pv()))
def discount_rate(args):
    print(u"折现率分析 - 样本数:{}".format(args.samples))
    print_head()

    for premium in [3.0, 4.0, 5.0]:
        for r in [5.0, 8.0, 10.0]:
            m0 = float(premium) / 100
            r0 = float(r) / 100
            base = Simulation(m=m0, r=r0, debug=args.debug)
            multi_sim = MultiSimulation(base, size=args.samples)
            multi_sim.perform()

            print("{:.0%}\t{:.0%}\t{:.2f}".format(m0, r0, multi_sim.mean_pv()))