AI for Portfolio Management: LSTM Networks
₹14300/-₹57199/-
75% OFF
Get for ₹11440 with Course Bundle
- Live Trading
- Learning Track
- Prerequisites
- Syllabus
- About author
- Testimonials
- Faqs
Live Trading
- Learn the basics of portfolio management.
- Implement portfolio optimisation and mean-variance techniques.
- Apply Walk Forward Optimisation (WFO) to evaluate portfolio performance.
- Explore the architecture of ANN and LSTM.
- Use LSTM neural networks to optimise portfolios.
- Boost neural network performance with hyperparameter tuning and more input features.
- Practice paper trading and live trading with the portfolios you create.

Skills Covered
Portfolio Management
- Mean-Variance Optimisation
- Sharpe Ratio
- Maximum Drawdown
- Long-Short Portfolio
Concepts & Trading
- Walk-Forward Optimisation
- LSTM Neural Networks
- Hyperparameter Tuning
- Out-Of-Sample Testing
Python
- Pandas
- NumPy
- SciPy
- TensorFlow
- Matplotlib

learning track 7
This course is a part of the Learning Track: Portfolio Management and Position Sizing using Quantitative Methods
Course Fees
Full Learning Track
These courses are specially curated to help you with end-to-end learning of the subject.
Course Features
- Community
Faculty Support on Community
- Interactive Coding Exercises
Interactive Coding Practice
- Capstone Project
Capstone Project Using Real Market Data
- Trade & Learn Together
Trade and Learn Together
- Get Certified
Get Certified
Prerequisites
Make sure you're familiar with machine learning basics and working with datasets – our free course 'Introduction to Machine Learning' can help you with that. And don't forget some programming know-how! It'll come in handy for diving into the nitty-gritty of implementing AI techniques in our course 'Python for Trading!'
Syllabus
- IntroductionThis section serves as a preview of the course and introduces the course contents. The interactive methods used in this course will assist you in not only understanding the concepts but also answering all questions regarding artificial intelligence. This section explains the course structure as well as the various teaching tools used in the course, such as videos, quizzes, coding exercises, and the capstone project.
Aim of Portfolio Management
What should you look for when you are trying to create a portfolio? Returns? Risk? In this section, you will go through a scenario where you will understand what is to be considered when creating your own portfolio. You will also look at the mean-variance ratio and how it can be used to create an optimal portfolio.Aim of Portfolio Management2mConsideration in Creation of Portfolio5mKey Characteristic of Portfolio5mAnalogy of Portfolio5mPortfolio Choices5mOptimisation of a Portfolio2mPortfolio Optimisation Using Risk or Return5mEqual Importance to Risk and Return5mMeasure of Risk and Return5mMean-Variance Ratio5mMean-Variance and Sharpe Ratio5mPortfolio Choice Using Mean-Variance Optimisation5mCompatibility of Measures5mDecision Between Two Portfolios5mSection Summary2mAdditional Reading2mFAQ2mUnderstanding Aim of Portfolio Management5m- Building a PortfolioHow many different variations of portfolio weights should you consider while optimising your portfolio? If your answer is in single digits, you might be in for a surprise in this section. With the use of Python libraries, you can consider a large number of portfolio variations with different portfolio weights.Optimisation of Portfolio Using Mean-Variance2mMultiple Portfolios5mGeneration of Multiple Portfolios5mEqual Mean-Variance Ratios5mSteps to Create Mean-Variance Optimised Portfolio5mApplication of Mean-Variance Optimisation5mEqual Returns of Two Portfolios5mChoice of Portfolio5m
- Walk Forward OptimisationIn this section, you will try to see how you can use a major part of the dataset for optimisation without falling prey to overfitting or look-ahead biases.Walk Forward Optimisation2mBacktesting Entire Data5mDrawback of Division of Dataset in Two Parts5mUsage of Walk Forward Optimisation5mConcept of Walk Forward Optimisation5mApplication of Mean-Variance on Data5mAdvantage of Walk Forward Optimisation5mWalk Forward Optimisation with Fixed Window2mSignificance of Fixed Window5mAssignment of Weights5mRecalculation of Optimal Weights5mPortfolio Return Calculations5mIncrease in Fixed Window Size5mPerformance of Asset and Optimisation Process5mFAQ2m
Application of Mean-Variance in Portfolio
You have understood the mean-variance ratio for the calculation of optimal portfolio weights. You also saw how walk-forward optimisation can use a major part of the dataset for training without running into biases. Now, you will apply all your knowledge and create your very own mean-variance-based optimised portfolio.How to Use Jupyter Notebook?1m 54sOptimise Weights in Portfolio5mCalculate Daily Portfolio Returns5mCalculate Negative Sharpe Ratio5mCall Minimize Function5mCall Get Optimal Weights Function5mCalculate Sum of Weights for a Particular Day5mPart Summary2mAdditional Reading2mFrequently Asked Questions2m- Different Types of PortfolioIn this section, you will create different types of portfolios considering the short and long components of the portfolio. You will also see how leverage impacts the portfolio returns.Different Types of Portfolio2mOptimisation Method for Portfolio Management5mImprovement of Portfolio Returns5mAddition to Portfolio Returns5mBuild and Optimise Long Short Portfolios5mSummary of Mean-Variance Optimised Portfolio2mAdditional Reading2mFAQ2mTest on Mean-Variance Optimised Portfolio16m
AI for Portfolio Optimisation
Until now, we implemented portfolio optimisation using the mean-variance method, which is a traditional portfolio optimisation method. Are there any other ways to optimise the portfolio? In this section, we will explore the concept of artificial intelligence and how it can be used for portfolio optimisation.AI for Portfolio Optimisation2m 15sAdvantage of Using Artificial Intelligence5mInformative Features5mCapturing Market Movements5mDistribution of Asset Returns5mTemporal Aspects of Financial Data5mArtificial Intelligence2m 12sGoal of Artificial Intelligence5mSelf-Driving Cars5mVoice Assistants5mAI-Driven Portfolio Management Systems5mCategories of AI Models5mAdditional Reading on AI for Portfolio Optimisation2m- Artificial Neural NetworksIn this section, we explain the architecture of artificial neural network and its key components like neurons, activation functions and optimisers.ANN Architecture2mRole of Activation Functions5mPurpose of Weights5mLearning Process5mNeural Network Optimizer5mPortfolio Optimization - ANN5mActivation Functions2mOptimizers2mDrawback of ANN2mTest on AI for Portfolio Optimisation and ANN14m
- Long Short-Term Memory For Portfolio OptimisationIntroduction of Long Short-Term Memory(LSTM) neural network for application in portfolio management. This section covers the differences between ANN and LSTM.Differences Between ANN and LSTM3m 04sANN for Portfolio Optimisation5mMemory Cells of LSTM Networks5mLSTM vs ANN for Time Series Data5mStructural Differences Between ANN and LSTM Networks5mLSTM for Portfolio Optimisation5mFAQs on Long Short-Term Memory For Portfolio Optimisation2mAdditional Reading for Long Short-Term Memory For Portfolio Optimisation2m
Set Up LSTM Network for Portfolio Optimisation
This section covers the concepts used to create an LSTM network and structure the network for portfolio optimisation.How to Set Up the LSTM Network?2mSetting Up LSTM for Portfolio Optimisation5mBatch Size in LSTM Networks5mInput Data Dimensions in LSTM Networks5mLoss Function in LSTM Networks5mCustomised Loss Function5mLSTM for Portfolio Weights Optimisation5mDetermining Optimal Output Node Size in LSTM Input Layer5mDefining Input Shape for Time Series Data in LSTM5mUnderstanding the 'Sequential' Function in LSTM Model Syntax5mPurpose of the Output Layer in Neural Networks and LSTM5mDetermining Output Layer Size in the LSTM Model5mChoosing 'Softmax' for LSTM Output Layer Activation5mFunctionality of Softmax in Normalising LSTM Output Layer5mBenefits of Softmax in Determining Portfolio Weights5mDefault Activation Function in LSTM Output Layer5mUpdating LSTM Model with a New Layer: Keras Syntax5m- LSTM implementation for Portfolio optimisationThis section covers the implementation of LSTM neural networks for portfolio optimization. In addition to a detailed explanation on how to set up an LSTM network, this section also contains the Python implementation of LSTM for Portfolio Optimization.Implementing LSTM for Portfolio Weights Optimisation5mCreate the Features Data5mInitialising the Model Class5mAssigning Upper Limit for Weights5mFAQs on LSTM Implementation For Portfolio Optimisation2mAdditional Reading on LSTM implementation for Portfolio Optimisation2m
- Live Trading on IBridgePyIn this section, you would go through the different processes and API methods to build your own trading strategy for the live markets, and take it live as well.Uninterrupted Learning Journey with Quantra2mSection Overview2m 2sLive Trading Overview2m 41sVectorised vs Event Driven2mProcess in Live Trading2mReal-Time Data Source2mCode Structure2m 15sAPI Methods10mSchedule Strategy Logic2mFetch Historical Data2mPlace Orders2mIBridgePy Course Link10mAdditional Reading10mFrequently Asked Questions10m
- Paper and Live TradingTo make sure that you can use your learning from the course in the live markets, a live trading template has been created which can be used to paper trade and analyse its performance. This template can be used as a starting point to create your very own unique trading strategy.Template Documentation10mTemplate Code File2m
Walk Forward Optimisation With LSTM
This section covers the implementation of walk forward optimisation, a way to realistically understand the performance of the portfolio in the history. The complete implementation of walk forward optimisation along with quiz questions is covered in this question.- Hyperparameter SweepThis section covers the concepts of hyperparameter sweep and how it is used to select the hyperparameters of LSTM implementation for portfolio optimisation along with walk forward optimisation.Hyperparameter Sweep2mUnderstanding Hyperparameters in LSTM for Portfolio Optimisation5mRight Analogy for Hyperparameters5mUnderstanding the Hyperparameter Sweep Process5mPurpose of Hyperparameter Sweep in Portfolio Optimisation5mTerm for Trying Different Hyperparameter Combinations5mHyperparameter Sweep of LSTM and Walk Forward Optimisation5mFunction to Optimise During Hyperparameter Sweep5mSelecting the Best Hyperparameters5mTest on Building LSTM Model for Portfolio Management14mFAQs on Hyperparameter Sweep2mAdditional Reading on Hyperparameter Sweep2m
- Capstone Project-1In this section, you will apply the knowledge you have gained in the course so far. You will pick up a capstone project where you create a custom loss function for the LSTM model to calculate optimum weights for the assets in the portfolio.Getting Started With Capstone Project2mProblem Statement2mCode Template and Data2mCapstone Solution2m
- Building Long-Short LSTMBy now you already know how to build an LSTM model to optimise a long-only portfolio. In this section, we will take things up a notch by modifying the existing LSTM model such that it can optimise a long/short portfolio.LSTM for Long-Short Portfolio: An Overview2mGetting Weights for Long-Short Portfolio2mIssue with the Existing Model5mIdentify the Modification5mNet Weights5mPositive Net Weights5mNumber of Weights5mIdentify Long Positions5mModifications to LSTM2mIdentify the Modifications5mWeights for Four Assets5mNumber of Weights for Long/Short Portfolio5mDual Weights5mRole of Net Weights5mCalculation of Sharpe Ratio5mAdjusting the Weights5mFinal Output5mCore Goal of the Model5mOptimisation Process5m
- Implementing LSTM for Long-Short PortfolioThis section covers the Python implementation of the new LSTM model. In this section, you will learn how to make modifications to the long-only LSTM model and calculate weights for a long-short portfolio. You will also assess the results of the long-short optimised portfolio against the benchmark portfolio.Build the Model2mLSTM Model for Long-Short Portfolio5mLong Side of the Portfolio5mDifference between Long and Short Side5mBuilding the Model5mPortfolio Optimisation for Tech Stocks5mIdentify the Net Weights5mIdentify the Sharpe Ratio5mAdditional Reading on LSTM for Long/Short Portfolio Optimisation2mFAQs on LSTM for Long/Short Portfolio2mTest on LSTM for Long-Short Portfolio10m
- Capstone Project - 2In this section, you will apply the concepts learned in the past two sections. This project requires you to create an optimised long-short portfolio using the new LSTM model. But this time you will create a portfolio with a diversified range of assets instead of just stocks.Problem Statement2mCode Template and Data Files2mCapstone Project Model Solution5mCapstone Solution Downloadable2m
- Increasing the Features in the LSTM ModelIn this section, you will add some additional features to the existing LSTM model and create a long/short portfolio of tech stocks.Increasing the Features in the LSTM Model5mModel Architecture5mData Splitting5mFeature Creation5mFeature Significance5mRandom Seed Usage5m
- Run Codes Locally on Your MachineLearn to install the Python environment in your local machine.Python Installation Overview2m 18sFlow Diagram10mInstall Anaconda on Windows10mInstall Anaconda on Mac10mKnow your Current Environment2mTroubleshooting Anaconda Installation Problems10mCreating a Python Environment10mChanging Environments2mQuantra Environment2mTroubleshooting Tips For Setting Up Environment10mHow to Run Files in Downloadable Section?10mTroubleshooting For Running Files in Downloadable Section10m
- Summary and Next StepsIn this section, you will summarise the key concepts covered in the course and what you can do further in the realm of algo trading using AI.Summary and Next Steps2mNext Steps2mPython Codes and Data2m
Registered Successfully!
You will receive webinar joining details on your registered email
Would you like to start learning immediately?
about author


