SlideShare a Scribd company logo
1 of 16
Interpreting RL Trading Agent
Visualization Infrastructure for RL-based Trading Strategies
Hariom Tatsat & Bryan Yekelchik
Agenda
1. Machine Learning for Trading
2. Reinforcement Learning for Trading
3. Need for interpretability
4. Interpretability approaches
5. Interpretability and Reinforcement Learning
6. Visual approach
7. Demo
8. Takeaways
9. Future ideas/work
Machine Learning for Trading
● Supervised Learning:
○ Predict price or if price will go up/down →
use for trading strategy
● Unsupervised Learning:
○ Reduce dimension or perform clustering
while building a trading strategy
● Reinforcement Learning:
○ “Trading-bots” making trading decision of
their own
Reinforcement Learning for Trading
RL Components:
Pros:
● No need to specify any rules or “strategy”
Cons:
● Lack of interpretability
● Data requirement
RL Components in Trading:
● Agent: Trading agent
● Action: Buy, sell, or hold
● Reward function:
● PnL
● Sharpe Ratio
● State:
● Stock Prices
● Volume
● Sentiments
● Environment: Stock exchange or the stock
market
Reinforcement Learning for Trading
Steps:
● Get the state
● Perform action
● Get the reward
● Update Q-table
Training - Deep Q-Learning based
Need for interpretability
● Significant amount of monetary and reputation risk in finance
● A small model error can lead to big events (i.e. flash crash, subprime crisis)
● Black-Box models inherently difficult to “sell” to investors.
● Challenging to optimize without transparency in the model.
Interpretability approaches
● Data exploration and visual approach
○ Scatter plots, correlation plots
○ Feature importance
● Quantitative approach - “contribution of each feature has in the model.”
○ SHAP
○ LIME
○ Global surrogate
Interpretability and Reinforcement Learning
● Why interpretability is so difficult in RL
○ Knowing where to extract data for interpretation
○ Computationally taxing training
○ Data changes as the agent interacts with its environment
● Goal: Visualization aspect of Interpretability
Approach
● Q-Value Extraction
○ Training and testing
● Three Module Visualization Approach
○ Inter-Episode
○ Intra-Episode
○ Testing
● Tech Stack:
○ Backend and Algorithm: Python
○ Front End: Dash Framework (Python)
○ DB: BigQuery
○ GPU: Google Collab
Module Structure
RLInterp
BigQuery and Google Collab Connection
Testing Training
Intra-Episode Inter-Episode
Case Study
● Traded Security: VOO between 2017 Q1 - 2018 Q4
● Features:
○ Price & Volume Change
● Hyperparameters Explored:
○ Gamma
○ NN Layers
○ Episodes
○ Batch Size
● Problem Statement: Can we use heatmaps of features vs trading decisions to
derive interpretation?
Demo
Takeaways
● RL outcomes are very sensitive to # of layers in DNN
○ One layer increase resulted in all ‘sell’ decisions
● Visual interpretation allows for easy confirmation of:
○ Desired trading strats (Does the algo indeed “buy low, sell high”?)
○ Intended effects of the HP changes
● Visualization infrastructure tool for RL-Based trading
● Sensitivity of HP to trading decisions
Further Work
● Online model tuning
● Incorporation of more features
○ Technical indicators (RSI, MACD, etc.)
○ Sentiment data via NLP → NLP/RL integration
● Quantitative Approach
○ How does the DNN effect the estimated Q-value?
○ Interpretation of DNN in the context of Q-values
Thank You
About US
Hariom Tatsat
● VP, Quantitative Analytics,
Barclays, NY
● Co-Author “Machine
Learning and Data Science
Blueprints for Finance”
● UC Berkeley, M.S. Financial
Engineering
● Contact Info:
○ https://www.linkedin.com/i
n/hariomtatsat/
○ hariom_tatsat@mfe.berkel
ey.edu
Bryan Yekelchik
● Lehigh ‘22, M.S. Financial
Engineering
● Bucknell, B.S. Mathematical
Economics
● Incoming Data Scientist @
BASF (FRA:BAS)
● Contact Info:
○ https://www.linkedin.com/i
n/bryan-yekelchik/
○ Biy320@Lehigh.edu
Zach Coriarty
● Lehigh ‘22, B.S. Computer
Science and Business
● Contact Info:
○ https://www.linkedin.com/i
n/zachary-coriarty/
○ zac222@Lehigh.edu

