RNN, LSTM 및 VAR가 만난 DeepVAR

1.
Monitoring과 Assessment의 차이점을 아시나요? 헷지가 들어가면 자연스럽게 모니터링이 떠오르는데 해외 글을 읽어보면 Assessment를 사용하는 경우가 많습니다. Assessment를 번역해서 평가, Risk Assessment는 위험평가라고 합니다.

Assessment is a process for determining and addressing needs, or “gaps” between current conditions and desired conditions. Monitoring is the ongoing, systematic collection and analysis of data as a project progresses. It is aimed at measuring progress towards the achievement of programme objectives.

Assessment가 Monitoring을 포함하는 개념으로 이해하면 될 듯 합니다. Assessment로 시작한 이유는 관심을 끌었던 논문이 다루는 부분입니다. 위험평가할 때 익숙한 VAR와 기계학습을 의미하는 Deep이 만난 DeepVAR입니다.금융감독원이 제공하는 용어사전상 VaR(Value at Risk, 최대예상손실액)의 정의입니다.

리스크를 계량화하는 대표적인 지표로서 JP Morgan에서 최초로 개발하였다. VaR는 위험요소(주가, 금리, 환율 등)의 변동성을 통계적으로 분석하여 산출한 자산가치의 최대 손실을 의미한다. 이때 산출한 최대 손실은 보유기간과 신뢰수준에 따라 차이가 있는데 주식가격의 1일 변동치와 10일 변동치는 다르며, 1% 확률로 발생할 수 있는 손실의 최대값과 10% 확률로 발생할 수 있는 손실의 최대값이 서로 다르기 때문이다. 예를 들어 특정 금융회사가 보유한 단기매매 주식 1,500억원의 VaR가 보유기간 10일, 99% 신뢰수준에서 100억이라 하면 해당 자산을 10일 동안 보유하고 있을 때 주가의 변동으로 인해 100억 초과의 손실이 발생할 확률이 1%라는 것을 의미한다. VaR는 시장리스크, 신용리스크, 은행계정의 금리리스크를 산출할 때 모두 쓰이며 시장VaR, 신용VaR, 금리VaR와 같이 구분하여 사용한다.

DeepVaR의 출처는 DeepVaR: a framework for portfolio risk assessment leveraging probabilistic deep neural networks입니다.

Download (PDF, 1.93MB)

This paper introduces a data-driven framework that predicts portfolios’ VaR,addressing the above-mentioned challenges with the following key innovations:

1. Integrates a continuous learning approach that considers the latest market prices avoiding clustered VaR violations and thus addressing the dynamic nature of financial data.
2. Is able to capture rare market events with very short training time by utilizing probabilistic forecasting based on auto-regressive recurrent neural networks in the context of VaR.
3. Goes beyond single-asset pre-trade/what-if analysis (i.e., asset-level) to portfolio pre-trade/what-if analysis (i.e., portfolio-level). It should be noted that this is achieved in (near) real time by eliminating the need to re-train the neural network model.

이 논문의 모델이 가진 장점은 Iimely Manner와 Intra Day라는 부분입니다. 다른 모델과 비교할 때 장중 평가가 가능하다고 주장합니다.

DeepVaR proposes a continuous learning approach instead of a classical machine learning pipeline where the model is trained once and for several hours in a large dataset. Contrastingly, in DeepVaR, the model is retrained on the latest market data, addressing the dynamic nature of financial data while avoiding at the same time model bias and drift, serial correlation between VaR estimations and clustered VaR violations (Mehrabi et al. 2021). To this end, DeepAR parameters were optimized to enable model training in a timely manner (< 13 s), making it applicable even for intra-day VaR estimations.