Why quantra®?
- More in Less Time
Gain more in less time
- Expert Faculty
Get taught by practitioners
- Self-paced
Learn at your own pace
- Data & Strategy Models
Get data & strategy models to practice on your own
Faqs
- When will I have access to the course content, including videos and strategies?
You will gain access to the entire course content including videos and strategies, as soon as you complete the payment and successfully enroll in the course.
- Will I get a certificate at the completion of the course?
Yes, you will be awarded with a certification from QuantInsti after successfully completing the online learning units.
- Are there any webinars, live or classroom sessions available in the course?
No, there are no live or classroom sessions in the course. You can ask your queries on community and get responses from fellow learners and faculty members.
- Is there any support available after I purchase the course?
Yes, you can ask your queries related to the course on the community: https://quantra.quantinsti.com/community
- What are the system requirements to do this course?
Fast-speed internet connection and a browser application are required for this course. For best experience, use Chrome.
- What is the admission criteria?
There is no admission criterion. You are recommended to go through the prerequisites section and be aware of skill sets gained and required to learn most from the course.
- Is there a refund available?
We respect your time, and hence, we offer concise but effective short-term courses created under professional guidance. We try to offer the most value within the shortest time. There are a few courses on Quantra which are free of cost. Please check the price of the course before enrolling in it. Once a purchase is made, we offer complete course content. For paid courses, we follow a 'no refund' policy.
- Is the course downloadable?
Some of the course material is downloadable such as Python notebooks with strategy codes. We also guide you how to use these codes on your own system to practice further.
- Can the python strategies provided in the course be immediately used for trading?
We focus on teaching these quantitative and machine learning techniques and how learners can use them for developing their own strategies. You may or may not be able to directly use them in your own system. Please do note that we are not advising or offering any trading/investment services. The strategies are used for learning & understanding purposes and we don't take any responsibility for the performance or any profit or losses that using these techniques results in.
- I want to develop my own algorithmic trading strategy. Can I use a Quantra course notebook for the same?
Quantra environment is a zero-installation solution to get beginners to start off with coding in Python. While learning you won't have to download or install anything! However, if you wish to later implement the learning on your system, you can definitely do that. All the notebooks in the Quantra portal are available for download at the end of each course and they can be run in the local system just the same as they run in the portal. The user can modify/tweak/rework all such code files as per his need. We encourage you to implement different concepts learnt from different learning tracks into your trading strategy to make it more suited to the real-world scenario.
- If I plug in the Quantra code to my trading system, am I sure to make money?
No. We provide you guidance on how to create strategy using different techniques and indicators, but no strategy is plug and play. A lot of effort is required to backtest any strategy, after which we fine-tune the strategy parameters and see the performance on paper trading before we finally implement the live execution of trades.
- What does "lifetime access" mean?
Lifetime access means that once you enroll in the course, you will have unlimited access to all course materials, including videos, resources, readings, and other learning materials for as long as the course remains available online. There are no time limits or expiration dates on your access, allowing you to learn at your own pace and revisit the content whenever you need it, even after you've completed the course. It's important to note that "lifetime" refers to the lifetime of the course itself—if the platform or course is discontinued for any reason, we will inform you in advance. This will allow you enough time to download or access any course materials you need for future use.
- What is AI-based portfolio management?
AI-based portfolio management refers to the use of artificial intelligence (AI) techniques and algorithms to optimize and manage investment portfolios. This approach involves leveraging machine learning, and other AI technologies to make data-driven decisions in the allocation, rebalancing, and optimization of investment portfolios.
- How do LSTM networks contribute to portfolio management?
Long Short-Term Memory (LSTM) networks, a type of recurrent neural network (RNN), contribute to portfolio management by analyzing time series data and capturing complex dependencies over extended periods. LSTMs are effective in recognizing patterns and trends in financial data, helping investors make more informed decisions regarding asset allocation and risk management.
- What advantages do LSTM networks offer in portfolio management compared to traditional methods?
Temporal Dependencies: LSTMs can capture long-term dependencies in time series data, providing a better understanding of historical market trends.
Non-linearity: LSTMs can model non-linear relationships in data, allowing for more accurate predictions and adaptability to changing market conditions.
Adaptability: LSTMs can adapt to changing market dynamics, making them suitable for dynamic and evolving financial markets. - What types of data inputs are used in LSTM networks for portfolio management?
Data inputs for LSTM networks in portfolio management typically include historical price/returns data, trading volumes, market indicators, economic indicators, and any other relevant financial information.
- Are there specific limitations or risks associated with using LSTM networks in portfolio management?
Overfitting: LSTMs may overfit to historical data, leading to poor generalization to new market conditions.
Data Quality: The performance of LSTM models heavily depends on the quality and relevance of the input data.
Model Complexity: LSTMs can be computationally intensive and may require significant computing resources.
Market Assumptions: LSTM models assume that historical patterns will repeat, which may not always hold true in rapidly changing markets.
- How adaptable are LSTM-based portfolio management strategies to changing market conditions?
LSTM-based strategies are relatively adaptable to changing market conditions due to their ability to capture temporal dependencies and nonlinear patterns. However, constant monitoring and periodic updates to the model are necessary to ensure its effectiveness in evolving market environments.