Dupire context: created after Parsing.
Beispiel #1
0
        /// <summary>
        /// Parses the process (in this case nothing has to be done).
        /// </summary>
        /// <param name="context">The project representing the context of the parsing.</param>
        /// <returns>true if the the parsing caused errors; otherwise false.</returns>
        public bool Parse(IProject context)
        {
            bool errors = false;

            errors = this.s0.Parse(context);
            errors = BoolHelper.AddBool(errors, this.q.Parse(context));
            errors = BoolHelper.AddBool(errors, this.r.Parse(context));
            errors = BoolHelper.AddBool(errors, this.localVol.Parse(context));

            this.context          = new DupireContext();
            this.context.s0       = this.s0.fV();
            this.context.q        = this.q.fVRef() as IFunction;
            this.context.r        = this.r.fVRef() as IFunction;
            this.context.localVol = this.localVol.fVRef() as IFunction;

            return(RetrieveCurve(context, errors));
        }
Beispiel #2
0
        /// <summary>
        /// Parses the process (in this case nothing has to be done).
        /// </summary>
        /// <param name="context">The project representing the context of the parsing.</param>
        /// <returns>true if the the parsing caused errors; otherwise false.</returns>
        public bool Parse(IProject context)
        {
            bool errors = false;
            errors = this.s0.Parse(context);
            errors = BoolHelper.AddBool(errors, this.q.Parse(context));
            errors = BoolHelper.AddBool(errors, this.r.Parse(context));
            errors = BoolHelper.AddBool(errors, this.localVol.Parse(context));

            this.context = new DupireContext();
            this.context.s0 = this.s0.fV();
            this.context.q = this.q.fVRef() as IFunction;
            this.context.r = this.r.fVRef() as IFunction;
            this.context.localVol = this.localVol.fVRef() as IFunction;

            return RetrieveCurve(context, errors);
        }