2.
솔직히 저자인 Georgios Fatouros는 생소한 분입니다. 그리스에 위치한 대학에 다니시는 분입니다. 위 논문은 EU의 연구프로젝트로 선정받아 자금을 받기로 하였다고 하네요. 다른 논문으로 무엇이 있는지 찾아 보았습니다. Big Data and Artificial Intelligence in Digital Finance라는 Open Acess 도서에 여러 논문을 실었네요. Addressing Risk Assessments in Real-Time for Forex Trading도 DeepVAR와 비슷한 벙법을 Forex Trading에 적용한 논문입니다. 아마도 DeepVAR가 나중에 나온 논문으로 보입니다.

Risk assessment is of high importance when it comes to trading, investments, and other financial activities, as poor risk monitoring could lead to inefficient investments, loss of capital, and penalties by regulatory authorities. Thus, robust risk models, capable of yielding real-time results, are valuable assets for investment banking. This chapter introduces a financial tool that can provide risk assessment on Forex portfolios in (near) real-time and pre-trade analysis at rest. Financial risk is measured in terms of both Value at Risk and the Expected Shortfall, with the respective models utilizing not only statistical but also deep learning techniques that achieve accurate results. Moreover, the proposed application, based on state-of-the-art data management technologies, provides real-time risk assessments, utilizing the latest market data. These features along with the provided pre-trade analysis make this solution a valuable tool for practitioners in high frequency trading (HFT) and investment banking in general.

Download (PDF, 496KB)

앞서 논문과 같이 관심있게 본 부분은 Realtime이라고 표현한 부분입니다.

Real-Time Management

Delivering the aforementioned risk assessments while leveraging the latest available data is a challenging task, as FX market prices are updated at inconsistent high frequency time intervals (e.g., 1–8 seconds). Moreover, even small price fluctuations can have a significant impact on portfolios’ value, particularly in cases where an high-risk/return investment strategy is being employed. Thus, additional technologies are required that can provide seamless data management with online analytical processing capabilities.

Within Infinitech, this is accomplished via a new data management platform referred to as the InfiniSTORE. The InfiniSTORE extends a state-of-the-art database platformFootnote 2 and incorporates two important innovations that enable real-time analytical processing over operational data. Firstly, its hybrid transactional and analytical processing engine allows ingesting data at very high rates and perform analytics on the same dataset in parallel, without having to migrate historical data into a data temporary warehouse (which is both slow and by its nature batch-orientated). Secondly, its online aggregates function enables efficient execution of aggregate operations, which improves the response time for queries by an order of magnitude. Additional details can be found in Chap. 2.

The AI-Risk-Assessment requires the datastore to firstly store the raw input ticker data along with the risk estimations and secondly to enable online data aggregation and integrated query processing for data in-flight and at rest. These requirements are enabled by the InfiniSTORE and underlying LeanXcale database via its dual interface, allowing it to ingest operational data at any rate and also to perform analytical query processing on the live data that have been added in parallel.

In order for the application to achieve its main objective of measuring intra-day risk in a timely fashion (e.g., updating VaR/ES approximately every 15-minutes), the input tick data (with rate 1–8 second per instrument) should be resampled for the required frequency. LeanXcale provides online aggregates that enables real-time data analysis in a declarative way with standard SQL statements. In this way, only the definition of the required aggregate operations, such as average price per FX instrument per quarter-hour, is required and the result of the execution is pre-calculated on the fly, ensuring consistent transactional semantics. As a result, the typically long-lasting query can be transformed into a very light operation that requires the read-access to a single value, thus removing the need to scan the whole dataset.

개념모델을 구현하면서 채용한 기술은 다음과 같습니다.AWS와 마이크로소프트가 만드는 딥러닝 라이브러리인 GluonGluonTS – Probabilistic Time Series Modeling과 Database인 LeanXcale을 사용하였네요. Leanxcale 소개입니다.

SQL database with fast key-value data ingestion and linear horizontal scalability. It is optimal for data pipeline acceleration and real-time analytics

아래는 위 논문이 실린 Big Data and Artificial Intelligence in Digital Finance – Increasing Personalization and Trust in Digital Finance using Big Data and AI입니다.

Download (PDF, 8.96MB)

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.