More Related Content

Similar to Interpreting RL Trading Agents

Lifetime Value - The Only Metric That Matters (DMC September 2018)
Lifetime Value - The Only Metric That Matters (DMC September 2018)Lifetime Value - The Only Metric That Matters (DMC September 2018)
Lifetime Value - The Only Metric That Matters (DMC September 2018)Luciano Pesci, PhD
 
Transforming B2B Sales with Spark Powered Sales Intelligence
Transforming B2B Sales with Spark Powered Sales IntelligenceTransforming B2B Sales with Spark Powered Sales Intelligence
Transforming B2B Sales with Spark Powered Sales IntelligenceSongtao Guo
 
Revenue Ops: Our Proven Framework for Massive Pipeline
Revenue Ops: Our Proven Framework for Massive PipelineRevenue Ops: Our Proven Framework for Massive Pipeline
Revenue Ops: Our Proven Framework for Massive PipelineSales Hacker
 
Phils Session cards @ Measurecamp
Phils Session cards @ MeasurecampPhils Session cards @ Measurecamp
Phils Session cards @ MeasurecampPhil Pearce
 
Vlady_Rusev_Eleven_Visa_Sales_2023.pdf
Vlady_Rusev_Eleven_Visa_Sales_2023.pdfVlady_Rusev_Eleven_Visa_Sales_2023.pdf
Vlady_Rusev_Eleven_Visa_Sales_2023.pdfVladimir Rusev
 
2022-October In-person Meetup-Barcelona Admins Group.pdf
2022-October In-person Meetup-Barcelona Admins Group.pdf2022-October In-person Meetup-Barcelona Admins Group.pdf
2022-October In-person Meetup-Barcelona Admins Group.pdfanimuscrm
 
Unleash the Power: Marketo & Microsoft Dynamics Integrations
Unleash the Power: Marketo & Microsoft Dynamics IntegrationsUnleash the Power: Marketo & Microsoft Dynamics Integrations
Unleash the Power: Marketo & Microsoft Dynamics IntegrationsBedrock Data, Inc.
 
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptxUNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptxDoug Hall
 
Sales Wave Apps - Partner Training
Sales Wave Apps - Partner TrainingSales Wave Apps - Partner Training
Sales Wave Apps - Partner TrainingSalesforce Partners
 
[V14] Odoo functional training Pinakin Nayi
[V14] Odoo functional training Pinakin Nayi[V14] Odoo functional training Pinakin Nayi
[V14] Odoo functional training Pinakin NayiPinakin Nayi
 
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...Octopus Events
 
Leveraging data insights to optimize deal management software performance.doc...
Leveraging data insights to optimize deal management software performance.doc...Leveraging data insights to optimize deal management software performance.doc...
Leveraging data insights to optimize deal management software performance.doc...Office24by7
 
Crawl, Walk, Run: The Evolution of Programmatic Optimization
Crawl, Walk, Run: The Evolution of Programmatic OptimizationCrawl, Walk, Run: The Evolution of Programmatic Optimization
Crawl, Walk, Run: The Evolution of Programmatic OptimizationMediaPost
 
A Technical Introduction to RTBkit
A Technical Introduction to RTBkitA Technical Introduction to RTBkit
A Technical Introduction to RTBkitDatacratic
 
A journey of ai driven analytics insights engine
A journey of  ai driven analytics insights engineA journey of  ai driven analytics insights engine
A journey of ai driven analytics insights engineSomya Anand
 
Serhii Herasymov: Boost sales through Accelerators (UA)
Serhii Herasymov: Boost sales through Accelerators (UA)Serhii Herasymov: Boost sales through Accelerators (UA)
Serhii Herasymov: Boost sales through Accelerators (UA)Lviv Startup Club
 
Advanced Topics in Calc Manager for HFM
Advanced Topics in Calc Manager for HFMAdvanced Topics in Calc Manager for HFM
Advanced Topics in Calc Manager for HFMAlithya
 
E-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comE-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comMongoDB
 
Performance Management
Performance ManagementPerformance Management
Performance Managementguruttam
 

Similar to Interpreting RL Trading Agents (20)

