Tell you how to conduct business operations analysis with Python! So much profit?

 

Tell you how to conduct business operations analysis with Python

 

 

Import content:      

 Hello everyone, this is a turn financial daily. Python applications is now very widespread, with the pace accelerating accounting and financial intelligence, Python data analysis in financial analysis and investment decisions will have a place.

 Shaped like SPSS and SAS visual data such analysis, is not a module specialized financial direction, excel financial functions although there are, but not very flexible use, can not be used for system development. If you are a user of the R language, you can ignore this type of content, in this regard, R language and Python language features roughly the same.

 God small horse is currently preparing a series of content of financial operations, for everyone to do share. Today, ready to introduce the method of analysis of business operations capabilities.

 

 

Concepts:  

 Enterprises operating capacity (Analysis of Enterprises' Operating Capacity), mainly refers to the efficiency and effectiveness of business operations assets. Efficiency of enterprises operating assets mainly refers to the turnover rate of turnover or assets. The efficiency of enterprises operating assets generally refers to the ratio between the quantity of output of enterprises with assets footprint.

 Ability to analyze business operations is to be calculated by the analysis of operational efficiency and effectiveness indicators reflect corporate assets, evaluate the operational capacity of enterprises, for enterprises to improve the economic benefits specified in the direction.

 First, the operating capacity analysis can evaluate the efficiency of corporate assets operations.

 Second, the operating capacity analysis can be found in the existence of the business assets operating problems.

 Third, the operating capacity analysis is the basis and supplement analysis of profitability and solvency analysis. In this paper, using methods such as trend analysis and ratio analysis to assess the state of the business assets.

 

 Today, mainly to introduce current assets operating capacity analysis, the main indicators are as follows:

 1, liquidity flow acceleration effect analysis;

 2, inventory turnover analysis;

 3, analysis of accounts receivable turnover ratio.

 

Current asset description:

 1, concepts: mobile asset turnover ratio refers to the same period of time the average total net enterprise main business income of current assets, current asset turnover is an important indicator evaluation of enterprise asset utilization.

 2, by comparative analysis of the indicators can facilitate enterprises to strengthen internal management, make full use of current assets, such as the mobilization of temporarily idle funds for short-term monetary investments generate revenue and so on.

 3, calculated

 Mobile asset turnover (times) = Net main business income / average total current assets

 Current assets turnover = number of days the average balance of current assets * calculate the number of days / current assets turnover (sales revenue)

 Average = total current assets (current assets + current assets Beginning Ending) / 2, or an average total current assets refers to the average number of early total current assets of enterprises and the number of late, this value can be found in the balance sheet. Nothing to do with non-current assets.

 

Inventory turnover introduction:

 1, concepts: inventory turnover, also known as inventory turnover, is the ratio of operating costs (cost of goods sold) and average inventory balance of business for a certain period.

 2. Role: inventory turnover rate to reflect that liquidity and inventory amount of funds used inventory is reasonable, to promote enterprise production and management to ensure continuity at the same time, improve capital efficiency, and enhance the short-term solvency of enterprises. Inventory turnover is a supplement to the current asset turnover is a measure of corporate production, inventory management, sales recovered comprehensive index capabilities.

 3, calculated

 The cost basis of the number of inventory turnover = Operating costs / average balance of inventories

 Availability average balance = (beginning inventory + ending inventory) / 2

 Inventory turnover days = the number of calculation (365) days / Inventory turnover

 

Accounts receivable turnover ratio Introduction:

 1, concepts: accounts receivable turnover rate is the average number of times within a specified period of analysis of accounts receivable into cash.

 2, the role of: company's accounts receivable plays a decisive role in current assets. The company's accounts receivable if they can recover in time, the company will be able to significantly improve the efficiency of the use of funds. Accounts receivable turnover ratio is the ratio reflects the company's accounts receivable turnover rate. It shows a certain period the average number of accounts receivable into cash. Accounts receivable turnover rate represented by the time the number of days accounts receivable turnover, also known as accounts receivable average payback period or the average closing current period. It said the company's receivables from the right to the reimbursement, time becomes cash needs.

 3, calculated

 Accounts receivable turnover ratio = Net credit sales / average balance of accounts receivable

 Net credit sales = sales - sales return - cash sales revenue

 = Average accounts receivable balances (opening accounts receivable balance balance accounts receivable +) / 2

Zhou Number = 360 receivable / accounts receivable turnover

 

 

Implementation process:

 1, Code Description

# - * - coding: utf- 8 - * -
time-based code # python2 version # perform input with python2 SCODE, please quotes, such as '600600'
when the input year #, enter directly, such as 2017

2, TS AS tushare module incorporated Import 
 Import matplotlib.pyplot AS PLT 
 Import numpy AS NP

We were introduced financial module, visualization module and Computer Science module.

 

3, parameter definitions = SCODE '300 114' 
 timelist = [2010,2011,2012,2013,2014] 
 YEAR1 = 2010 
 YEAR2 = 2011 
 year3 = 2012 
 year4, 2013 = 
 year5, 2014 =

The definition of enterprise code '300114', life time of 5 consecutive years, 2010-2014 years. These parameters can be modified.

  

 4, the processing time

def get_operation_data(year1, year2, year3, year4, year5,scode):
    timelist = []
    timelist.append(year1)
    timelist.append(year2)
    timelist.append(year3)
    timelist.append(year4)
    timelist.append(year5)

The time parameter passed into the list.

 

 5, the array initialization

arturnover = []
arturndays = []
inventory_turnover = []
inventory_days = []
currentasset_turnover = []
currentasset_days = []

Array initialization turnover and turnover number of days, for storing data.

 

 6, access to financial data

for in timelist:
    operation_data = ts.get_operation_data(i, 4)
    operation_data.index = operation_data.code
    data = operation_data[operation_data.index == scode]
    arturnover.append(float(data.arturnover))
    arturndays.append(float(data.arturndays))
    inventory_turnover.append(float(data.inventory_turnover))
    inventory_days.append(float(data.inventory_days))
    currentasset_turnover.append(float(data.currentasset_turnover))
    currentasset_days.append(float(data.currentasset_days))

Crawling on the necessary financial data.

 

7, a line chart of accounts receivable turnover

plt.figure (figsize = (12 is,. 6))
IND np.arange = (. 5) # receivable turnover line graph plt.subplot (231)
plt.title ( 'Turnover, the AR (CI)' )
plt.plot (arturnover,  'R & lt' , label = 'Turnover, the AR' )
plt.xticks (IND, (YEAR1, YEAR2, year3, year4, year5))

Output:

  

    Accounts receivable turnover decreased year by year from 2011, cash flow diminished capacity.

 

 8, inventory turnover, line chart

Inventory Turnover # line graph plt.subplot (232)
plt.title ( 'the Inventory Turnover, (CI)' )
plt.plot (inventory_turnover,  'B' , label = 'the Inventory Turnover,' )
plt.xticks (IND, (YEAR1, year2, year3, year4, year5) )

Output:

Enterprise inventory turnover decreased year by year from 2010 to 2014, turnover decreased ability of the product.

 

9, current asset line graph

# Current asset line graph plt.subplot (233)
plt.title ( 'Turnover, the CA (CI)' )
plt.plot (currentasset_turnover,  'G' , label = 'Turnover, the CA' )
plt.xticks (IND, (YEAR1 , year2, year3, year4, year5 ))

Output:

    Corporate liquidity fluctuations in asset turnover increased from 2010 to 2014, current assets increased operational capabilities.

 

10, accounts receivable turnover days line chart

Receivable Turnover # days histogram plt.subplot (234)
plt.bar (IND, arturndays, Color = 'YellowGreen' )
plt.title ( 'Turnover, the AR Days' )
plt.xticks (IND, (YEAR1, YEAR2, year3, year4, year5)) for  A, B  in  ZIP (IND, arturndays):
    plt.text (A, B + 0.05,  '% .2f'  % B, HA = 'Center' , VA = 'bottom' , fontSize = 7)

Output:  

 

 

 

11, inventory turnover days line chart

Inventory turnover days histogram # plt.subplot (235)
plt.bar (IND, inventory_days, Color = 'Gold' )
plt.title ( 'the Inventory Turnover, Days' )
plt.xticks (IND, (YEAR1, YEAR2, year3, year4 , year5)) for  A, B  in  ZIP (IND, inventory_days):
    plt.text (A, B + 0.05,  '% .2f'  % B, HA = 'Center' , VA = 'bottom' , fontSize =. 7)

Output:

 

 

 

12, liquidity flow line chart days

Days # liquidity flow line graph 
 plt.subplot (236) 
 plt.bar (IND, currentasset_days, Color = '# FFA500') 
 plt.title ( 'Turnover, the CA Days') 
 plt.xticks (IND, (YEAR1, YEAR2, year3 , year4, year5)) 
 for A, B in ZIP (IND, currentasset_days): 
     plt.text (A, B + 0.05, '% .2f'% B, HA = 'Center', VA = 'bottom', fontSize = 7) 
 plt.show ()

Output:

 

13, the final result

 

 

 Members of small partners to share here today, this describes the situation of enterprise data assets crawling, analysis and presentation.

Hey source video tutorial Case additive group: 850,591,259

 

Guess you like

Origin www.cnblogs.com/Py1233/p/12659434.html