Пример #1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            int samples = int.Parse(TextBox5.Text);
            int size = 4;
            double[] spot = new double[] {  100, 100, 100, 100 };
            double[] sigma = new double[] { 0.2, 0.2, 0.2, 0.2 };
            double r = 0.05;
            double[] coeff = new double[] { .25, .25, .25, .25 };
            double[] rho = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
            double T = 6;
            int N = 6;
            int M = 50000;

            WrapperClass wc = new WrapperClass();
            double K = 0.0;
            wc.getPriceSamples(size, spot, K, sigma, r, coeff, rho, T, N, M, samples);

            Label7.Text = Math.Round(wc.getVrP(), 4).ToString();
            Label8.Text = Math.Round(wc.getMxP(), 4).ToString();
        }