Lifetime Value - The Only Metric That Matters (DMC September 2018)
Lifetime Value - The Only Metric That Matters (DMC September 2018)Lifetime Value - The Only Metric That Matters (DMC September 2018)
Lifetime Value - The Only Metric That Matters (DMC September 2018)
 
Transforming B2B Sales with Spark Powered Sales Intelligence
Transforming B2B Sales with Spark Powered Sales IntelligenceTransforming B2B Sales with Spark Powered Sales Intelligence
Transforming B2B Sales with Spark Powered Sales Intelligence
 
Revenue Ops: Our Proven Framework for Massive Pipeline
Revenue Ops: Our Proven Framework for Massive PipelineRevenue Ops: Our Proven Framework for Massive Pipeline
Revenue Ops: Our Proven Framework for Massive Pipeline
 
Phils Session cards @ Measurecamp
Phils Session cards @ MeasurecampPhils Session cards @ Measurecamp
Phils Session cards @ Measurecamp
 
Vlady_Rusev_Eleven_Visa_Sales_2023.pdf
Vlady_Rusev_Eleven_Visa_Sales_2023.pdfVlady_Rusev_Eleven_Visa_Sales_2023.pdf
Vlady_Rusev_Eleven_Visa_Sales_2023.pdf
 
2022-October In-person Meetup-Barcelona Admins Group.pdf
2022-October In-person Meetup-Barcelona Admins Group.pdf2022-October In-person Meetup-Barcelona Admins Group.pdf
2022-October In-person Meetup-Barcelona Admins Group.pdf
 
Unleash the Power: Marketo & Microsoft Dynamics Integrations
Unleash the Power: Marketo & Microsoft Dynamics IntegrationsUnleash the Power: Marketo & Microsoft Dynamics Integrations
Unleash the Power: Marketo & Microsoft Dynamics Integrations
 
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptxUNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
 
Sales Wave Apps - Partner Training
Sales Wave Apps - Partner TrainingSales Wave Apps - Partner Training
Sales Wave Apps - Partner Training
 
[V14] Odoo functional training Pinakin Nayi
[V14] Odoo functional training Pinakin Nayi[V14] Odoo functional training Pinakin Nayi
[V14] Odoo functional training Pinakin Nayi
 
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...
Andrey Sukhovoy. Marketing Mix Modeling: Define the Optimal Budget Allocation...
 
Leveraging data insights to optimize deal management software performance.doc...
Leveraging data insights to optimize deal management software performance.doc...Leveraging data insights to optimize deal management software performance.doc...
Leveraging data insights to optimize deal management software performance.doc...
 
Crawl, Walk, Run: The Evolution of Programmatic Optimization
Crawl, Walk, Run: The Evolution of Programmatic OptimizationCrawl, Walk, Run: The Evolution of Programmatic Optimization
Crawl, Walk, Run: The Evolution of Programmatic Optimization
 
A Technical Introduction to RTBkit
A Technical Introduction to RTBkitA Technical Introduction to RTBkit
A Technical Introduction to RTBkit
 
A journey of ai driven analytics insights engine
A journey of  ai driven analytics insights engineA journey of  ai driven analytics insights engine
A journey of ai driven analytics insights engine
 
J SREERAMA
J SREERAMAJ SREERAMA
J SREERAMA
 
Serhii Herasymov: Boost sales through Accelerators (UA)
Serhii Herasymov: Boost sales through Accelerators (UA)Serhii Herasymov: Boost sales through Accelerators (UA)
Serhii Herasymov: Boost sales through Accelerators (UA)
 
Advanced Topics in Calc Manager for HFM
Advanced Topics in Calc Manager for HFMAdvanced Topics in Calc Manager for HFM
Advanced Topics in Calc Manager for HFM
 
E-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comE-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.com
 
Performance Management
Performance ManagementPerformance Management
Performance Management
 

Recently uploaded

Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationBoston Institute of Analytics
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 

Recently uploaded (20)

Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project Presentation
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 

