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
now next later roadmap

Navigate Easily: A Step-by-Step Guide to the Now Next Later Roadmap

Let’s be honest – strategic planning is essential for successful product management. The Now-Next-Later roadmap is a powerful tool that helps teams prioritize tasks, streamline efforts, and align stakeholders. This guide delves into the intricacies of this roadmap, providing a comprehensive overview of its benefits and implementation. But first, let’s get some basics down for […]

/

Scrum: How to Work Together

With the popularity of the scrum framework among software development teams, it’s growingly important to learn how a scrum team works to meet its goals. Scrum Process Overview Scrum is an agile project management framework widely used in IT but can be applied to other fields as well. The framework facilitates the management of complex […]

/
event storming

Event Storming: How to Boost Your Software Development Process with a Simple Technique?

Event storming is a dynamic workshop technique that supports domain-driven design in software development. It can boost the team’s efficiency and reduce error risk, minimizing the back-and-forth in the development lifecycle. If you haven’t been living under a rock, you’re probably familiar with the concept of brainstorming. It’s a widely used term for the process […]

/
rails vs sinatra

Rails vs Sinatra

In the rapidly evolving world of software development, web frameworks have become essential tools for building robust and scalable web applications. These frameworks provide a structured environment that streamlines the development process, offering pre-written code, libraries, and guidelines that help developers avoid repetitive coding tasks, thus significantly enhancing productivity and ensuring best practices. Within the […]

/
android webstockets

Introduction to Android WebSocket

WebSockets have become a pivotal technology in enabling real-time communication for Android apps, offering a dynamic way to send and receive messages instantaneously. This technology facilitates a persistent connection between the client (Android app) and the server, bypassing the traditional HTTP request-response model to allow continuous data flow through a single TCP connection. The WebSocket […]

/
smart contracts audit

Introduction to Smart Contract Audits

In the blockchain world, smart contracts are key to decentralized applications (dApps), automating transactions and enforcing agreements without intermediaries. These contracts handle significant digital assets and perform crucial operations, making their security paramount. Smart contract audits are thus essential, scrutinizing the contract’s code for vulnerabilities to prevent potential security breaches. These audits are crucial for […]

/
Related posts
data science for finance

Data Science in Finance: Who is a Data Scientist and What They Do?

In the dynamic world of finance, staying ahead of the curve requires more than just traditional methods. As technology continues to evolve, the role of data science becomes increasingly crucial in deciphering complex financial landscapes. In this article, we’ll delve into the significance of data science in finance, its applications, the responsibilities of financial data […]

/
gregg castano news direct

How to Pick a Good Software Partner? Q&A with Gregg Castano of News Direct  

A few years ago, we had the opportunity to work with News Direct on developing their platform. After carefully analyzing their needs, we’ve helped them design the system and developed a microservices-based architecture incorporating state-of-the-art modern technology allowing for communication using both synchronous and asynchronous calls to ensure high system flexibility and scalability. The main […]

/
new york tech meetup

New York Tech Meetup Scene

In the bustling landscape of New York’s tech scene, a vibrant array of events and meetups provide a dynamic platform for knowledge exchange, networking, and innovation. Tech meetups, characterized by engaging presentations from industry experts, foster an atmosphere of collaborative learning and idea sharing. How to engage with that type of event? What To Expect […]

/
product roadmap example

Which Way To Go – Product Roadmap Example And Insights

A quick overview of product roadmaps, not only for product managers. Briefly, What Is A Product Roadmap? A product roadmap is a visual representation that outlines a product development and evolution over a defined period, serving as a communication tool to align stakeholders around the product’s direction, goals, and milestones. In general terms, the roadmap […]

/
smart retail

Smart retail solutions: how can they help your business grow?

Smart technologies are transforming the retail industry at an increasing rate. Brick-and-mortar stores are going digital to drive more sales and keep up with the competition. Find out about top solutions fueling retail growth and how they can benefit your business. Blockbuster, Borders, Barnes & Noble, Sears, and Toys R Us are but a few […]

/
predictive analytics retail

Predictive Analytics: Retail Industry Use Cases

Retail businesses have always been driven by data, whether it’s sales figures, inventory levels, or customer behavior. With the rise of predictive analytics, retailers have the ability to analyze large volumes of data to uncover data-driven insights and patterns that can help them make more informed decisions. Predictive analytics is a branch of advanced analytics […]

/
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