This function only has one parameter.  That parameter is a risk percent entered as a decimal value.  When this function is called, it will adjusts all positions in the system proportionally so that the total system risk is equal to this desired risk percent.

 

For example, assume the overall system risk (as computed for each instrument using the close and the current stop price) is 4% for example (.04).  Assume the risk should be 5% (0.05).  To get to the required risk of 5%, this function will adjust/increase every position 25%.  

 

If the total risk for all positions in the system returns an average risk rate of 10%, and the required risk rate of the portfolio is 5%, then every position will be reduced by 50%.

 

Increasing a position size will result in adding units since the contract/share additions will have a different entry date than any of the existing units. Decreasing a position size will remove contracts/shares starting with the last unit on, and working back to the first if necessary.

 

This function is generally used by a Risk Manager Block to lighten a position to meet certain risk restrictions.

 

Syntax:

broker.AdjustSystemRiskToMax( fixedRiskAdjustRate )

 

Parameter:

Description:

fixedRiskAdjustRate

Factor by which the current position quantity will be multiplied.  Result will determine position size after adjustmens have been processed.

 

Returns:

System will be adjusted to meet the difference between the current risk and desired risk.

 

Example:

' Reduce the position size by our computed adjustment.
broker.AdjustSystemRiskToMax( fixedRiskAdjustRate )

 

Links:

Broker, Risk Manager Block, Adjust Instrument Risk Script

See Also:

 

 


Edit Time: 9/7/2020 2:31:58 PM


Topic ID#: 706

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software