コード例 #1
0
 public PortfolioCollection FetchAll()
 {
     PortfolioCollection coll = new PortfolioCollection();
     Query qry = new Query(Portfolio.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
コード例 #2
0
 void BindPortfolio()
 {
     PortfolioCollection portfolioCollection = new PortfolioCollection();
     //coll.Where(DocCat.Columns.Active, 1);
     portfolioCollection.Load();
     grdProject.DataSource = portfolioCollection;
     grdProject.DataBind();
     //pnlMain.UpdateAfterCallBack = true;
 }
コード例 #3
0
        /// <summary>
        /// Calculate the Efficient Frontier and Minimum Variance locus using the universe of assets and constraints defined in <paramref name="portfolio"/>
        /// </summary>
        /// <param name="portfolio">The portfolio definition</param>
        /// <param name="riskFreeRate">The risk-free rate specified as a fractional decimal value e.g. 0.05 for 5%</param>
        /// <param name="numberOfPortfolios">The number of portfolios in the efficient frontier locus</param>
        /// <returns>A collection of portfolios</returns>
        public static IPortfolioCollection CalcEfficientFrontier(IPortfolio portfolio, double riskFreeRate, uint numberOfPortfolios)
        {
#if RDEP
            if (!_initialized)
            {
                Initialize();
            }
#endif
            PortfolioCollection frontier = new PortfolioCollection("Efficient Frontier", riskFreeRate);
            return(frontier.CalculateMVFrontier(portfolio, numberOfPortfolios));
        }
コード例 #4
0
        public async Task <PortfolioCollection> GetAll(GetAllPortfoliosRequest request)
        {
            var portfolios = await _repository.GetAllAsync(request.TraderId);

            var response = new PortfolioCollection
            {
                Items = portfolios
            };

            return(response);
        }
コード例 #5
0
 public PortfolioCollection FetchByQuery(Query qry)
 {
     PortfolioCollection coll = new PortfolioCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
コード例 #6
0
 public PortfolioCollection FetchByID(object PortfolioId)
 {
     PortfolioCollection coll = new PortfolioCollection().Where("portfolioId", PortfolioId).Load();
     return coll;
 }