public AllFundsViewModel(IFundService fundService,
                                 ITransactionService transactionService, IPortfolioService portfolioService,
                                 IStaticReferences staticReferences, IWindowFactory windowFactory)
        {
            _fundService        = fundService;
            _portfolioService   = portfolioService;
            _transactionService = transactionService;
            _staticReferences   = staticReferences;
            _windowFactory      = windowFactory;

            _lbFunds            = _fundService.GetAllFundSymbols();
            _currentFund        = (lbFunds.Count != 0) ? _fundService.GetFund(_lbFunds[0]) : null;
            _asOfDate           = (_currentFund != null) ? _staticReferences.GetMostRecentLockedDate(_currentFund.FundId) : DateTime.Today;
            _priceTable         = _staticReferences.GetPriceTable(_asOfDate);
            SelectFundCommand   = new SelectFundCommand(this, fundService, staticReferences);
            ShowNewTradeCommand = new ActionCommand(OpenNewTradeWindow);

            ShowEditTradeCommand = new ActionCommand(OpenEditTradeWindow);

            ShowDeleteTradeCommand = new ActionCommand(DeleteTradeDialog);

            ShowRestoreTradeCommand = new ActionCommand(RestoreTradeDialog);

            ShowNewFXTradeCommand         = new ActionCommand(OpenNewFxTradeWindow);
            ShowNewCashTradeCommand       = new ActionCommand(OpenNewCashTradeWindow);
            ShowEditCashTradeCommand      = new ActionCommand(OpenEditCashTradeWindow);
            ShowNewInvestorActionCommand  = new ActionCommand(OpenInvestorActionWindow);
            ShowFundInitialisationCommand = new ActionCommand(OpenFundInitialisationWindow);
            ShowFundPropertiesCommand     = new ActionCommand(OpenFundPropertiesWindow);

            ShowFundMetricsCommand = new ActionCommand(OpenMetricsWindow);

            ShowPositionDetailsCommand = new ActionCommand(OpenPositionDetailWindow);

            ShowNavSummaryCommand       = new ActionCommand(OpenNavSummaryWindow);
            DateSelectionChangedCommand = new ActionCommand(ChangeDateCommand);
            RefreshFundCommand          = new ActionCommand(RefreshCurrentFund);
        }