16 using System.Runtime.CompilerServices;
28 public static partial class Messages
38 [MethodImpl(MethodImplOptions.AggressiveInlining)]
41 return Invariant($
@"The portfolio target percent: {
42 percent}, does not comply with the current 'Algorithm.Settings' 'MaxAbsolutePortfolioTargetPercentage': {
43 algorithm.Settings.MaxAbsolutePortfolioTargetPercentage} or 'MinAbsolutePortfolioTargetPercentage': {
44 algorithm.Settings.MinAbsolutePortfolioTargetPercentage}. Skipping");
50 [MethodImpl(MethodImplOptions.AggressiveInlining)]
53 return Invariant($
"{symbol} not found in portfolio. Request this data when initializing the algorithm.");
60 [MethodImpl(MethodImplOptions.AggressiveInlining)]
63 return Invariant($
"Unable to compute order quantity of {symbol}. Reason: {result.Reason} Returning null.");
69 [MethodImpl(MethodImplOptions.AggressiveInlining)]
70 public static string ToString(Algorithm.Framework.Portfolio.PortfolioTarget portfolioTarget)
72 var str = Invariant($
"{portfolioTarget.Symbol}: {portfolioTarget.Quantity.Normalize()}");
73 if (!
string.IsNullOrEmpty(portfolioTarget.Tag))
75 str += $
" ({portfolioTarget.Tag})";