The study on risk avoidance of transaction default based on the herding effect

There is a widespread phenomenon of trading goods ordered in advance in the commodity market, and consumers choose to imitate others for security reasons, to form a herd phenomenon of following the trend and following the crowd, this has become an important source of default by commodity booking party in transactions, causing a contingent loss to the producer of the goods. In this paper, the influence of the consumer herding effect is introduced into the characterization of default risk transmission, the herding conduction index is added to the intensity-based model of circular default, it makes the description of default risk more in line with the process of outbreak, aggregation and regression of actual risk. With the help of the credit default swap trading mechanism, the cost model of transaction default risk avoidance protocol is given. The simulation results of the model show that the herding effect has an important impact on the default probability of commodity booking party in transactions, it also makes the cost of default risk avoidance have a corresponding direction of change.


Introduction
There is a widespread phenomenon of trading goods ordered in advance in the commodity market, for example, the production of apparel products is composed of research and development, design, processing, production, and so on, has a long production cycle, therefore, there is a common phenomenon of pre-ordered goods in the garment trade. Meanwhile, there is also a short fashion cycle in transactions (such as clothing trade), factors such as a high degree of uncertainty in the demand of consumer groups, this has become the source of the default in the transaction (the agreed products cannot be purchased from the producers of the goods as arranged in advance), a contingent loss resulting in a default to the producer of the transaction. The default by the buyer of the transaction, such as the seller of clothing, further depends on the consumer's consumer behaviour. For example, in the study of the consumer behaviour of clothing consumers, Richard et al. (2011) put forward the two-factor decision theory that personal factors (personality, motivation, knowledge) and environmental factors (culture, class, family, opinion leaders) determine consumers' purchase of clothing. Mazaheri et al. (2012) put forward the three-factor decision theory that that psychological factors (motivation, personality, perception), environmental factors (group, family, class) and promotional CONTACT Liang Wu nidewuliang@163.com factors determine consumers' purchase of clothing. Similar studies also included Darley et al. (2010), Decker and Trusov (2010), Tsao (2017), Taleizadeh et al. (2016). The complexity of the decisive factors of consumer behaviour psychology will further lead to the trading phenomenon of herding effect in commodity purchase. Herding effect is a kind of effect of following the trend and following the crowd, and it is a common phenomenon in social and economic life, it means that everyone does the same thing as everyone else, even if their private information suggests that a completely different approach should be taken. Banerjee (1992) gave a clear definition of herding behaviour, each participating individual chooses to follow and echo the decisions made by others, regardless of the decision-making information that the individual possesses, although sometimes this part of the information refers to decision-making behaviour that is completely different from that of others. After Daniel Kahneman won the Nobel Prize in Economics in 2002, behavioural economics has become a new hot branch in the research of market economy behaviour. In the exploration of herding effect in economy and society, Bonabeau (2004) points out that imitation is an inherent feature of human beings, the reason for the decision to imitate is that the individual wants to be accepted by the group and safety considerations, when consumers think that other consumers have more information about goods than themselves, they will choose to mimic the decision-making behaviour of others for the sake of security. The emergence of the consumer herding effect (such as abandoning the purchase of a certain item of clothing ordered in advance) eventually led to the default loss of the trading producer. The risk of default refers to the transaction risk that the trading object is unable or unwilling to repay the principal and interest on time and causes economic losses to the trading party, it is an old and continuing concept, has been a major problem for trade traders. At present, the mainstream way to avoid default risk is to disperse, transfer and hedge the default risk through credit derivatives. In 1992, the International Swaps and Derivatives Association (ISDA) formally put forward an innovative tool that can be used to disperse, transfer and hedge credit risk, that is, Credit Derivatives, which can be used to disperse, transfer and hedge credit risk. They are the sum of a series of financial engineering technologies that divest, transfer, and hedge credit risks from underlying assets, its biggest characteristic is that it can separate the credit risk from other transaction risks and provide a way to transfer it. In the design structure of credit derivatives, the buyer of credit protection pays a certain amount of premium (called premium or credit spreads) to the seller who is willing to take risk protection during the contract period, and the determination of the cost depends on the calculation of the default probability of the reference assets. The hot method to determine the probability of default in the literature is the reduced-form model method, the reduced-form model was first proposed by Fons (1994), he regards the default probability as an exogenous variable, the occurrence of a default is defined as a sudden jump process, that is, from the non-default state suddenly jumped to the default state. Then, Jarrow and Turnbull (1995) define the default time as the first jump time of the time homogeneous Poisson process, the intensity parameter is a constant value. Jarrow et al. (1997) extended the constant default intensity model, they define the default time as the first jump time of the non-homogeneous Poisson process, the intensity parameter is a function of time. Lando (1998) further proposed a more general default intensity model, Cox default process. Cox default process is a generalization of non-time homogeneous Poisson process, with a stochastic default intensity process, and Scholars also call it a doubly random Poisson process. However, Hull and White (2001) pointed out that the default correlation constructed by the Cox default process is lower than the reality. Therefore, Jarrow and Yu (2001) further proposed the intensity-based model of circular default, assuming that there is a close economic relationship between company A and B, when one company defaults, another company will be affected, there will be a big jump in the intensity of its default. The literature on circular default can also be found in Wu et al. (2016Wu et al. ( , 2018, Liang et al. (2014), Zhang et al. (2018) and so on.
In the process of default risk contagion, the structured characteristic information that enterprises can provide is very limited, but this kind of information can often cause market participants to follow the trend, herd behaviour and determine the intensity of default. The deep neural network can automatically learn the key features from the unstructured flow information. Through multi-layer linear and nonlinear transformation, it can find new feature combinations that rarely or never appear in historical data, which has a strong generalization ability. Thus, it can learn quickly to get new and effective feature representation, and improve the performance of default risk prediction and pricing model. Some scholars try to use the deep neural network model to study the probability of default and the pricing of derivatives. Machová and Vochozka (2019) used an artificial neural network to analyse the commercial companies in the Czech Republic, so as to estimate the development of this branch of national economy, and predict the number of companies with good credit or default in the coming period of time. Vochozka, Vrbka, et al. (2020) create a method of identifying corporate bankruptcy using an artificial neural network with at least one layer of long-term and shortterm memory (LSTM), which can predict the future development of companies operating in the manufacturing industry in the Czech Republic. Vochozka, Horak, et al. (2020) used neural network to innovate the forecasting management when forecasting the stock price over time. Vrbka et al. (2019) evaluate the evolution of the trade balance between the European Union and the people's Republic of China through regression analysis and the accuracy of time series alignment with artificial neural networks. Inspired by the width and deep learning model in the recommendation system, Ning Ting et al. (2021) used traditional machine learning to capture the features of structured data, and used depth learning to capture the features of unstructured data, and then combined the two parts of learning features, after linear transformation, the overdue probability of predicted customers can be obtained. Ou et al. (2020) combined wavelet analysis with long-term and short-term memory (LSTM) neural network, which included time series dependent features, to build a financial time series data prediction model, which can overcome the defects that the existing models can not reflect the non-stationary, non-linear, sequence correlation and other complex features of financial time series data, as well as the non-linear interaction between data. With the development of research, the combination of deep learning theory and classical pricing model can effectively overcome the shortcomings of classical pricing model and deep neural network model, such as weak nonlinear fitting ability and poor explanatory ability.
Combining the study of herding effect with the study of default risk avoidance has become a new cross-cutting research hotspot. Hambly and Sojmark (2019) proposed a method to simulate related default risk exposure and herding behaviour, that is, a mean regression form of a common noise source and drift is considered, they introduced an endogenic infection mechanism, the default of one of these institutions has led to a reduction in the distance from default to other institutions, this contagion mechanism may lead to systemic serious default clustering (that is, the emergence of herding effect). Orrell (2019) pointed out that in the case of strategic default, it seems that guilt and fear reduce the personal experience of the trader, when you see someone else default, this in itself is a herd behaviour. These entangled cognitive processes at the personal level will expand to the extent that they affect the economy as a whole. The study on the combination of herding effect and default risk can also be found in the literature Ma et al. (2018), Stellinga (2019), Albu et al. (2019).
The influence of the herding effect on default risk has been studied from different perspectives, but so far, there are no scholars involved in the research on transaction default risk avoidance based on the herding effect. This article will focus on the default behaviour of transaction subscribers caused by the consumer herding effect, by introducing the herding effect into the reduced-form model of circular default, it makes the description of default risk more in line with the process of outbreak, aggregation and regression of actual risk. Then, with the help of credit default swap trading mechanism, the cost model of avoiding default risk is given. Specifically, it studies the avoidance of transaction default risk. First of all, in the characterization of the herding effect, introducing default risk sensitivity transmission indexes p 12 and p 21 . Secondly, the default risk sensitivity transmission index is added to the reduced-form model of circular default, and the joint default probability and marginal default probability of the transaction subscriber are calculated. Then, with the help of the trading mechanism of credit derivatives, pricing the avoidance agreement of transaction default risk. Finally, the feasibility and reliability of the model are verified by experimental financial technology.
The innovation of this paper lies in the analysis of default contagion from the perspective of herding effect and a new theoretical discussion on default risk management. The main contributions are as follows, (1) the sensitivity conduction index of herding effect is introduced to reveal the influence mechanism of herding effect on breach of default contagion, (2) the joint default probability including herding effect is calculated, (3) a new cost model of transaction default risk aversion is constructed. The rest of this paper includes, (1) Problem description and research hypothesis, (2) Construction of circular default intensity model (on the scale of herding effect), (3) Pricing of default risk aversion agreement, (4) Simulation calculation of the model, (5) Summary of the whole paper.

