Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="data"></param>
        /// <param name="spec"></param>
        /// <param name="constraint"></param>
        /// <param name="IncludeMinVarLocus"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <returns></returns>
        public static fPortfolio portfolioFrontier(timeSeries data, fPortfolioSpec spec, fPortfolioConstraint constraint,
                                                   bool IncludeMinVarLocus = true, string title = "Title", string description = "Description")
        {
            Initialize();
            var expr = Engine.CallFunction("portfolioFrontier", new Tuple <string, SymbolicExpression>("data", data.Expression), new Tuple <string, SymbolicExpression>("spec", spec.Expression),
                                           new Tuple <string, SymbolicExpression>("constraints", constraint.Expression), new Tuple <string, SymbolicExpression>("include.mvl", Engine.RBool(IncludeMinVarLocus)),
                                           new Tuple <string, SymbolicExpression>("title", Engine.RString(title)), new Tuple <string, SymbolicExpression>("description", Engine.RString(description)));

            return(new fPortfolio(expr));
        }
 public static fPortfolioData Create(ITimeSeries <double> timeseries, fPortfolioSpec spec)
 {
     return(new fPortfolioData(portfolioData().Invoke(new SymbolicExpression[] { timeSeries.Create(timeseries.Data,
                                                                                                   timeseries.DateTime, timeseries.Name).Expression, spec.Expression })));
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="timeSeriesData"></param>
 /// <param name="spec"></param>
 /// <returns></returns>
 public static fPortfolioData Create(timeSeries timeseries, fPortfolioSpec spec)
 {
     return(new fPortfolioData(portfolioData().Invoke(new SymbolicExpression[] { timeseries.Expression, spec.Expression })));
 }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="data"></param>
 /// <param name="spec"></param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public static fPortfolio feasiblePortfolio(timeSeries data, fPortfolioSpec spec, fPortfolioConstraint constraint)
 {
     Initialize();
     return(new fPortfolio(Engine.CallFunction("feasiblePortfolio", data.Expression, spec.Expression, constraint.Expression)));
 }