Python for Finance — Analysing Account Receivables (2024)

Account receivables are amounts owed to a company by its customers. In this story, we are going to use Python to analyse receivables for companies in the technology sector. The story will be split into two parts. First, we will start analysing account receivables for Apple. Then, we will move to analyse the receivables to sales ratio for a group of comparable companies in the Technological sector.

Python for Finance — Analysing Account Receivables (3)

Account receivables are financial assets from a company since they represent amounts owned to the company for selling goods or services.

One of the ratios that investors often use to compare receivables across companies is the receivable to sales ratio. A high ratio of account receivables in terms of sales indicates that a firm has a big percentage of sales in credit. A high ratio poses certain risk in companies since debtors may not be able to pay their obligations.

Every company needs to estimate how much of the outstanding receivables will not be collected. These are called bad debt receivables and reduce the profits of a company and the gross receivable amounts. Therefore, keeping low receivable levels may be seen as a good sign since the bad debt provision made by companies will therefore be smaller.

On the other hand, having very low receivables to sales ratio may indicate that a firm is too aggressive with its customers. Consequently, an aggressive collection approach, may affect firms relationships with customers impacting sales.

First of all, we are going to perform a receivables trend analysis with Python for Apple. This will show us how account receivables have evolved during the last quarters in absolute terms.

We will use financialmodelingprep, a free financial API, to retrieve financial data. If you have followed along with my previous stories, the code below will result familiar to you. Therefore, I will not go into much details on what it does.

Basically, we are making a get request to the API endpoint to retrieve Balance Sheet data. Then, we parse the response in order to extract receivables data and add it to a Python dictionary.

Finally, we convert the dictionary into a Pandas DataFrame.

import requests
import pandas as pd

all_Receivables = {}
stock = 'AAPL'

balanceSheet = requests.get(f'https://financialmodelingprep.com/api/v3/financials/balance-sheet-statement/{stock}?period=quarter')

balanceSheet = balanceSheet.json()

all_Receivables[stock] = {}

for item in balanceSheet['financials']:
receivables = item['Receivables']
period = item['date']
all_Receivables[stock][period] = receivables
all_Receivables

receivables_apple = pd.DataFrame.from_dict(all_Receivables, orient='index')
receivables_apple = receivables_apple.T

Once we have our Pandas DataFrame, we use the library Plotly in order to plot the receivables in a bar format:

import plotly.express as px

fig = px.bar(receivables_apple, x=receivables_apple.index,y =receivables_apple[stock],title='Account Receivables: ' + stock)

fig.show()

Python for Finance — Analysing Account Receivables (4)

In the previous section, we plotted the account receivables trend for Apple. We can see that receivables are increasing over time. This may be due to the fact that sales are increasing which is translated into a higher level of receivables.

For this reason, looking only to Account Receivables may not be enough to help investors. In this section, we are going to go one step further to analyse both:

  • Account Receivables to sales ratio. This will indicate the level of receivables in terms of sales. This will be very helpful in order to compare a company with comparable companies.
  • Account Receivables comparison across companies operating in the same sector.

First of all, as you see below in the code part, we have a list of companies operating in the Technological sector. In one of my previous post, I showed you how to programatically extract all tickers of companies operating in a sector.

Next, we loop through each of the companies in the list in order to extract receivables and revenues to compute the receivable to sales ratio. Next, we add these three variables into a Python dictionary. Finally, as we did in the previous section, we convert the dictionary into a Pandas DataFrame.

technological_companies = ['MSFT','AAPL','AMZN','GOOG','IBM','CSCO','ORCL','SAP','IBM']
all_Receivables = {}

for company in technological_companies:
try:
#Retrieve Balance Sheet Data for each of the companies in the list
balanceSheet = requests.get(f'https://financialmodelingprep.com/api/v3/financials/balance-sheet-statement/{company}?period=quarter')
balanceSheet = balanceSheet.json()
all_Receivables[company] = {}
for item in balanceSheet['financials']:
receivables = item['Receivables']
all_Receivables[company]['receivables'] = receivables

IS = requests.get(f'https://financialmodelingprep.com/api/v3/financials/income-statement/{company}?period=quarter')
IS = IS.json()
for item in IS['financials']:
revenues = item['Revenue']
all_Receivables[company]['Revenue'] = revenues

all_Receivables[company]['receivables_to_sales'] = float(receivables)/float(revenues)
except:
pass

receivables_companies = pd.DataFrame.from_dict(all_Receivables, orient='index')
receivables_companies = receivables_companies.T
print(receivables_companies)

Python for Finance — Analysing Account Receivables (5)

Then, we perform some data manipulation to keep only the row receivables_to_sales since it is the information that we want to plot.

#keep only receivables to sales
receivables_companies = receivables_companies[receivables_companies.index =='receivables_to_sales']
receivables_companies = receivables_companies.T.reset_index()

Finally, after cleaning up the DataFrame, we can plot the receivables to sales ratio for different companies using Plotly:

import plotly.express as px

fig = px.bar(receivables_companies, x=receivables_companies['index'],y =receivables_companies['receivables_to_sales'])

fig.show()

Python for Finance — Analysing Account Receivables (6)

We have seen two easy ways to analyze account receivables for individual companies as well as for a group of comparable companies.

