private AssetSuitability GetInternationalEquityAssetSuitability()
        {
            var table = new InternationalEquitySuitabilityParameters();
            var f0Score = new IECurrentParameter();
            SetF0Score_InternationalEquity(table, f0Score);
            f0Score.Total = f0Score.OneYearTotalReturn + f0Score.CurrentMarketCapitalisatiopn +
                            f0Score.DividendYield + f0Score.ROA + f0Score.ROE
                            + f0Score.QuickRatio + f0Score.CurrentRatio + f0Score.TotalDebtTotalEquityRatio +
                            f0Score.PERatio + f0Score.BetaFiveYear;

            var f1Score = new IEForecastParameter();
            SetF1Score_InternationalEquity(table, f1Score);
            f1Score.Total = f1Score.FiveYearTotalReturn + f1Score.MorningStarRecommendation + f1Score.DividendYield +
                            f1Score.ROAF1 + f1Score.ROEF1
                            + f1Score.FinancialLeverageF1 + f1Score.OneYearRevenueGrowthF1 + f1Score.DERatioF1 +
                            f1Score.CreditRating + f1Score.FairValueVariation;

            return new AssetSuitability
            {
                F1Parameters = f1Score,
                SuitabilityRating = GetRatingScore(f1Score.Total + f0Score.Total),
                F0Parameters = f0Score,
                TotalScore = f1Score.Total + f0Score.Total
            };
        }
 private void SetForecastFairValueVariationScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     var fairValueVariation = F1Recommendation.FairValueVariation;
     if (fairValueVariation.HasValue)
     {
         if (fairValueVariation.Value >= table.Ief1Parameters.Defensive.FairValueVariation)
         {
             f1Score.FairValueVariation = table.Ief1Parameters.Defensive.ScoreRanking;
         }
         else if (fairValueVariation >= table.Ief1Parameters.Conservative.FairValueVariation)
         {
             f1Score.FairValueVariation = table.Ief1Parameters.Conservative.ScoreRanking;
         }
         else if (fairValueVariation >= table.Ief1Parameters.Balance.FairValueVariation)
         {
             f1Score.FairValueVariation = table.Ief1Parameters.Balance.ScoreRanking;
         }
         else if (fairValueVariation >= table.Ief1Parameters.Assertive.FairValueVariation)
         {
             f1Score.FairValueVariation = table.Ief1Parameters.Assertive.ScoreRanking;
         }
         else
         {
             f1Score.FairValueVariation = table.Ief1Parameters.Aggressive.ScoreRanking;
         }
     }
     else
     {
         //throw new Exception(
         //    "Fair value variation is not populated for current asset, which is of type International Equity");
         f1Score.FairValueVariation = 0;
     }
 }
 private void SetF1Score_InternationalEquity(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     SetForecastFiveYearReturnScore_IE(table, f1Score);
     SetForecastMorningstarScore_IE(f1Score, table);
     SetForecastDividendYieldScore_IE(table, f1Score);
     SetForecastReturnOnAssetScore_IE(table, f1Score);
     SetForecastReturnOnEquityScore_IE(table, f1Score);
     SetForecastFinancialLeverageScore_IE(table, f1Score);
     SetForecastOneYearRevenueGrowthScore_IE(table, f1Score);
     SetForecastDERatioScore_IE(f1Score, table);
     SetForecastCreditRatingScore_IE(f1Score, table);
     SetForecastFairValueVariationScore_IE(table, f1Score);
 }
 private void SetForecastReturnOnEquityScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     if (F1Recommendation.ReturnOnEquity >= table.Ief1Parameters.Defensive.ROEF1)
     {
         f1Score.ROEF1 = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.ReturnOnEquity >= table.Ief1Parameters.Conservative.ROEF1)
     {
         f1Score.ROEF1 = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (F1Recommendation.ReturnOnEquity >= table.Ief1Parameters.Balance.ROEF1)
     {
         f1Score.ROEF1 = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (F1Recommendation.ReturnOnEquity >= table.Ief1Parameters.Assertive.ROEF1)
     {
         f1Score.ROEF1 = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.ROEF1 = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastOneYearRevenueGrowthScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     var oneYearGrowth = F1Recommendation.OneYearRevenueGrowth;
     if (oneYearGrowth.HasValue)
     {
         if (oneYearGrowth.Value >= table.Ief1Parameters.Defensive.OneYearRevenueGrowthF1)
         {
             f1Score.OneYearRevenueGrowthF1 = table.Ief1Parameters.Defensive.ScoreRanking;
         }
         else if (oneYearGrowth.Value >= table.Ief1Parameters.Conservative.OneYearRevenueGrowthF1)
         {
             f1Score.OneYearRevenueGrowthF1 = table.Ief1Parameters.Conservative.ScoreRanking;
         }
         else if (oneYearGrowth.Value >= table.Ief1Parameters.Balance.OneYearRevenueGrowthF1)
         {
             f1Score.OneYearRevenueGrowthF1 = table.Ief1Parameters.Balance.ScoreRanking;
         }
         else if (oneYearGrowth.Value >= table.Ief1Parameters.Assertive.OneYearRevenueGrowthF1)
         {
             f1Score.OneYearRevenueGrowthF1 = table.Ief1Parameters.Assertive.ScoreRanking;
         }
         else
         {
             f1Score.OneYearRevenueGrowthF1 = table.Ief1Parameters.Aggressive.ScoreRanking;
         }
     }
     else
     {
         throw new Exception(
             "One Year Revenue Growth is not populated for current asset, which is of type International Equity");
     }
 }
 private void SetForecastMorningstarScore_IE(IEForecastParameter f1Score,
     InternationalEquitySuitabilityParameters table)
 {
     if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Buy ||
         F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.HighlyRecommended)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Accumulate ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Recommended)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Hold ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.InvestmentGrade)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Reduce)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Sell ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.Avoid ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.UnderReview)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
     else if (F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.CeasedCoverage ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.None ||
              F1Recommendation.MorningstarRecommendation == MorningStarRecommendation.NoRecommendation)
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Aggressive.ScoreRanking*20;
     }
     else
     {
         f1Score.MorningStarRecommendation = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastFiveYearReturnScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     var fiveYearTotalReturn = F1Recommendation.FiveYearTotalReturn;
     if (!fiveYearTotalReturn.HasValue)
     {
         throw new Exception(
             "Five year total return is not populated for current asset, which is of type International Equity.");
     }
     if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Defensive.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Conservative.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Balance.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Assertive.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastFinancialLeverageScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     var financialLeverage = F1Recommendation.FinancialLeverage;
     if (financialLeverage.HasValue)
     {
         if (financialLeverage.Value <= table.Ief1Parameters.Defensive.FinancialLeverageF1)
         {
             f1Score.FinancialLeverageF1 = table.Ief1Parameters.Defensive.ScoreRanking;
         }
         else if (financialLeverage.Value <= table.Ief1Parameters.Conservative.FinancialLeverageF1)
         {
             f1Score.FinancialLeverageF1 = table.Ief1Parameters.Conservative.ScoreRanking;
         }
         else if (financialLeverage.Value <= table.Ief1Parameters.Balance.FiveYearTotalReturn)
         {
             f1Score.FinancialLeverageF1 = table.Ief1Parameters.Balance.ScoreRanking;
         }
         else if (financialLeverage.Value <= table.Ief1Parameters.Assertive.FiveYearTotalReturn)
         {
             f1Score.FinancialLeverageF1 = table.Ief1Parameters.Assertive.ScoreRanking;
         }
         else
         {
             f1Score.FinancialLeverageF1 = table.Ief1Parameters.Aggressive.ScoreRanking;
         }
     }
     else
     {
         throw new Exception(
             "Financial Leverage is not populated for current asset, which is of type International Equity");
     }
 }
 private void SetForecastDividendYieldScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     if (F1Recommendation.DividendYield >= table.Ief1Parameters.Defensive.DividendYield)
     {
         f1Score.DividendYield = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.DividendYield >= table.Ief1Parameters.Conservative.DividendYield)
     {
         f1Score.DividendYield = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (F1Recommendation.DividendYield >= table.Ief1Parameters.Balance.DividendYield)
     {
         f1Score.DividendYield = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (F1Recommendation.DividendYield >= table.Ief1Parameters.Assertive.DividendYield)
     {
         f1Score.ScoreRanking = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.ScoreRanking = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastDERatioScore_IE(IEForecastParameter f1Score,
     InternationalEquitySuitabilityParameters table)
 {
     if (Sector == "Financial Services")
     {
         f1Score.DERatioF1 = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.DebtEquityRatio <= table.Ief1Parameters.Defensive.DERatioF1)
     {
         f1Score.DERatioF1 = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.DebtEquityRatio <= table.Ief1Parameters.Conservative.DERatioF1)
     {
         f1Score.DERatioF1 = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (F1Recommendation.DebtEquityRatio <= table.Ief1Parameters.Balance.DERatioF1)
     {
         f1Score.DERatioF1 = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (F1Recommendation.DebtEquityRatio <= table.Ief1Parameters.Assertive.DERatioF1)
     {
         f1Score.DERatioF1 = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.DERatioF1 = table.Ief0Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastCreditRatingScore_IE(IEForecastParameter f1Score,
     InternationalEquitySuitabilityParameters table)
 {
     if (F1Recommendation.CreditRating == CreditRating.Aaa ||
         F1Recommendation.CreditRating == CreditRating.AaaPlus ||
         F1Recommendation.CreditRating == CreditRating.AaaMinus)
     {
         f1Score.CreditRating = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (F1Recommendation.CreditRating == CreditRating.AaPlus ||
              F1Recommendation.CreditRating == CreditRating.Aa ||
              F1Recommendation.CreditRating == CreditRating.AaMinus)
     {
         f1Score.CreditRating = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (F1Recommendation.CreditRating == CreditRating.A ||
              F1Recommendation.CreditRating == CreditRating.APlus ||
              F1Recommendation.CreditRating == CreditRating.AMinus)
     {
         f1Score.CreditRating = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (F1Recommendation.CreditRating == CreditRating.Bbb ||
              F1Recommendation.CreditRating == CreditRating.BbbMinus ||
              F1Recommendation.CreditRating == CreditRating.BbbPlus)
     {
         f1Score.CreditRating = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.CreditRating = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }
 private void SetForecastFiveYearReturnScore_IE(InternationalEquitySuitabilityParameters table,
     IEForecastParameter f1Score)
 {
     var fiveYearTotalReturn = F1Recommendation.FiveYearTotalReturn;
     if (!fiveYearTotalReturn.HasValue)
     {
         fiveYearTotalReturn = 0;
     }
     if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Defensive.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Defensive.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Conservative.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Conservative.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Balance.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Balance.ScoreRanking;
     }
     else if (fiveYearTotalReturn.Value >= table.Ief1Parameters.Assertive.FiveYearTotalReturn)
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Assertive.ScoreRanking;
     }
     else
     {
         f1Score.FiveYearTotalReturn = table.Ief1Parameters.Aggressive.ScoreRanking;
     }
 }