Class: ProtonApi::GoalDecumulationAllocationRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/proton_api/models/goal_decumulation_allocation_request.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GoalDecumulationAllocationRequest

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 161

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'recommendation_config')
    self.recommendation_config = attributes[:'recommendation_config']
  end

  if attributes.has_key?(:'compounding_rate')
    self.compounding_rate = attributes[:'compounding_rate']
  else
    self.compounding_rate = 0.0
  end

  if attributes.has_key?(:'risk_score')
    self.risk_score = attributes[:'risk_score']
  end

  if attributes.has_key?(:'recommend_type')
    self.recommend_type = attributes[:'recommend_type']
  else
    self.recommend_type = 'horizon'
  end

  if attributes.has_key?(:'create_log')
    self.create_log = attributes[:'create_log']
  else
    self.create_log = false
  end

  if attributes.has_key?(:'n')
    self.n = attributes[:'n']
  else
    self.n = 1000
  end

  if attributes.has_key?(:'a_horizon')
    self.a_horizon = attributes[:'a_horizon']
  end

  if attributes.has_key?(:'allocation_method')
    self.allocation_method = attributes[:'allocation_method']
  end

  if attributes.has_key?(:'allocation_priority')
    self.allocation_priority = attributes[:'allocation_priority']
  end

  if attributes.has_key?(:'remove_outliers')
    self.remove_outliers = attributes[:'remove_outliers']
  else
    self.remove_outliers = true
  end

  if attributes.has_key?(:'adjust_for_compounding')
    self.adjust_for_compounding = attributes[:'adjust_for_compounding']
  else
    self.adjust_for_compounding = false
  end

  if attributes.has_key?(:'goal_id')
    self.goal_id = attributes[:'goal_id']
  end

  if attributes.has_key?(:'conf_tgt')
    self.conf_tgt = attributes[:'conf_tgt']
  else
    self.conf_tgt = 0.9
  end

  if attributes.has_key?(:'trading_days_per_year')
    self.trading_days_per_year = attributes[:'trading_days_per_year']
  else
    self.trading_days_per_year = 252
  end

  if attributes.has_key?(:'use_proxy_data')
    self.use_proxy_data = attributes[:'use_proxy_data']
  else
    self.use_proxy_data = false
  end

  if attributes.has_key?(:'thresh')
    self.thresh = attributes[:'thresh']
  end

  if attributes.has_key?(:'withdrawal_tax')
    self.withdrawal_tax = attributes[:'withdrawal_tax']
  else
    self.withdrawal_tax = 0.0
  end

  if attributes.has_key?(:'d_horizon')
    self.d_horizon = attributes[:'d_horizon']
  end

  if attributes.has_key?(:'client_id')
    self.client_id = attributes[:'client_id']
  end

  if attributes.has_key?(:'opt_config')
    self.opt_config = attributes[:'opt_config']
  end

  if attributes.has_key?(:'market_data_source')
    self.market_data_source = attributes[:'market_data_source']
  else
    self.market_data_source = 'nucleus'
  end

  if attributes.has_key?(:'thresh_type')
    self.thresh_type = attributes[:'thresh_type']
  else
    self.thresh_type = 'perc'
  end

  if attributes.has_key?(:'horizon_frequency')
    self.horizon_frequency = attributes[:'horizon_frequency']
  else
    self.horizon_frequency = 'year'
  end

  if attributes.has_key?(:'withdrawal_config')
    if (value = attributes[:'withdrawal_config']).is_a?(Array)
      self.withdrawal_config = value
    end
  end

  if attributes.has_key?(:'allocations')
    if (value = attributes[:'allocations']).is_a?(Array)
      self.allocations = value
    end
  end

  if attributes.has_key?(:'curr_inv')
    self.curr_inv = attributes[:'curr_inv']
  end

  if attributes.has_key?(:'deposit_config')
    if (value = attributes[:'deposit_config']).is_a?(Array)
      self.deposit_config = value
    end
  end
end

Instance Attribute Details

#a_horizonObject

Returns the value of attribute a_horizon.



29
30
31
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 29

def a_horizon
  @a_horizon
end

#adjust_for_compoundingObject

Returns the value of attribute adjust_for_compounding.



37
38
39
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 37

def adjust_for_compounding
  @adjust_for_compounding
end

#allocation_methodObject

Returns the value of attribute allocation_method.



31
32
33
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 31

def allocation_method
  @allocation_method
end

#allocation_priorityObject