In our example, we can see that IBM has an extremely high receivables to sales ratio compare to peer companies. As next step to complete our analysis, we would need to go to the financial notes of the company financial report to understand the reason for the high ratio. Is it due to IBM offering long term payments to customers? Or maybe the firm is not good enough managing the collection of receivables?

On the other extreme, we have Amazon with a very low ratio. This may be due to the fact that a part of Amazon business is directly selling to customers where payments are instantaneous.

Follow me on Twitter to learn more about Python for Finance.

Python for Finance — Analysing Account Receivables (2024)

FAQs

What is an effective tool for analyzing accounts receivable? ›

Accounting software is the backbone of any accounts receivable department. It simplifies the recording and tracking of financial transactions and provides real-time insights into an organization's financial health. Popular accounting software includes QuickBooks, Xero, and FreshBooks.

Can you use Python for financial analysis? ›

Common in applications that range from risk management to cryptocurrencies, Python has become one of the most popular programming languages for Fintech Companies. Its simplicity and robust modeling capabilities make it an excellent financial analysis tool for researchers, analysts, and traders.

How do you identify the amount of accounts receivable? ›

Gross accounts receivable represents the total amount of outstanding invoices or the sum owed by customers. It's perhaps the easiest to calculate, too - you simply add up all the outstanding invoices at a given time! It's a raw figure without any adjustments and sets the stage for more nuanced metrics.

How do you analyze accounts receivable? ›

One of the simplest methods available is the use of the accounts receivable-to-sales ratio. This ratio, which consists of the business's accounts receivable divided by its sales, allows investors to ascertain the degree to which the business's sales have not yet been paid for by customers at a particular point in time.

What is the most commonly used tool to evaluate accounts receivable performance? ›

DSO is the most commonly tracked KPI for Accounts Receivable — and for good reason. By determining the average number of days it takes to collect payments, you can monitor cash flow at an individual customer and organizational level.

What are three ways to measure accounts receivable performance? ›

5 key metrics to assess your AR performance
  • Days Sales Outstanding (DSO) ...
  • Average Days Delinquent (ADD) ...
  • Accounts Receivable Turnover Ratio (ART) ...
  • Collection Effectiveness Index (CEI) ...
  • Number of revised invoices.

Is Python better than Excel for finance? ›

Python: The Rising Star in Finance

These libraries empower users to manipulate data, conduct statistical analysis, and build sophisticated financial models with ease. One of Python's key advantages over Excel is its scalability and performance.

Which Python is best for finance? ›

In summary, here are 10 of our most popular python courses
  • Advanced Portfolio Construction and Analysis with Python: EDHEC Business School.
  • Python and Machine Learning for Asset Management: EDHEC Business School.
  • Python and Machine-Learning for Asset Management with Alternative Data Sets: EDHEC Business School.

Is Python the best language for finance? ›

Python is one of the most user-friendly and versatile programming languages for financial applications. This programming language is popular among developers because of its readability and adaptability to a wide range of applications, regardless of the project's scalability.

What is a good accounts receivable turnover ratio? ›

What is a Good Accounts Receivable Turnover Ratio? A good accounts receivable turnover ratio is 7.8. This means that, on average, a company will collect its accounts receivable 7.8 times per year. A higher number is better, since it means the company is collecting its receivables more quickly.

What are the GAAP rules for accounts receivable? ›

According to US GAAP, the company's accounts receivable balance must be stated at “net realizable value”. In basic terms, this just means that the accounts receivable balance presented in the company's financial statements must be equal to the amount of cash they expect to collect from customers.

How do you know if accounts receivable is debit or credit? ›

Accounts receivable is money owed to a company by customers for goods or services delivered but not yet paid for. It's recorded as a debit entry in accounting as it increases assets. When a sale is made on credit, accounts receivable is debited and sales revenue is credited.

What are the financial ratios for analyzing accounts receivable? ›

The two most common ratios for accounts receivable are turnover and number of days in receivables. These ratios are calculated as follows: Accounts Receivable Turnover = Credit Sales / Average Receivable Balance.

What is the best way to track accounts receivable? ›

Top 9 Accounts Receivable Performance Metrics to Track
  1. Days Sales Outstanding (DSO) ...
  2. Average Days Delinquent. ...
  3. Turnover Ratio. ...
  4. Collection Effectiveness Index (CEI) ...
  5. Number of Revised Invoices. ...
  6. Staff Productivity. ...
  7. Bad Debt to Sales Ratio. ...
  8. Percentage of Credit Available.
Jun 13, 2023

What are the tools in managing receivables? ›

  • Invoice Management and Billing. Invoice management and billing tools are at the core of the Accounts Receivable process. ...
  • Credit Risk Assessment. ...
  • Payment Processing and Reconciliation. ...
  • Accounts Receivable Automation. ...
  • Reporting and Analytics.

What is the best tool for financial analysis? ›

Top 10 Financial Analysis Software
  • Datarails.
  • Vena.
  • Mosaic Tech.
  • LiveFlow: Advanced Reporting & Consolidation for QuickBooks Online.
  • Cube Software.
  • Celonis.
  • G-Accon.
  • Jirav.

What is the tool for analyzing transactions accounting? ›

Accountants are equipped with a very special tool that they use when analyzing transactions - that tool is the accounting equation. The accounting equation states that assets = liabilities + owner's equity. An asset is something that a business owns. A liability is something that a business owes.

Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 6135

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.