Problem description and research hypothesis
The objects to be considered in this paper include the producers of the trade in goods, transaction bookers and consumer groups. The main market behaviour is that the transaction Booker pre-orders the goods in advance, however, in view of the short fashion cycle of goods and the high uncertainty of consumer demand and other factors, the herding effect appears in the consumer group, in turn, the party booking the transaction is unable to purchase the agreed products from the producer of the goods in accordance with the prior arrangements, resulting in the loss of default by the producer of the transaction. That is, this paper considers the problem of avoiding the default loss caused by the herding effect of consumer behaviour.
In the process of spreading the risk of default, transaction bookers tend to take the behavioural trends of most traders in the market as a reference index, in the case of imperfect access to information (such as uncertainty of emergencies and incompleteness of public opinion information reporting, etc.). For analytical convenience, it is assumed that the traders involved in the spread of risk in the event of default by the sales subscriber are divided into two types. A trader who is in good condition (low default intensity) and a trader who is in poor condition (high default intensity), and there is no intermediate state.
Reference to the practice of Wang (2018), we assume that there are a total of M sales bookers participating in the advance booking of the goods in the market for a certain period of time, at any given time t, there are m 1 traders who are optimistic about their operations and finances, and m 2 traders who are poor in operations and finances, and they meet the conditions m 1 + m 2 = M. To reflect the health status of the overall economic vitality (corresponding to changes in default intensity), we construct variable indicator x, that is In the upper form m = m 1 − m 2 , so there is x ∈ [−1, 1]. Among them, when x is valued at 0 < x < 1, there are more traders in good condition in the market than in poor condition, it shows that most of the trading bookers are optimistic about the market, and the spread of default risk is weaker. When x is valued at −1 < x < 0, there are fewer traders in good condition in the market than in poor conditions, it shows that most of the trading bookers are pessimistic about the market, and the spread of default risk is becoming stronger. When x is valued at x = 0, the number of traders who represent good performance in the market is comparable to that of poor performance. And then, when x is valued at x = −1 or x = 1, it represents two extreme situations, and the operating conditions of the trading bookers in the market are all similar, that is, when x = −1, it shows that all the trading bookers in the market are not doing well (at a time of economic crisis), when x = 1, it shows that all the trading bookers in the market are doing well (at a time of strong economic recovery).
In the process of spreading the risk of default, similar to the herding effect of consumers, trading bookers may also have herding effect and herd psychology, when there are a large number of good traders in the market environment, other relatively small number of poor traders have a good chance of changing their business conditions (a good business environment leads to an improvement in their own business efficiency) and become insensitive to the spread of default risk, and vice versa. Let p 12 indicates the probability that the trader's sales will change from good to bad, and p 21 means the probability that the trader's sales will change from bad to good. If there are most well-run traders in the process of spreading the risk of default, we have p 12 < p 21 , and if there are most poorly managed traders in the process of spreading the risk of default, we have p 21 < p 12 . Therefore, the conversion probability has a functional relationship with the variable x, that is, p 12 = p 12 (x) = p 12 ( m M ),p 21 = p 21 (x) = p 21 ( m M ). Therefore, in the process of the spread of credit risk, the number of traders whose operating condition is from good to bad at any time t is m 1 p 12 , and the number of traders whose operating condition is from bad to good is m 2 p 21 . From the above analysis, it can be seen that the default risk conversion probabilities p 12 and p 21 introduced here can be used as the sensitivity scale of herding effect transmission.