Returns the value of attribute allocation_priority.



33
34
35
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 33

def allocation_priority
  @allocation_priority
end

#allocationsObject

Returns the value of attribute allocations.



65
66
67
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 65

def allocations
  @allocations
end

#client_idObject

Returns the value of attribute client_id.



53
54
55
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 53

def client_id
  @client_id
end

#compounding_rateObject

Returns the value of attribute compounding_rate.



19
20
21
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 19

def compounding_rate
  @compounding_rate
end

#conf_tgtObject

Returns the value of attribute conf_tgt.



41
42
43
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 41

def conf_tgt
  @conf_tgt
end

#create_logObject

Returns the value of attribute create_log.



25
26
27
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 25

def create_log
  @create_log
end

#curr_invObject

Returns the value of attribute curr_inv.



67
68
69
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 67

def curr_inv
  @curr_inv
end

#d_horizonObject

Returns the value of attribute d_horizon.



51
52
53
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 51

def d_horizon
  @d_horizon
end

#deposit_configObject

Returns the value of attribute deposit_config.



69
70
71
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 69

def deposit_config
  @deposit_config
end

#goal_idObject

Returns the value of attribute goal_id.



39
40
41
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 39

def goal_id
  @goal_id
end

#horizon_frequencyObject

Returns the value of attribute horizon_frequency.



61
62
63
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 61

def horizon_frequency
  @horizon_frequency
end

#market_data_sourceObject

Returns the value of attribute market_data_source.



57
58
59
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 57

def market_data_source
  @market_data_source
end

#nObject

Returns the value of attribute n.



27
28
29
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 27

def n
  @n
end

#opt_configObject

Returns the value of attribute opt_config.



55
56
57
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 55

def opt_config
  @opt_config
end

#recommend_typeObject

Returns the value of attribute recommend_type.



23
24
25
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 23

def recommend_type
  @recommend_type
end

#recommendation_configObject

Returns the value of attribute recommendation_config.



17
18
19
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 17

def recommendation_config
  @recommendation_config
end

#remove_outliersObject

Returns the value of attribute remove_outliers.



35
36
37
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 35

def remove_outliers
  @remove_outliers
end

#risk_scoreObject

Returns the value of attribute risk_score.



21
22
23
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 21

def risk_score
  @risk_score
end

#threshObject

Returns the value of attribute thresh.



47
48
49
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 47

def thresh
  @thresh
end

#thresh_typeObject

Returns the value of attribute thresh_type.



59
60
61
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 59

def thresh_type
  @thresh_type
end

#trading_days_per_yearObject

Returns the value of attribute trading_days_per_year.



43
44
45
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 43

def trading_days_per_year
  @trading_days_per_year
end

#use_proxy_dataObject

Returns the value of attribute use_proxy_data.



45
46
47
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 45

def use_proxy_data
  @use_proxy_data
end

#withdrawal_configObject

Returns the value of attribute withdrawal_config.



63
64
65
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 63

def withdrawal_config
  @withdrawal_config
end

#withdrawal_taxObject

Returns the value of attribute withdrawal_tax.



49
50
51
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 49

def withdrawal_tax
  @withdrawal_tax
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 94

def self.attribute_map
  {
    :'recommendation_config' => :'recommendation_config',
    :'compounding_rate' => :'compounding_rate',
    :'risk_score' => :'risk_score',
    :'recommend_type' => :'recommend_type',
    :'create_log' => :'create_log',
    :'n' => :'n',
    :'a_horizon' => :'a_horizon',
    :'allocation_method' => :'allocation_method',
    :'allocation_priority' => :'allocation_priority',
    :'remove_outliers' => :'remove_outliers',
    :'adjust_for_compounding' => :'adjust_for_compounding',
    :'goal_id' => :'goal_id',
    :'conf_tgt' => :'conf_tgt',
    :'trading_days_per_year' => :'trading_days_per_year',
    :'use_proxy_data' => :'use_proxy_data',
    :'thresh' => :'thresh',
    :'withdrawal_tax' => :'withdrawal_tax',
    :'d_horizon' => :'d_horizon',
    :'client_id' => :'client_id',
    :'opt_config' => :'opt_config',
    :'market_data_source' => :'market_data_source',
    :'thresh_type' => :'thresh_type',
    :'horizon_frequency' => :'horizon_frequency',
    :'withdrawal_config' => :'withdrawal_config',
    :'allocations' => :'allocations',
    :'curr_inv' => :'curr_inv',
    :'deposit_config' => :'deposit_config'
  }
