public PortfolioCollection FetchAll() { PortfolioCollection coll = new PortfolioCollection(); Query qry = new Query(Portfolio.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
void BindPortfolio() { PortfolioCollection portfolioCollection = new PortfolioCollection(); //coll.Where(DocCat.Columns.Active, 1); portfolioCollection.Load(); grdProject.DataSource = portfolioCollection; grdProject.DataBind(); //pnlMain.UpdateAfterCallBack = true; }
/// <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)); }
public async Task <PortfolioCollection> GetAll(GetAllPortfoliosRequest request) { var portfolios = await _repository.GetAllAsync(request.TraderId); var response = new PortfolioCollection { Items = portfolios }; return(response); }
public PortfolioCollection FetchByQuery(Query qry) { PortfolioCollection coll = new PortfolioCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public PortfolioCollection FetchByID(object PortfolioId) { PortfolioCollection coll = new PortfolioCollection().Where("portfolioId", PortfolioId).Load(); return coll; }