Circular default intensity model (on the scale of herding effect)
This section will build a intensity-based reduced-form model based on specific default factors, that is, a circular default intensity model based on the herding effect is given. Meanwhile, the joint survival probability between sales bookers (as opposed to the default probability) and the marginal survival probability of a single subscriber are calculated.
Following the definition of Lando (1998), τ i := inf{t ≥ 0 : t 0 λ i s ds ≥ E i } is also defined as the time of default, where E i is a unit exponential random variable, as the same, is also defined as the information set of external market shocks and whether the traders default or not obtained at time t. Therefore, we have the following, that is the conditional survival probability of trader i. For the description of the impact of market herding effect on the intensity of initial default, we following the definition of Bai (2008) and Hambly and Sojmark (2019), thus we have the following default intensity models based on external market shocks and herding effects, Among them, a i 0 > 0 represents the trader i s initial default intensity, p 12 indicates the probability that the trader's sales will change from good to bad, and p 21 means the probability that the trader's sales will change from bad to good. There is a negative correlation between p 12 and p 21 , that is, when p 12 changes from small to large, p 21 changes from large to small, and vice versa.
With regard to the actual scene of herding effect transmission, we have the following analysis. In general, we only discuss the herding effect transmission scenario between two traders. Specifically, the intensity structure of circular default between traders 1 and 2 has the following scenario, λ 1 = a 1 0 + p 12 1 {τ 1 ≤t,τ 2 <t} λ 2 = a 2 0 + p 21 1 {τ 1 ≥t,τ 2 >t} ⇒ λ 1 = a 1 0 + p 12 1 {τ 2 <t} λ 2 = a 2 0 + p 21 1 {τ 1 ≥t} ⇒ λ 1 = a 1 0 + p 12 1 {τ 2 <t} λ 2 = a 2 0 + p 21 (1 − 1 {τ 1 <t} ) ⇒ λ 1 = a 1 0 + p 12 1 {τ 2 <t} λ 2 = a 2 0 + p 21 + p 12 1 {τ 1 <t} Among them, the corresponding herding effect is not obvious at time {τ 1 ≤ t, τ 2 > t}, and the probability of herding effect is obviously p 12 at time {τ 1 ≤ t, τ 2 < t}, the probability of herding effect is obviously p 21 at time {τ 1 ≥ t, τ 2 > t}, however, at the time {τ 1 ≥ t, τ 2 < t}, this model is not consistent with the actual trading situation. At the same time, at the moment , we will mainly focus on the trend of a large number of type 2 traders, where the conversion probability caused by the herding effect is p 12 . And at the moment {τ 1 ≥ t, τ 2 > t} ⇒ {τ 1 ≥ t}, we will mainly focus on the trend of a large number of type 1 traders, where the conversion probability caused by the herding effect is p 21 . In order to calculate the joint default time between traders 1 and 2, we following the method of Collin-Dufresne et al. (2004), that is, the new measure of two traders is set to P i (i = 1, 2). Thus, there is a relationship between new and old measures as follows, The transformation of measure can avoid the circular effect of the default intensity of traders 1 and 2, the details can refer to the literature Collin-Dufresne et al. (2004), Shreve (2004aShreve ( , 2004b. When the time is 0 ≤ t 2 ≤ t 1 ≤ T * , we have the following conclusion, When the time is 0 ≤ t 1 ≤ t 2 ≤ T * , we have the following conclusion,  (2) and lemma 3.1, lemma 3.2, we can draw the following conclusions when conditions 0 ≤ t 2 ≤ t 1 ≤ T * and (τ B > t 1 , τ C > t 2 ) ∈ F t 1 are satisfied and conditions p 12 = a 2 0 + p 21 are satisfied at the same time, When the time is p 12 = a 2 0 + p 21 , we have the following conclusion, We can draw the following conclusions when conditions 0 ≤ t 1 ≤ t 2 ≤ T * and (τ 1 > t 1 , τ 2 > t 2 ) ∈ F t 2 are satisfied and conditions p 12 = a 1 0 are satisfied at the same time, When the time is p 12 = a 1 0 , we have the following conclusion, So far, the proof is complete.

Pricing of default risk avoidance agreement
Based on the calculation of default probability mentioned above, this paper will discuss the risk avoidance problem of loss suffered by the producer of goods due to the default of the contract party, using the trading mechanism of CDS for reference. Specifically, there is the following transaction flow chart (Figure 1). In the above default risk avoidance agreement, we assume that the producer of the goods is the credit protection buyer, and the credit protection buyer does not default, and the transaction pre-ordered party 1 and 2 is the reference entity party. Without losing its generality, it is assumed that the nominal principal of the reference entity is US $1, the recovery rate of default is 0, and the premium of the agreement is paid in a continuous period of time. When the reference entity defaults, the credit protection seller pays at the end of the agreement. According to the principle of non-arbitrage pricing, the difference between the discounted value of the premium paid by the credit protection buyer to the credit protection seller and the discounted value of compensation paid by the credit protection seller to the protection buyer should be zero at the initial moment. As a result, the price of the risk avoidance agreement (or the cost of risk avoidance) can be calculated.
In order to price the risk avoidance agreement, we need to draw the following conclusions and lemmas. Assuming that the market short-term interest rate r(t) satisfies the CIR model, that is dr t = α(k − r t )dt + σ √ r t dW t .
From this, the price of a default-free zero-coupon bond with a face value of $1 and a maturity date of T < T · is Lemma 4.1: (Hao, 2011): Under the CIR model, the price of default-free zero-coupon bonds is

C(t,T)−A(t,T)
Among them, Lemma 4.2: (Bai, 2008): The price of a defaultable zerocoupon bond at time t is the discount for payment on the maturity date T at that time, that is, Among them,Q is an equivalent martingale measure,β i is the default recovery rate of bonds issued by Company i . Therefore, the cash flow of the buyer and seller of the risk avoidance agreement can be calculated as follows.
The expected discount value of future cash flow paid by the buyer to the seller in the risk avoidance agreement is, The expectation of the discounted value of the future cash flow compensated by the seller to the buyer in the risk avoidance agreement is, Theorem 4.1: According to the principle of non-arbitrage pricing, the cost of risk avoidance agreement with herding effect analysis is as follows, Among them, Proof: From the arbitrage-free pricing principle and Lemma 4.1, we can see that when the conditions are satisfied,

PV(fixed leg) = PV(default leg)
We can derive the following results, Then the formula can be proved.
At the same time, we have the following conclusions, The proof of this theorem is complete. Note: The value of V 1 (0, T) in the theorem is equal to the price of transaction subscriber 1 at the time 0, and V 2 (0, T) has a similar explanation.

Model simulation analysis
This section focuses on the influence of herding effect conduction on survival probability (or default probability), that is, through the simulation calculation of formula (4) and (6), to analyse the variation law of survival probability based on herding transmission.
In the process of simulation calculation, we set the time limit for t = 5 years, and the initial default intensity of transaction subscriber types 1 and 2 is a 1 0 = 0.1 and a 2 0 = 0.3, respectively. The simulation results of Figures 2 and 3 are obtained below. Figures 2 and 3 show that herding effect transmission probabilities significantly affect the survival probabilities of trading subscribers 1 and 2. Among them, Figure 2 shows the evolution of the herding conduction scale p 12 from large to small and p 21 from small to large, from this, the survival probability of transaction subscriber type 1 has a tortuous trajectory, which corresponds to a complete process of consumer conformity behaviour: outbreak, aggregation, and regression, which is consistent with the reality. Figure 3 shows that the survival probability of trading type 2 continues to increase with the transmission of a herding effect, this corresponds to the market trend of a better trading environment and a decrease in type 2 traders.
The simulation results show that after introducing the herding effect into the circular default model, the calculation of default probability can be better integrated with the actual trading scenario. With the law of the coordinated change of default probability and herding effect, the law of the change of the cost of credit risk avoidance can be further analysed, that is, the calculation results of this part can be applied to the formula (7), then the price trend of the risk avoidance agreement can be calculated. With the change of herding transmission probability, the premium also changes with the directional change. That is to say, when there are most well-managed traders, the cost of risk avoidance decreases with respect to relational p 12 < p 21 , and when there are most poorly managed traders, the cost of risk avoidance increases   with respect to relational p 21 < p 12 . This also provides a way for us to manage credit risk: when there are most under-performing traders in the market, credit derivatives can be used to prevent default contagion caused by the herding effect, that is, you can enter the credit protection buyer to transfer, spread and hedge the risk. When there are most well-run traders, you can enter the credit protection seller to get premiums, hedging or some risks.

Concluding remarks
In the classical risk avoidance research, the influence of herding effect contagion is usually ignored, and this kind of consumer individuals choose to imitate the decisionmaking behaviour of others for the sake of safety, which leads to the phenomenon of following the trend and following the crowd in the market. As a result, the risk of default has spread and aggregated. This has become the source of default of transaction subscribers in the transaction, and brings contingent losses to the producers of the goods. In this paper, the herding effect transmission index is added to the circular default model, and the cost model of transaction default risk avoidance is given with the help of the trading mechanism of credit default swaps. The results show that herding effect transmission not only significantly affects the survival probability of transaction bookers, but also determines the changing direction of default risk avoidance cost. The introduction of the herding effect makes the research of default risk avoidance better fit with the actual risk spread process -outbreak, aggregation and regression, and provides a new theoretical and practical method for transaction risk avoidance. Of course, due to the unavailability of the actual market data, the main deficiency of this paper is the calibration and empirical analysis of the model parameters, which is also the direction of our further research in the future. At the same time, the application of artificial neural networks such as deep learning to default contagion is a hot topic, which will also become the main direction of our research in the future.