end

.swagger_typesObject

Attribute type mapping.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 127

def self.swagger_types
  {
    :'recommendation_config' => :'RecommendationConfig',
    :'compounding_rate' => :'Float',
    :'risk_score' => :'Float',
    :'recommend_type' => :'String',
    :'create_log' => :'BOOLEAN',
    :'n' => :'Integer',
    :'a_horizon' => :'Integer',
    :'allocation_method' => :'String',
    :'allocation_priority' => :'String',
    :'remove_outliers' => :'BOOLEAN',
    :'adjust_for_compounding' => :'BOOLEAN',
    :'goal_id' => :'String',
    :'conf_tgt' => :'Float',
    :'trading_days_per_year' => :'Integer',
    :'use_proxy_data' => :'BOOLEAN',
    :'thresh' => :'Float',
    :'withdrawal_tax' => :'Float',
    :'d_horizon' => :'Integer',
    :'client_id' => :'String',
    :'opt_config' => :'OptConfig',
    :'market_data_source' => :'String',
    :'thresh_type' => :'String',
    :'horizon_frequency' => :'String',
    :'withdrawal_config' => :'Array<GoalWithdrawalConfig>',
    :'allocations' => :'Array<String>',
    :'curr_inv' => :'Float',
    :'deposit_config' => :'Array<DecumulationGoalDepositConfig>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 618

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      recommendation_config == o.recommendation_config &&
      compounding_rate == o.compounding_rate &&
      risk_score == o.risk_score &&
      recommend_type == o.recommend_type &&
      create_log == o.create_log &&
      n == o.n &&
      a_horizon == o.a_horizon &&
      allocation_method == o.allocation_method &&
      allocation_priority == o.allocation_priority &&
      remove_outliers == o.remove_outliers &&
      adjust_for_compounding == o.adjust_for_compounding &&
      goal_id == o.goal_id &&
      conf_tgt == o.conf_tgt &&
      trading_days_per_year == o.trading_days_per_year &&
      use_proxy_data == o.use_proxy_data &&
      thresh == o.thresh &&
      withdrawal_tax == o.withdrawal_tax &&
      d_horizon == o.d_horizon &&
      client_id == o.client_id &&
      opt_config == o.opt_config &&
      market_data_source == o.market_data_source &&
      thresh_type == o.thresh_type &&
      horizon_frequency == o.horizon_frequency &&
      withdrawal_config == o.withdrawal_config &&
      allocations == o.allocations &&
      curr_inv == o.curr_inv &&
      deposit_config == o.deposit_config
end

#_deserialize(type, value) ⇒ Object

Returns Deserialized data.

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 685

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    value
  when :Date
    value
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = ProtonApi.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



749
750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 749

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 665

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


652
653
654
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 652

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



658
659
660
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 658

def hash
  [recommendation_config, compounding_rate, risk_score, recommend_type, create_log, n, a_horizon, allocation_method, allocation_priority, remove_outliers, adjust_for_compounding, goal_id, conf_tgt, trading_days_per_year, use_proxy_data, thresh, withdrawal_tax, d_horizon, client_id, opt_config, market_data_source, thresh_type, horizon_frequency, withdrawal_config, allocations, curr_inv, deposit_config].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 310

def list_invalid_properties
  invalid_properties = Array.new
  if !@compounding_rate.nil? && @compounding_rate < -1
    invalid_properties.push('invalid value for "compounding_rate", must be greater than or equal to -1.')
  end

  if !@risk_score.nil? && @risk_score > 100
    invalid_properties.push('invalid value for "risk_score", must be smaller than or equal to 100.')
  end

  if !@risk_score.nil? && @risk_score < 0
    invalid_properties.push('invalid value for "risk_score", must be greater than or equal to 0.')
  end

  if !@n.nil? && @n > 10000
    invalid_properties.push('invalid value for "n", must be smaller than or equal to 10000.')
  end

  if !@n.nil? && @n < 1
    invalid_properties.push('invalid value for "n", must be greater than or equal to 1.')
  end

  if !@a_horizon.nil? && @a_horizon > 350
    invalid_properties.push('invalid value for "a_horizon", must be smaller than or equal to 350.')
  end

  if !@a_horizon.nil? && @a_horizon < 0
    invalid_properties.push('invalid value for "a_horizon", must be greater than or equal to 0.')
  end

  if @allocation_method.nil?
    invalid_properties.push('invalid value for "allocation_method", allocation_method cannot be nil.')
  end

  if @allocation_priority.nil?
    invalid_properties.push('invalid value for "allocation_priority", allocation_priority cannot be nil.')
  end

  if !@conf_tgt.nil? && @conf_tgt > 1
    invalid_properties.push('invalid value for "conf_tgt", must be smaller than or equal to 1.')
  end

  if !@conf_tgt.nil? && @conf_tgt < 0
    invalid_properties.push('invalid value for "conf_tgt", must be greater than or equal to 0.')
  end

  if !@trading_days_per_year.nil? && @trading_days_per_year > 365
    invalid_properties.push('invalid value for "trading_days_per_year", must be smaller than or equal to 365.')
  end

  if !@trading_days_per_year.nil? && @trading_days_per_year < 1
    invalid_properties.push('invalid value for "trading_days_per_year", must be greater than or equal to 1.')
  end

  if !@thresh.nil? && @thresh < 0
    invalid_properties.push('invalid value for "thresh", must be greater than or equal to 0.')
  end

  if !@withdrawal_tax.nil? && @withdrawal_tax > 1
    invalid_properties.push('invalid value for "withdrawal_tax", must be smaller than or equal to 1.')
  end

  if !@withdrawal_tax.nil? && @withdrawal_tax < 0
    invalid_properties.push('invalid value for "withdrawal_tax", must be greater than or equal to 0.')
  end

  if !@d_horizon.nil? && @d_horizon > 350
    invalid_properties.push('invalid value for "d_horizon", must be smaller than or equal to 350.')
  end

  if !@d_horizon.nil? && @d_horizon < 0
    invalid_properties.push('invalid value for "d_horizon", must be greater than or equal to 0.')
  end

  if !@curr_inv.nil? && @curr_inv < 0
    invalid_properties.push('invalid value for "curr_inv", must be greater than or equal to 0.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



730
731
732
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 730

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



736
737
738
739
740
741
742
743
744
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 736

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns String presentation of the object.

Returns:

  • (String)

    String presentation of the object



724
725
726
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 724

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/proton_api/models/goal_decumulation_allocation_request.rb', line 393

def valid?
  return false if !@compounding_rate.nil? && @compounding_rate < -1
  return false if !@risk_score.nil? && @risk_score > 100
  return false if !@risk_score.nil? && @risk_score < 0
  recommend_type_validator = EnumAttributeValidator.new('String', ['recurring', 'one-time', 'combo', 'horizon'])
  return false unless recommend_type_validator.valid?(@recommend_type)
  return false if !@n.nil? && @n > 10000
  return false if !@n.nil? && @n < 1
  return false if !@a_horizon.nil? && @a_horizon > 350
  return false if !@a_horizon.nil? && @a_horizon < 0
  return false if @allocation_method.nil?
  allocation_method_validator = EnumAttributeValidator.new('String', ['select', 'create'])
  return false unless allocation_method_validator.valid?(@allocation_method)
  return false if @allocation_priority.nil?
  allocation_priority_validator = EnumAttributeValidator.new('String', ['goal', 'risk'])
  return false unless allocation_priority_validator.valid?(@allocation_priority)
  return false if !@conf_tgt.nil? && @conf_tgt > 1
  return false if !@conf_tgt.nil? && @conf_tgt < 0
  return false if !@trading_days_per_year.nil? && @trading_days_per_year > 365
  return false if !@trading_days_per_year.nil? && @trading_days_per_year < 1
  return false if !@thresh.nil? && @thresh < 0
  return false if !@withdrawal_tax.nil? && @withdrawal_tax > 1
  return false if !@withdrawal_tax.nil? && @withdrawal_tax < 0
  return false if !@d_horizon.nil? && @d_horizon > 350
  return false if !@d_horizon.nil? && @d_horizon < 0
  market_data_source_validator = EnumAttributeValidator.new('String', ['nucleus', 'integration'])
  return false unless market_data_source_validator.valid?(@market_data_source)
  thresh_type_validator = EnumAttributeValidator.new('String', ['amnt', 'perc'])
  return false unless thresh_type_validator.valid?(@thresh_type)
  horizon_frequency_validator = EnumAttributeValidator.new('String', ['year', 'six_months', 'quarter', 'month', 'two_weeks', 'week', 'day'])
  return false unless horizon_frequency_validator.valid?(@horizon_frequency)
  return false if !@curr_inv.nil? && @curr_inv < 0
  true
end