The SAS Risk Engine on SAS Viya offers a powerful, next-generation platform that enables financial institutions to effectively measure, manage, and mitigate risk amid today’s rapidly evolving market landscape. Built on Viya’s cloud-native architecture, it seamlessly integrates high-performance computing, advanced analytics, and flexible deployment capabilities to deliver large-scale risk simulations with exceptional speed and efficiency.
SAS Risk Engine enables you to perform risk exposure mitigation which refer to mechanisms used to adjust or reduce the gross exposure of a financial position when assessing overall risk. These adjustments account for factors that partially or fully offset potential losses, leading to a more accurate and realistic measure of net exposure.
This article focuses on high level steps to perform mitigation in SAS Risk Engine. It is targeted towards the readers who possess a foundational knowledge of risk concepts, SAS programming concepts for writing methods along with a working familiarity with the SAS Risk Engine environment.
An exposure offset, also known as exposure mitigation, refers to any mechanism or factor that actively reduces the potential loss exposure of a portfolio, counterparty, or transaction. It adjusts the raw or gross exposure values to reflect the true level of financial risk faced by an institution. These offsets can take various forms, such as collateral, margining, netting agreements, guarantees, or hedging instruments, each designed to limit the extent of potential losses under adverse market or credit conditions. By accounting for such risk-reducing elements, institutions can achieve a more realistic and accurate representation of their actual exposure profiles.
|
For detailed information on the SAS Risk Engine, risk-related action sets, and guidance on interpreting outputs, please refer to the following:
Using the SAS Risk Engine Interface
|
In the context of SAS Risk Engine, exposure offsets are systematically incorporated into the exposure calculation process before risk metrics—such as Expected Exposure (EE), Potential Future Exposure (PFE), or Expected Shortfall (ES)—are derived. This ensures that the simulated or calculated exposures reflect the net risk position rather than overstated gross exposures. The result is a more refined risk assessment that supports effective capital allocation, regulatory compliance, and decision-making. Through this approach, SAS Risk Engine enables financial institutions to better capture the impact of mitigation strategies and optimize their overall risk management framework.
Following represents an indicative list of mitigants commonly used by the companies:
A high-level overview of steps for risk exposure mitigation
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
You must have your basic requirements ready for the pipeline you intend to use for your analysis. To incorporate exposure mitigation into your analysis, you must first add a mitigation table to the Portfolio node. This table should include all the mitigants you intend to use for offsetting the exposures present in your instrument data. Depending on how the exposures relate to these mitigants—such as through collateral, guarantees, or netting agreements—you may also need to define a specific mitigation method to ensure accurate application. Additionally, you’ll need to create a mitigation map that links each mitigation type in the table to its corresponding mitigation method. If the names of your mitigation methods match those of your mitigation types (the match is not case-sensitive), you can simplify this process by using the Automatically map mitigation methods option available in the Evaluate Portfolio node, which will automatically generate the required mappings. Finally, you must verify your results using the Query Results node. Following are more details for each of the step.
The SAS Risk Engine offers an intuitive user interface that guides you step-by-step through conducting risk analyses. The process begins by creating a risk pipeline, to which you can add various nodes that enhance its functionality.
Whether you interact with SAS Risk Engine via code or the user interface, you must first prepare several input tables. These tables must be loaded into memory within Cloud Analytic Services (CAS) before being used in the pipeline. Once the nodes are added, each can be individually configured to suit your analysis needs.
Using risk pipelines, you can efficiently set up the risk environment, score counterparties, analyze portfolios, and review analytical results.
Illustration of a pipeline with market related data sets
For more information refer to the following:
Working with Risk Pipelines in SAS Risk Engine
Performing Risk Analyses with Risk Pipelines in SAS Risk Engine
The mitigation data must follow a structure. It is very flexible. The mitigation table requires three mandatory columns: ExposureID, MitigantID, and MitigationType.
In addition to these required fields, the table can also include optional user-defined variables for enhanced customization and analysis. The table must be promoted or loaded to a Cloud Analytics Services or CAS library before associating it with any pipeline.
Check the following link to find out how to load the data into CAS:
Learn the three easiest ways to load data into CAS tables
Here is an example of a mitigation table, only few rows are shown for illustration purposes:
Illustration of a mitigation table
Note the mandatory column and two optional columns. The fraction column gives the fraction of exposure mitigated or offset by the collateral or the mitigant. The _priority _ column might be required if same mitigant is used for one or more exposures.
Loading the data in the pipeline is easy. You must select Portfolio tab, using the Portfolio Data Node Properties panel, click the folder icon for Mitigation data option and browse the required table.
Illustration of associating a mitigation data set to a pipeline
You also need to define a mitigation method that determines how offsets are applied. This method becomes essential in scenarios such as:
A mitigation method is not required when there is a one-to-one relationship between exposures and mitigants. In such cases, an evaluation method can be used directly to apply each mitigant to its corresponding exposure.
Here is an example of mitigation method:
_adjexposure_ = _adjexposure_ -
fraction*_mitigant_adjval_;
In the above piece of code, the adjusted exposure is offset by fraction variable value multiplied by mitigant adjustment value. You can write the code in any required way as long its syntax is correct and fulfils your requirement. Here is another example.
if _adjexposure_ >= _mitigant_adjval_ then do;
_adjexposure_ = _adjexposure_ - _mitigant_adjval_
;_mitigant_adjval_ = 0;end;
else do;_mitigant_adjval_ = _mitigant_adjval_ -
_adjexposure_ ;
_adjexposure_ = 0;end;
In this code, the logic compares the adjusted exposure with the available mitigant value and updates them accordingly. If the exposure is greater than or equal to the mitigant, the mitigant is fully used to reduce the exposure, and its value becomes zero. However, if the mitigant is greater than the exposure, the exposure is completely covered and set to zero, while the remaining mitigant value is retained so it can be applied to other exposures.
You must create the method by going to the Risk Methods page. Here is a summary of steps:
Illustration of creating a mitigation method
The mitigation map serves as a link between a mitigation method and its corresponding mitigation type, ensuring that the correct method is applied to the appropriate category of mitigation during the risk analysis process.
This mapping defines how different types of mitigations—such as collateral, guarantees, or credit derivatives—are processed and evaluated using their associated methods. By establishing this relationship, the system can automatically determine which mitigation approach to use for a given exposure.
Automatic mapping occurs when the names of the mitigation methods exactly match the names of the mitigation types. In this case, the system automatically pairs them without requiring manual configuration. The matching process is not case sensitive, meaning that variations in capitalization (for example, Collateral and collateral) will still be recognized as the same match.
You must create and map the mitigation method to appropriate instruments. Here is a summary of steps.
In the New Risk Method Map window, complete the following steps:
Illustration of creating a mitigation map
Illustration of mapping the mitigation method
Once you’ve finished configuring a risk pipeline, you simply need to submit it for execution to generate the analysis results. Upon submission, the SAS Risk Engine automatically performs several prerequisite tasks before sequentially running all the configured nodes within the pipeline.
After the run completes, you can review and analyze the results at both the pipeline level and the individual node level. The output data and results can be explored using tools such as SAS Visual Analytics and SAS Studio, which allow for detailed examination of tables and analytical outputs.
Additionally, depending on how your pipeline is configured, the results may also be accessible in SAS Risk Explorer, providing an integrated environment to visualize, compare, and interpret the outcomes of your risk analysis.
Here is an example of reviewing output using SAS Risk Explorer.
Illustration of SAS Risk Explorer presenting results
The SAS Risk Engine on SAS Viya provides a comprehensive, high-performance framework for accurately assessing and mitigating financial risk. By integrating exposure offsets directly into the risk calculation process, institutions can shift from gross to net exposure measurement—ensuring more realistic, regulation-aligned, and decision-ready insights. The platform’s modular pipeline approach empowers users to systematically load mitigation data, define and apply customized mitigation methods, and validate results through automated mappings and analytical visualization tools.
Through its combination of scalability, transparency, and flexibility, SAS Risk Engine enables organizations to model complex exposure relationships with precision—capturing the effects of collateral, netting, hedging, and diversification within a single, unified environment. Ultimately, this capability supports stronger risk governance, optimized capital allocation, and greater confidence in enterprise-wide risk management decisions.
Find more articles from SAS Global Enablement and Learning here.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.