public static AllocationHistory GetAllocationHistory(FXMarketHistory fxmh, bool addCryptoWD = false, Currency Fiat = Currency.USD)
        {
            AllocationHistory AH = new AllocationHistory();

            AH.AddTransactions(Fiat, GetTransactionList(addCryptoWD), fxmh);
            return(AH);
        }
        public void Update(Currency fiat, Frequency freq, List <ITimeSeriesKey> tskl, bool useLowerFrequencies)
        {
            TimeSeriesKeyList = tskl;
            DataProvider.LoadPrices(TimeSeriesKeyList, useLowerFrequencies: useLowerFrequencies);
            Fiat = fiat;
            if (FXMH.Freq != freq || ChangeLedger)
            {
                SetUpAllHistory(freq);
            }
            DataProvider.UpdateFXMarketHistory(FXMH, Fiat, StartDate, freq);
            APnL.ChangeCcyRef(fiat, FXMH);
            bool ReloadAllocationHistory = tskl.Where(x => x.GetKeyType() == TimeSeriesKeyType.AllocationHistory).Count() > 0;

            if (ChangeLedger || ReloadAllocationHistory)
            {
                ChangeLedger = false;
                APnL.AddTransactions(DataProvider.GetTransactionList(), FXMH, fullReload: true);
            }
            if (ReloadAllocationHistory)
            {
                AH.AddTransactions(fiat, DataProvider.GetTransactionList(), FXMH);
                AH.UpdateHistory(fiat, FXMH);
            }
        }