Diversify your portfolio by adding single stock

12 April 2022
Complete Guide for CTO & IT Directors
Microservices under X-Ray Three books image Download free ebook

The main strategy for creating a successful portfolio is to diversify your investments. If you put all your funds into one asset, you can easily lose a lot of money. When you invest in assets that behave differently on the market, you minimize the risk that all of them will lose their value simultaneously.

Expert knowledge vs. data-driven solutions

There are two ways to approach a data science problem: expert knowledge and data-driven solutions. In our case, expert knowledge would be value-based investments. You must know the companies in your current portfolio and try to find others that will behave differently. For example, you can look in industry sectors that are not dependent on sectors from your portfolio.
The data-driven approach would be to look at a mathematical representation of a diversified portfolio, i.e, a correlation. If the prices of two assets are not correlated, they might be independent. Therefore, the key to portfolio diversification would be to add an asset not correlated with others.

Assets correlation

When there are more than two assets in a portfolio, it is harder to determine whether or not they are correlated. For three assets you will have three correlation factors, for four assets six factors, etc. Having to consider varying amounts of target values makes this approach difficult to use. There is one numeric value that determines how much a set of assets is uncorrelated – the determinant of the correlation matrix. The higher the determinant, the more uncorrelated the portfolio is.
We could compute this determinant for every potential portfolio – our current assets plus one asset candidate – and pick the candidate with the highest determinant. However, that approach is time consuming, and the time required grows with the size of our portfolio. Instead, we can use an approximated solution. Let’s approximate our portfolio using the weighted mean of assets’ prices. Weights used are assets’ percentages of total portfolio value. For example, say we have three assets:

– A worth $250
– B worth $750
– C worth $1000

The total portfolio value is $2000, so A is 12.5%, B is 37.5% and C is 50% of the total portfolio value. When averaging the portfolio price over time, we will use these values as weights. Using the approximation, we can compute a simple correlation factor for every asset candidate; this approach is less time consuming and more resource friendly.
To check if the approximation is working, we can compute determinants for the example portfolio and plot them against the approximated correlation factors. We should see a descending trend.

Picking asset candidates

When selecting stock to be added to our portfolio, lack of correlation is not the only factor to consider. We should also consider the stocks’ likelihood to perform well in the future. Again, we have two ways to tackle that problem. The expert knowledge approach would be to find a set of least correlated assets and analyze each one to find the most promising asset. However, that solution could be tricky since selected stocks may not be our area of expertise.
The data-driven approach would be to use machine learning to find the most promising assets and pick one of the least correlated ones. The most straightforward model to accomplish this would be one that predicts stock prices. Many have tried doing that, and many have failed. A less rigorous model would predict whether particular assets will outperform some mean value. In the case of the US stock market, that would be the S&P 500 Index.
Data we can use for such a model consists of companies’ income statements, balance sheets, and cash flow statements. We can also use variables derived from the stock prices such as returns from the last month, quarter, and year. Feeding all that data into an algorithm such as eXtreme Gradient Boosted Trees yields a model that allows us to order assets and look only at the most promising ones.

Data-driven solution to portfolio diversification

Now that we have all the building blocks, we can recap our data-driven solution. The first step would be ranking stocks based on their likelihood to out-perform the S&P 500 Index. For the high-ranking stocks, we would then compute their correlation factor with our portfolio. We would approximate our portfolio using the weighted mean of individual assets’ prices and choose the asset that correlates the least. To determine how much of the asset to buy, we could use the Markowitz Portfolio Theorem, which allows optimization of capital distribution between assets to reach the best returns-to-risk ratio.

Michał Olędzki

Latest Posts
invision vs figma

InVision vs. Figma: Key Features, Differences, and Similarities.

Figma and InVision rank among the best UI design tools. Learn about their key features and how they can speed up front-end development. It’s hard to overstate the importance of UI design in web and mobile development. To be successful a digital product needs to be an eye-pleaser and a UX gem, in addition to […]

/
flutter language logo

Flutter: the number one framework for building cross-platform apps

Flutter is an SDK for building fast apps for different platforms. It comes with comprehensive development tools and streamlines designing high-performance UIs. Find out why Flutter is a top-quality and cost-effective alternative to native app development. Flutter is Google’s open-source toolkit for developing high-fidelity cross-platform applications. It allows you to create native software for Android […]

/
django hosting

Hosting for Django? Here’s what you need to know.

Django is a robust web framework for Python that enables programmers to swiftly build web apps. But once you’ve built your application, the next step is to get it online and available to the world. That’s where hosting comes in. In this article, we will explore the various options available for hosting Django applications. Types […]

/
front end technologies

Top-ranking front-end technologies. Best tools to speed up UI development in 2023

Flawless UI is a must if your app is headed for success. Designing a high-quality front-end can be costly and time-consuming, but not so much if you’re able to choose the right toolset for your product. Find out the best front-end development options to consider in 2023. Back-end powers the functionality of the system, while […]

/
nodejs books

Top 7 Node.js Books for Both Beginner and Professional Developers

Looking to advance your expertise in Node.js? If you’re tired of chaotic online resources, try good old-fashioned books. They will provide you with structured knowledge and give you a clear understanding of even the most complex programming concepts. Node.js is an asynchronous, event-driven, backend JavaScript runtime designed to develop scalable network applications. As a cross-platform […]

/
AR in fashion

AR in Fashion. Key Benefits and Real Use Cases

AR technology has already taken root in many industries. One of them is fashion. Clothing, beauty, and retail brands have long been leveraging AR solutions to attract customers and boost sales. According to recent estimates, the number of mobile augmented reality (AR) users worldwide will reach 1.7 billion by 2024 – a huge rise from […]

/
Related posts
App Store Optimization Google Play

App Store Optimization: Google Play Store

Whenever new mobile apps for Android are released, one of the essential things to do is Google Play store app optimization. After all, the more target users you reach, the better the chance of success and the more user feedback you can gather. The two main app stores for listing mobile applications are Google Play […]

/

Let’s meet at TechCrunch Disrupt 2022!

Hi! My name is Marcin and I’m the CEO of NG Logic LLC. I’m on the TC Disrupt 2022 and luckily so are you! If you only wish for it I’ll be happy to meet you and talk about your company’s software challenges. Why should we meet? I can think of a few reasons. We […]

/

NG Logic is One of the Top 100 Companies in Clutch this 2022

At NG Logic, we focus on creating and developing innovative IT and software solutions and building software product development teams for our clients. With over 2 decades of experience in the market, we are confident that we are equipped with the right tools and experience to handle any project that you may have. Our bespoke […]

/

Diversify your portfolio by adding single stock

The main strategy for creating a successful portfolio is to diversify your investments. If you put all your funds into one asset, you can easily lose a lot of money. When you invest in assets that behave differently on the market, you minimize the risk that all of them will lose their value simultaneously. Expert […]

/

Economy business cycle prediction using LSTM neural networks

Economy as a whole goes through business cycles that consist of alternating expansions and contractions. It is not immediately obvious  what cycle the economy is currently in; it is difficult to tell if it is at the peak of an expansion or the trough of a contraction. The ability to predict economy cycles would be […]

/

NG Logic Proud to be Named a Top Development Firm by Clutch

Here at NG Logic, we know how difficult it can be to achieve your goals while also making sure your staff remains healthy during the ongoing COVID-19 pandemic. Rest assured that we’re here to help craft wonderful innovative IT solutions that will help you grow your business during these troubling times. We design custom applications to perform […]

/
Talk with experts

We look forward to hearing from you to start expanding your business together.

Email icon [email protected] Phone icon +1 (888) 413 3806