Interpreting RL Trading Agents

  • 1. Interpreting RL Trading Agent Visualization Infrastructure for RL-based Trading Strategies Hariom Tatsat & Bryan Yekelchik
  • 2. Agenda 1. Machine Learning for Trading 2. Reinforcement Learning for Trading 3. Need for interpretability 4. Interpretability approaches 5. Interpretability and Reinforcement Learning 6. Visual approach 7. Demo 8. Takeaways 9. Future ideas/work
  • 3. Machine Learning for Trading ● Supervised Learning: ○ Predict price or if price will go up/down → use for trading strategy ● Unsupervised Learning: ○ Reduce dimension or perform clustering while building a trading strategy ● Reinforcement Learning: ○ “Trading-bots” making trading decision of their own
  • 4. Reinforcement Learning for Trading RL Components: Pros: ● No need to specify any rules or “strategy” Cons: ● Lack of interpretability ● Data requirement RL Components in Trading: ● Agent: Trading agent ● Action: Buy, sell, or hold ● Reward function: ● PnL ● Sharpe Ratio ● State: ● Stock Prices ● Volume ● Sentiments ● Environment: Stock exchange or the stock market
  • 5. Reinforcement Learning for Trading Steps: ● Get the state ● Perform action ● Get the reward ● Update Q-table Training - Deep Q-Learning based
  • 6. Need for interpretability ● Significant amount of monetary and reputation risk in finance ● A small model error can lead to big events (i.e. flash crash, subprime crisis) ● Black-Box models inherently difficult to “sell” to investors. ● Challenging to optimize without transparency in the model.
  • 7. Interpretability approaches ● Data exploration and visual approach ○ Scatter plots, correlation plots ○ Feature importance ● Quantitative approach - “contribution of each feature has in the model.” ○ SHAP ○ LIME ○ Global surrogate
  • 8. Interpretability and Reinforcement Learning ● Why interpretability is so difficult in RL ○ Knowing where to extract data for interpretation ○ Computationally taxing training ○ Data changes as the agent interacts with its environment ● Goal: Visualization aspect of Interpretability
  • 9. Approach ● Q-Value Extraction ○ Training and testing ● Three Module Visualization Approach ○ Inter-Episode ○ Intra-Episode ○ Testing ● Tech Stack: ○ Backend and Algorithm: Python ○ Front End: Dash Framework (Python) ○ DB: BigQuery ○ GPU: Google Collab
  • 10. Module Structure RLInterp BigQuery and Google Collab Connection Testing Training Intra-Episode Inter-Episode
  • 11. Case Study ● Traded Security: VOO between 2017 Q1 - 2018 Q4 ● Features: ○ Price & Volume Change ● Hyperparameters Explored: ○ Gamma ○ NN Layers ○ Episodes ○ Batch Size ● Problem Statement: Can we use heatmaps of features vs trading decisions to derive interpretation?
  • 12. Demo
  • 13. Takeaways ● RL outcomes are very sensitive to # of layers in DNN ○ One layer increase resulted in all ‘sell’ decisions ● Visual interpretation allows for easy confirmation of: ○ Desired trading strats (Does the algo indeed “buy low, sell high”?) ○ Intended effects of the HP changes ● Visualization infrastructure tool for RL-Based trading ● Sensitivity of HP to trading decisions
  • 14. Further Work ● Online model tuning ● Incorporation of more features ○ Technical indicators (RSI, MACD, etc.) ○ Sentiment data via NLP → NLP/RL integration ● Quantitative Approach ○ How does the DNN effect the estimated Q-value? ○ Interpretation of DNN in the context of Q-values
  • 16. About US Hariom Tatsat ● VP, Quantitative Analytics, Barclays, NY ● Co-Author “Machine Learning and Data Science Blueprints for Finance” ● UC Berkeley, M.S. Financial Engineering ● Contact Info: ○ https://www.linkedin.com/i n/hariomtatsat/ ○ hariom_tatsat@mfe.berkel ey.edu Bryan Yekelchik ● Lehigh ‘22, M.S. Financial Engineering ● Bucknell, B.S. Mathematical Economics ● Incoming Data Scientist @ BASF (FRA:BAS) ● Contact Info: ○ https://www.linkedin.com/i n/bryan-yekelchik/ ○ Biy320@Lehigh.edu Zach Coriarty ● Lehigh ‘22, B.S. Computer Science and Business ● Contact Info: ○ https://www.linkedin.com/i n/zachary-coriarty/ ○ zac222@Lehigh.edu

Editor's Notes

  1. Hariom
  2. Hariom
  3. Hariom
  4. Hariom
  5. Bryan
  6. Bryan - Make in
  7. Hariom
  8. Bryan - Using heatmap/
  9. Bryan
  10. Hariom?
  11. Bryan