public void UpdatePortfolio(Portfolio.Portfolio portfolio, Ranking[] previousRankings, Ranking[] currentRankings)
        {
            // check whether we should sell the stock
            Ranking previousTop = previousRankings.First();
            Ranking currentTop = currentRankings.First();

            // let's give ourselves some money
            portfolio.Cash += portfolio.MonthlyIncrease;

            if (String.Equals(previousTop.Stock.Ticker, currentTop.Stock.Ticker, StringComparison.OrdinalIgnoreCase))
            {
                // same stock so just buy
                portfolio.BuyStock(currentTop.Stock, portfolio.MonthlyIncrease);
            }
            else
            {
                // have to sell first
                // we look for the stock to sell
                Stock previousTopRightNow = currentRankings.
                    First(ranking => String.Equals(ranking.Stock.Ticker, previousTop.Stock.Ticker, StringComparison.OrdinalIgnoreCase))
                    .Stock;

                // sell all of it
                portfolio.SellStock(previousTopRightNow, portfolio.GetStockShares(previousTopRightNow));

                // time to buy all
                portfolio.BuyStock(currentTop.Stock, portfolio.TotalValue);
            }
        }