# Correlation Analysis between Exchange Rate Fluctuations and Oil Price Changes Based on Copula Function

Authors: Xiaodong Huang
Journal: Advances in Multimedia
 (2022)

---

## Abstract

In order to explore the relationship between exchange rate fluctuations and oil prices, this paper combines the copula function to study the correlation between exchange rate fluctuations and oil price changes, conducts a more comprehensive study of the copula function, and applies the algorithm to some practical classification problems. Moreover, this paper improves some defects in the algorithm and combines some new learning frameworks in machine learning to generalize the copula function to a variety of learning models. In addition, this paper studies how to use the coverage algorithm to construct classifiers under various problems and proposes corresponding improvement strategies according to the characteristics of various problems. Finally, this paper builds a correlation analysis algorithm model and uses simulation research to verify that there is a relatively obvious correlation between exchange rate fluctuations and oil price changes.


---

## Body

## 1. Introduction

The commodity attribute of oil means that oil has use value and value as an exchangeable commodity. According to the definition in political economy, the use value of a commodity refers to the attribute that can meet certain needs of people, and the use value is one of the common attributes that all commodities have. Conversely, an item that has no use value does not become a commodity. The value of a commodity is the undifferentiated human labor (including physical labor and mental labor) condensed in the commodity. On the one hand, as an important energy material and chemical raw material, oil is widely used in industry, transportation, and national defense. Therefore, petroleum plays an extremely important role in people’s daily life and has great use value [1]. On the other hand, from finding oil to using oil, it generally goes through four links: exploration, exploitation, transportation, and processing. Moreover, the successful completion of each link condenses the mental and physical labor of oil exploration personnel, mining workers, transportation workers, and production workers. Therefore, the value attribute of oil is obvious. According to the law of commodity value, the price of oil fluctuates around the value of oil according to the market supply and demand conditions, and the value of oil is determined by the cost of producing oil, including exploration, extraction, transportation, and processing costs [2].In a narrow sense, oil is a financial derivative product, and it is one of the basic variables of financial derivative product market transactions. In a broad sense, it refers to the interaction and mutual influence between the fluctuation of the oil spot market and the fluctuation of the financial derivative product market, and this relationship is more and more inclined to the one-way impact of financial derivative market fluctuations on spot market fluctuations [3]. The financial properties of oil are determined by the characteristics of oil supply and demand and the uneven distribution of oil. The supply and demand characteristics of oil are the fundamental reasons for the financial properties of oil. The characteristics of oil supply and demand and the uneven distribution of oil resources make the market use financial means to control price risks, while also causing a large influx of speculative funds into the oil market to hype oil prices, so that oil prices are affected not only by supply and demand but also by the financial market. The influence of conventional financial price indices such as speculative funds, exchange rate indices, stock price indices, and gold price indices [4].Considering that the futures price has a price discovery effect on the spot price, the sharp and sudden fluctuation of the oil futures price will also cause transmission to the spot market. With the effect of the convergence theory, the future price and the spot price will tend to be consistent [5]. Therefore, the continuous jumping behavior in the future market may affect the spot market. Based on this, it is very necessary to discuss the jumping phenomenon of international oil future prices in depth, which can better make suggestions for investors in related fields, stabilize the spot market, and take timely measures to deal with risks. As the most important adjustment lever of international trade [6], the exchange rate plays a direct adjustment role in a country’s trade, and its fluctuations will directly affect the entire import and export trade, thereby affecting the country’s economic stability. Economic operation plays an extremely important role. According to the existing literature, many scholars have also proposed that the spot price of oil is the most significant factor affecting the exchange rate and has a great influence on the exchange rate, and its explanatory power is also significantly better than other factors. Therefore, based on the fluctuation of the oil price itself, the effect of oil on the exchange rate can be further investigated, so as to better analyze the exchange rate trend and stabilize the economic operation [7]. Observing the fluctuations of oil prices in the past two years, it can be found that when oil prices fluctuated, many unexpected events occurred in the world, such as the Iranian nuclear issue and OPEC’s refusal to reduce production, which all led to excess oil supply and short-term changes in the relationship between oil supply and demand. It caused frequent jumps in oil prices. Correspondingly, the exchange rates of different countries have also changed significantly, which also shows that it is necessary to study the fluctuations of oil prices and their jumping phenomena [8].Literature [9] explained how the exchange rate affects oil prices from a theoretical level and carried out an empirical analysis. Literature [10] believes that there is a cointegration relationship between the US dollar exchange rate and the international oil price. Changes in international oil prices will lead to fluctuations in the US dollar exchange rate, but changes in the US dollar exchange rate will not lead to fluctuations in international oil prices. Literature [11] believes that there is a cointegration relationship between international oil prices and real exchange rates, and the prediction of international oil prices to exchange rate changes has a high significance in the long run. Literature [12] conducted an empirical study by adding the international oil price as a variable to the exchange rate determination model and found that the international oil price can significantly explain and predict the changes in the US dollar exchange rate. Literature [13] studied the relationship between the international oil price and the US dollar exchange rate before and after the financial crisis through linear and nonlinear causal analysis and found that there was a single linear causal relationship between the international oil price and the US dollar exchange rate before the financial crisis. There is a bidirectional nonlinear causal relationship between the US dollar exchange rate, and volatility spillovers and institutional changes are important factors for the nonlinear causality. Literature [14] judged from both theoretical and empirical levels that the impact of rising oil prices on real income and price levels is ambiguous, because countries that are substantially affected by actual oil prices in a statistical sense are also countries that are conducting price controls, which leads to the existence of price control bias in the actual GNP data which can be used as a reasonable explanation instead of the oil price shock. Literature [15] established a quarterly multivariate VAR model to study the existence and direction of the causal relationship between oil prices, oil consumption, and actual output and several other key macroeconomic policy variables and concluded that oil price shocks are not caused by the main reason for the US business cycle, in addition to oil prices, and real output will significantly change oil consumption and vice versa.International oil prices can cause changes in the exchange rate level by causing changes in a country’s inflation. Oil is a basic industrial energy source. The rise or fall of international oil prices will cause changes in the cost of industrial production enterprises. When the international oil price rises, it first causes changes in the costs of enterprises and industries closely related to oil, and this change further spreads to changes in the operating costs of the entire industrial chain and even the entire economy. The increase in costs leads to cost-driven inflation [16].This paper combines the copula function to study the correlation between exchange rate fluctuations and oil price changes and establishes a model through intelligent analysis methods to improve the correlation analysis effect between exchange rate fluctuations and oil price changes.


## 2. Copula Function Based on Correlation Analysis

### 2.1. Basic Copula Functions

We assume thatS=x1,y1,x2,y2,⋯,xp,yp=X1,X2,⋯,Xkis a set of learning samples in a givenn-dimensional space X, where xi=x1i,x2i,⋯,xni∈X, p is the number of learning samples, Y=y1,y2,⋯,yk is a set of finite class labels, and each yi∈Y in the sample set; k is the number of categories. It is required to construct a three-layer neural network. After learning S, it can output the sample of unknown category xj∈X and output its category yj∈Y, and the recognition rate of the network is as high as possible.The basic idea of the domain copula function is to construct the coverage of each category in turn, and there is no intersection between the coverages until all samples are included in a certain coverage. In the process of constructing coverage, the main operations are as follows:(1)
The field is constructed: the method of constructing a spherical field is to select any samplea1 that has not been covered in the current processing category Xi and use it as the center to solve the radius r to obtain a coverage. We set <> to represent the inner product operation; then, the solution strategy for the radius r is as follows:(1)d1=max<x,a1>,x∉Xi,(2)d2=max<x,a1>∣<x,a1>>d1,x∈Xi,(3)θ=d1+d22,(4)a=d1−d22That is,d1 represents the distance between the current center a1 and the nearest heterogeneous point, and d2 represents the distance between the current center and the farthest similar point on the premise that the distance is less than d1. Taking r=θ=d1+d2/2 as the radius to construct the coverage, the classification gap is a, as shown in Figure 1, where triangles and squares represent two types of samples.
(2)
The center of gravity is obtained: after obtaining an initial coverage, the center of gravityC of all samples in the coverage is obtained, and C is projected onto the hypersphere. Taking the projected point as the new coverage center, the field is reconstructed according to the processing in operation (1) until the newly obtained coverage cannot cover more sample points(3)
Translation: since in then-dimensional space, n+1 linearly unrelated points determine a hypersphere, the translation operation is used to cover as many similar samples as possible, and the translation algorithm can be referred to in the literatureFigure 1
Definition of coverage radiusr.At this point, the domain copula function can be obtained:Algorithm 1.
The learning process is as follows: fork categories, it is necessary to construct the coverage of each category in turn, until all samples are included in a certain coverage. The overriding construction process of the ith class is as follows:
Step 1.1. The algorithm takes any point in theith category that has not been covered and denote it as a1.
Step 1.2. The algorithm takesa1 as the center, finds the threshold θ1, and obtains a coverage Ca1 with the center of θ1 and the radius of θ1.
Step1.3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then finds the new threshold θ1′ according to Step 1.2 and obtains the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and the loop is executed until Ca1′ cannot cover more points.
Step 1.4. The algorithm finds the translation pointa1′′ of a1 and finds the corresponding coverage Ca1′′. If Ca1′′ covers more points than Ca1, then a1′′⟶a1, θ1′′⟶θ1, and the algorithm goes to Step 1.3. Otherwise, the construction of covering Ci is completed, and the flag of the sample point in Ci is set as covered, and the algorithm goes to Step 1.1.
The testing process is as follows:
Step 2.1. For each samplex, the algorithm finds the distance dx,Ci≤ωi,x>−θi to all coverages, where ωi and θi are the center and radius of Ci, respectively.
Step 2.2. The algorithm takes the categoryj corresponding to maxdx,Ci as the final category of the sample.
The idea of the above test process is to first find the distance from the test samplex to each coverage, so as to judge whether the sample falls into a certain coverage. If it falls into the coverage Ci, the class j to which Ci belongs is taken as the sample class. Otherwise, according to the principle of proximity, the category corresponding to the closest coverage is selected as the classification result.The schematic diagram after completing the field coverage is shownin Figure2.Figure 2
Classification results of the domain copula function.The main difference between crosscoverage and domain coverage is that the former constructs the coverage of each category alternately; that is, after constructing a coverage of categoryj this time, the coverage of the j+1th category will be constructed next time. Moreover, after the completion of each coverage construction, the points contained in the coverage are deleted from the sample set, so the algorithm adds deletion operations on the basis of field coverage. According to this idea, the crosscopula function can be obtained:Algorithm 2.
The learning process is as follows: for thek categories, the coverage of each category is constructed in turn until all samples have completed the learning. The overriding construction process of the ith class is as follows:
Step 1. The algorithm takes any point that has not been covered in theith category and denotes it as a1.
Step 2. The algorithm takesa1 as the center, finds the threshold θ1, and obtains a coverage Ca1 with the center of a1 and the radius of θ1.
Step 3. The algorithm finds the center of gravitya1′of the coverageCa1and then presses Step 1.2 to find the new thresholdθ1′ and obtain the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points.
Step 4. The algorithm finds the translation pointa1′′ of a1 and finds the corresponding coverage Ca1′′. If Ca1′′ covers more points than Ca1, then a1′′⟶a1, θ1′′⟶θ1, and the algorithm goes to Step 1.3. Otherwise, a coverage Ci is obtained, and all sample points contained in Ci are deleted.
Step 5. Ifi=i+1modk, the algorithm goes to Step 1.The algorithm judges whether the test sample belongs to the area according to the sequence of coverage structure and takes the category of the smallest area containing the test sample as the category of the sample.The schematic diagram after the crosscoverage is completed is shown in Figure3.Figure 3
Classification results of the crosscopula function.


### 2.2. Fuzzy Kernel Covering Classifier

The commonly used kernel functions mainly include the following types:(1)
The Gaussian radial basis function isKx,y=exp−x−y2/q, q=2σ2(2)
The polynomial function isKx,y=x·y+1d, d=1,2,⋯(3)
The sigmoid function isKx,y=tanh−bx⋅y−cWe assume that the domain of discourse isX; then, any point on X is mapped to the unit hypersphere in the feature space by the radial basis kernel function, which is exactly the process of projecting the sample onto the hypersphere in the copula function. Therefore, it is possible to construct the coverage directly in the feature space without transforming the samples. At this point, the kernel copula function is obtained, and the distance originally represented by the inner product becomes Kx,y=exp−x−y2/q, where q=2σ2.In the kernel copula function, some functions of the original copula function need to be changed as follows:(1)
The calculation of the threshold (radius)θ usually adopts the following formula:(5)θ=maxx∉Xkai∈XkKai,x=maxx∉Xkai∈Xkexp−x−ai2qIts purpose is to increase the radius of the spherical field, reduce the classification boundary, and reduce the rejection rate.(2)
The function is(6)y=σKω,x−θ,(7)σx=x,ifx≥0,0,otherwise(3)
The distance function from the samplex to the domain Ci is(8)dx,Ci=0,ifx∈Ci,θ−Kωi,x,ifx∉CiIn the basic copula function, the radius of each coverage is determined using formulas (1)–(4). d1 represents the distance between the current field center and the nearest heterogeneous point (due to the inner product operation. Therefore, d1 takes the maximum value when the distance is closest, and vice versa). d2 represents the distance between the center of the field and the farthest similar point on the premise that it is greater than d1. Take θ=d1+d2/2 as the radius, and all areas outside the coverage are the rejection areas. The purpose of this processing is to reflect the equality of various categories on the one hand and to expand the coverage area as much as possible, so that more test samples fall into the existing coverage and reduce the rejection rate. In the kernel copula function, due to the ambiguity of the algorithm itself, formula (5) is used to determine the radius, and its essence is to set θ=d1.According to the above analysis, in the improved algorithm, the algorithm first modifies the radius calculation principle toθ1=d1 according to formula (10), where d2 is as formula (10). Algorithms make each overlay describe only what has been learned, which is commonly referred to as “knowing what you know, not knowing what you don’t know.” Such modification will inevitably lead to the reduction of the coverage area, the increase of the rejection area, and the increase of rejection points. At this time, the recognition rate of the classifier is improved by improving the processing method of the rejected samples.
(9)d1=maxΚx,a1,x∉Xi,(10)d2=minΚx,a1Κx,a1>δ1,x∈Xi.In the process of judging rejected samples, the membership function of samplex to the ith covering Ci is introduced.
(11)μi=1+Κx,ωi−θi∗Κx,ωiθi.Among them,Κx,ωi is the distance from the rejected sample to the center ωi of Ci, θi is the radius of Ci, and Κx,ωi−θi is the distance from the rejected sample to the edge of Ci, which is a negative value. The function comprehensively considers factors such as the distance between the sample and the coverage edge, the distance between the sample and the coverage center, and the coverage radius. When the sample happens to fall on the edge of the coverage, the value of μi is 1; that is, it belongs to the coverage. As the samples move away, μi decreases monotonically and gradually tends to 0. At this time, the fuzzy kernel copula function FKCA (Fuzzy Kernel Covering Algorithm) is obtained. The algorithm is divided into two parts: learning and testing, which are described as follows:Algorithm 3.
The learning algorithm is as follows.
We assume that the learning sampleX has a total of k classes; that is, X=X1,X2,⋯,Xk, and the algorithm uses the Gaussian radial basis function Kx,y=exp−x−y2/q, where q=2σ2. For k categories, the algorithm constructs the coverage of each category in turn, until all samples are included in a certain coverage. The overriding construction process of the ith class is as follows:
Step 1. The algorithm takes any point that has not been covered in theith category and denotes it as a1.
Step 2. The algorithm takesa1 as the center and calculates the threshold d2 according to d2 in formula (10) and obtains a coverage Ca1 with a1 as the center and θ1 as the radius.
Step 3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then presses Step 1.2 to find the new threshold θ1′ and obtain the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points, and then, a coverage Ci is obtained.The membership function designed in formula (11) comprehensively considers a variety of location factors covered to determine the membership. When the distance between a rejected sample and the coverage edge of two different categories is equal, the following conclusion can be obtained according to this function; the membership degree of the sample to the coverage with a smaller radius is greater than that of the coverage with a larger radius. In this regard, we give an intuitive explanation as shown in Figure 4. For the sake of simplicity, we take the two-category case under the two-dimensional plane as an example for analysis.Figure 4
Analysis of membership function.We assume that two coverages Cover 1 and Cover 2 have been obtained in Figure4, which cover samples of different classes, respectively. The solid line represents its range, and the radius r1 of Cover 1 is greater than the radius r2 of Cover 2, and the distance between the rejection point T and the two coverage edges is equal. According to the way of determining the radius, it is advisable to set the point A∈C1 and B∈C2 at the position shown in the figure. It does the radii R1 and R2 to get the range shown by the dotted line. For Cover 1, when the radius reaches r1, it stops due to encountering a heterogeneous B in the process of continuing expansion. It can be considered that the point located on the edge R2 does not belong to Cover 1 at all. Therefore, the connection C1B can be made, and the membership of the points on the connection to Cover 1 gradually decreases, and 0 is taken at point B. In the same way, there is a connection C2A to Cover 2, and the properties are the same. It is easy to know that the degree of membership of point T to Cover 1 is smaller than that to Cover 2, so T is determined as the category to which Cover 2 belongs.


### 2.3. Multiple Example Copula Functions

A threshold is set, and when the sum of the cost of expansion is higher than the threshold, the current coverage stops expanding, as shown in Figure5.Figure 5
Schematic diagram of MICA-SNP.The distribution of each bag example in Figure5 is consistent with the figure, with white for positive packets and black for negative packets. For example, in construction coverage in the negative bag, when the coverage C1.1 is obtained, it continues to expand to obtain C1.2 and C1.3, and the cost increases continuously. When expanding to C1.4, the newly added positive bag example makes the cost exceed the threshold, so C1.4 cancels and falls back to C1.3. C2.3 and C3.2 are obtained in the same way, while the negative packet covers C4, C5, and C6. It cannot be expanded because of its small capacity. When the coverage of the negative examples is completed, the coverage of the remaining positive examples is constructed, and the general construction method is adopted at this time, but the positive examples are not deleted during the construction process. For example, when obtaining C8 and continuing to construct C9, although some positive examples have been covered by C3, it is still used for the construction of C. The target concept area after construction is completed is shown in the shaded area.In summary, the multi-instance copula function MICA-BSNP (Multi-instance Covering Algorithm Based on Strong Noise Processing) is obtained as follows.Algorithm 4.
The learning algorithm is as follows: the algorithm gives K learning samplesB1,y1,B2,y2,⋯,BK,yK, yK∈0,1, yK=0 means negative packet, yK=1 means positive packet, and the number of examples contained in packet Bi is Ni. A new sample set b11,y1,⋯,b1N1,y1,⋯,bK1,yK,⋯,bKNK,yK is obtained by assigning the label of the bag to each example in the bag. We record the set of negative examples as X0 and the set of positive examples as X1.
Step 1. The algorithm takes any example that has not been learned and denotes it asa1.
Step 2. The algorithm takesa1 as the center and calculates the threshold θ1 according to d2 in formula (10) and obtains a coverage Ca1 with a1 as the center and θ1 as the radius.
Step 3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then presses Step 1.2 to find the new threshold θ1′ and obtains the new coverage Ca1′.
IfCa1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points; then, a quasicoverage Ca1 is obtained.
Step 4. When the number of examples inCa1 is less than epsN, the algorithm determines Ca1 and obtains a coverage Ci, the algorithm marks the examples contained in it as learned, and the algorithm goes to Step 1. Otherwise, the algorithm goes to Step 1.5.
Step 5. The algorithm takesa1 as the center; finds θ1′′, θ1′′=maxKa1,x<θ1x∈X1; and calculates the total cost of the current cost of coverage expansion. When the total cost is less than the threshold, the algorithm marks the positive examples included in the expansion as negative, θ1′′⟶θ1, and a new Ca1 is obtained, and the algorithm goes to Step 1.3. Otherwise, the algorithm cancels this expansion and obtains a coverage Ci with a1 as the center and θ1 as the radius.The algorithm is given two finite setsA and B with A=a1,a2,⋯,am and B=B1,B2,⋯,Bn. Then, the Hausdorff distance between A and B can be defined by formula (12):
(12)HA,B=maxhA,B,hB,A,(13)hA,B=maxa∈Aminb∈Ba−b,(14)hB,A=maxb∈Bmina∈Ab−a.In formulas (12)–(14), · is a certain distance norm, and the Euclidean distance is used in this paper. Hausdorff distance describes the degree of difference between two sets A and B; the larger the distance, the more obvious the difference. Thus, the multi-instance copula function MICA-BBC (Multi-Instance Covering Algorithm Based on Bag Covering) is obtained.Algorithm 5.
The learning algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1, and the set of positive and negative packets is denoted as Xi, where i=0 means negative packet and i=1 means positive packet. The algorithm constructs the spherical cover of positive and negative packages in turn, until all packages fall into a certain cover, and the construction process of the ith cover is as follows:
Step 1. The algorithm selects any package that has not yet been covered in theith category, denoted as a1.
Step 2. The algorithm takesa1 as the center to solve the threshold θ, and the solution method of θ is
(15)d1=minHx,a1,x∉Xi,(16)d2=maxHx,a1Hx,a1<d1,x∈Xi,(17)θ=d1+d22.
At this point, a sphere coveringCj is obtained, whose center is a1 and whose radius is θ.
The test algorithm is as follows:
Step 1. For the bagx to be classified, the algorithm calculates the distance from x to each one in turn:
(18)dx,Cj=θj−Hx,aj.
Step 2. If there isCj such that dx,Cj≥0, it means that x falls into the sphere cover Cj, and the label of the package to which Cj belongs is used as the label of the package x.
Step 3. If∀j, dx,Cj<0, the algorithm takes dx,Cj and takes the tag of the package to which Cj belongs as the tag of package x.In order to properly optimize the coverage results, increase the coverage radius, and reduce the number of coverages, we introduce the secondary scanning method introduced in Section3 and then obtain an improved multi-instance copula function based on package coverage.Algorithm 6.
The learning algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1, and the set of positive and negative packets is denoted as Xi, where i=0 means positive packet and i=1 means negative packet. The algorithm constructs the spherical cover of positive and negative packages in turn, until all packages fall into a certain cover, and the construction process of the ith cover is as follows:
Step 1. The algorithm selects any package that has not yet been covered in theith category, denoted as a1.
Step 2. The algorithm takesa1 as the center and uses formula (17) to solve the threshold θ and obtains a spherical coverage Ca1 with a1 as the center and θ as the radius and records the number of packets contained in the coverage. If there are uncovered packages in this class, the algorithm goes to Step 1.1; otherwise, the algorithm goes to Step 1.3.
Step 3. The algorithm sorts the coverages in a descending order according to the number of samples contained in each coverage and reconstructs coverages in turn according to the sorted centers. When the number of samples contained in the obtained coverage is not less than the number of samples contained in the coverage for the first time, the coverage is determined. Otherwise, the algorithm cancels this construction and reinserts the center into the table in order based on the number of samples contained in this time.Algorithm 7.
The algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1. The algorithm transforms the package and constructs an overlay.
Step 1. The algorithm arbitrarily selectsk packages from the set B of packages as the initial cluster center, denoted as C1 to Ck, and the cluster corresponding to the cluster center Cj is cluster j.
Step 2. The algorithm uses the Hausdorff distance to find the distanceHBi,Cj from Bi to each cluster center Cj for each packet Bi in B−C1,⋯,Ck, where j=1,..,k. The algorithm puts Bi into the cluster j formed by the nearest Cj and repeats until all packets are clustered into k categories.
Step 3. The algorithm solves the center bag for thek clusters obtained by clustering, and the new center of the jth cluster is
(19)Cj=argminA∈ClusterjHA,B.
Step 4. The algorithm finds the Hausdorff distance fromBi to Cj (j=,..,k) for each package Bi in B and uses it as a component of the feature vector. That is, xi=HBi,C1,HBi,C2,⋯,HBi,Ck; all xi form a new sample set X, and X=x1,y1,x2,y2,⋯,xK,yK.
Step 5. The algorithm uses the copula function onX to construct a classifier.


## 2.1. Basic Copula Functions

We assume thatS=x1,y1,x2,y2,⋯,xp,yp=X1,X2,⋯,Xkis a set of learning samples in a givenn-dimensional space X, where xi=x1i,x2i,⋯,xni∈X, p is the number of learning samples, Y=y1,y2,⋯,yk is a set of finite class labels, and each yi∈Y in the sample set; k is the number of categories. It is required to construct a three-layer neural network. After learning S, it can output the sample of unknown category xj∈X and output its category yj∈Y, and the recognition rate of the network is as high as possible.The basic idea of the domain copula function is to construct the coverage of each category in turn, and there is no intersection between the coverages until all samples are included in a certain coverage. In the process of constructing coverage, the main operations are as follows:(1)
The field is constructed: the method of constructing a spherical field is to select any samplea1 that has not been covered in the current processing category Xi and use it as the center to solve the radius r to obtain a coverage. We set <> to represent the inner product operation; then, the solution strategy for the radius r is as follows:(1)d1=max<x,a1>,x∉Xi,(2)d2=max<x,a1>∣<x,a1>>d1,x∈Xi,(3)θ=d1+d22,(4)a=d1−d22That is,d1 represents the distance between the current center a1 and the nearest heterogeneous point, and d2 represents the distance between the current center and the farthest similar point on the premise that the distance is less than d1. Taking r=θ=d1+d2/2 as the radius to construct the coverage, the classification gap is a, as shown in Figure 1, where triangles and squares represent two types of samples.
(2)
The center of gravity is obtained: after obtaining an initial coverage, the center of gravityC of all samples in the coverage is obtained, and C is projected onto the hypersphere. Taking the projected point as the new coverage center, the field is reconstructed according to the processing in operation (1) until the newly obtained coverage cannot cover more sample points(3)
Translation: since in then-dimensional space, n+1 linearly unrelated points determine a hypersphere, the translation operation is used to cover as many similar samples as possible, and the translation algorithm can be referred to in the literatureFigure 1
Definition of coverage radiusr.At this point, the domain copula function can be obtained:Algorithm 1.
The learning process is as follows: fork categories, it is necessary to construct the coverage of each category in turn, until all samples are included in a certain coverage. The overriding construction process of the ith class is as follows:
Step 1.1. The algorithm takes any point in theith category that has not been covered and denote it as a1.
Step 1.2. The algorithm takesa1 as the center, finds the threshold θ1, and obtains a coverage Ca1 with the center of θ1 and the radius of θ1.
Step1.3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then finds the new threshold θ1′ according to Step 1.2 and obtains the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and the loop is executed until Ca1′ cannot cover more points.
Step 1.4. The algorithm finds the translation pointa1′′ of a1 and finds the corresponding coverage Ca1′′. If Ca1′′ covers more points than Ca1, then a1′′⟶a1, θ1′′⟶θ1, and the algorithm goes to Step 1.3. Otherwise, the construction of covering Ci is completed, and the flag of the sample point in Ci is set as covered, and the algorithm goes to Step 1.1.
The testing process is as follows:
Step 2.1. For each samplex, the algorithm finds the distance dx,Ci≤ωi,x>−θi to all coverages, where ωi and θi are the center and radius of Ci, respectively.
Step 2.2. The algorithm takes the categoryj corresponding to maxdx,Ci as the final category of the sample.
The idea of the above test process is to first find the distance from the test samplex to each coverage, so as to judge whether the sample falls into a certain coverage. If it falls into the coverage Ci, the class j to which Ci belongs is taken as the sample class. Otherwise, according to the principle of proximity, the category corresponding to the closest coverage is selected as the classification result.The schematic diagram after completing the field coverage is shownin Figure2.Figure 2
Classification results of the domain copula function.The main difference between crosscoverage and domain coverage is that the former constructs the coverage of each category alternately; that is, after constructing a coverage of categoryj this time, the coverage of the j+1th category will be constructed next time. Moreover, after the completion of each coverage construction, the points contained in the coverage are deleted from the sample set, so the algorithm adds deletion operations on the basis of field coverage. According to this idea, the crosscopula function can be obtained:Algorithm 2.
The learning process is as follows: for thek categories, the coverage of each category is constructed in turn until all samples have completed the learning. The overriding construction process of the ith class is as follows:
Step 1. The algorithm takes any point that has not been covered in theith category and denotes it as a1.
Step 2. The algorithm takesa1 as the center, finds the threshold θ1, and obtains a coverage Ca1 with the center of a1 and the radius of θ1.
Step 3. The algorithm finds the center of gravitya1′of the coverageCa1and then presses Step 1.2 to find the new thresholdθ1′ and obtain the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points.
Step 4. The algorithm finds the translation pointa1′′ of a1 and finds the corresponding coverage Ca1′′. If Ca1′′ covers more points than Ca1, then a1′′⟶a1, θ1′′⟶θ1, and the algorithm goes to Step 1.3. Otherwise, a coverage Ci is obtained, and all sample points contained in Ci are deleted.
Step 5. Ifi=i+1modk, the algorithm goes to Step 1.The algorithm judges whether the test sample belongs to the area according to the sequence of coverage structure and takes the category of the smallest area containing the test sample as the category of the sample.The schematic diagram after the crosscoverage is completed is shown in Figure3.Figure 3
Classification results of the crosscopula function.


## 2.2. Fuzzy Kernel Covering Classifier

The commonly used kernel functions mainly include the following types:(1)
The Gaussian radial basis function isKx,y=exp−x−y2/q, q=2σ2(2)
The polynomial function isKx,y=x·y+1d, d=1,2,⋯(3)
The sigmoid function isKx,y=tanh−bx⋅y−cWe assume that the domain of discourse isX; then, any point on X is mapped to the unit hypersphere in the feature space by the radial basis kernel function, which is exactly the process of projecting the sample onto the hypersphere in the copula function. Therefore, it is possible to construct the coverage directly in the feature space without transforming the samples. At this point, the kernel copula function is obtained, and the distance originally represented by the inner product becomes Kx,y=exp−x−y2/q, where q=2σ2.In the kernel copula function, some functions of the original copula function need to be changed as follows:(1)
The calculation of the threshold (radius)θ usually adopts the following formula:(5)θ=maxx∉Xkai∈XkKai,x=maxx∉Xkai∈Xkexp−x−ai2qIts purpose is to increase the radius of the spherical field, reduce the classification boundary, and reduce the rejection rate.(2)
The function is(6)y=σKω,x−θ,(7)σx=x,ifx≥0,0,otherwise(3)
The distance function from the samplex to the domain Ci is(8)dx,Ci=0,ifx∈Ci,θ−Kωi,x,ifx∉CiIn the basic copula function, the radius of each coverage is determined using formulas (1)–(4). d1 represents the distance between the current field center and the nearest heterogeneous point (due to the inner product operation. Therefore, d1 takes the maximum value when the distance is closest, and vice versa). d2 represents the distance between the center of the field and the farthest similar point on the premise that it is greater than d1. Take θ=d1+d2/2 as the radius, and all areas outside the coverage are the rejection areas. The purpose of this processing is to reflect the equality of various categories on the one hand and to expand the coverage area as much as possible, so that more test samples fall into the existing coverage and reduce the rejection rate. In the kernel copula function, due to the ambiguity of the algorithm itself, formula (5) is used to determine the radius, and its essence is to set θ=d1.According to the above analysis, in the improved algorithm, the algorithm first modifies the radius calculation principle toθ1=d1 according to formula (10), where d2 is as formula (10). Algorithms make each overlay describe only what has been learned, which is commonly referred to as “knowing what you know, not knowing what you don’t know.” Such modification will inevitably lead to the reduction of the coverage area, the increase of the rejection area, and the increase of rejection points. At this time, the recognition rate of the classifier is improved by improving the processing method of the rejected samples.
(9)d1=maxΚx,a1,x∉Xi,(10)d2=minΚx,a1Κx,a1>δ1,x∈Xi.In the process of judging rejected samples, the membership function of samplex to the ith covering Ci is introduced.
(11)μi=1+Κx,ωi−θi∗Κx,ωiθi.Among them,Κx,ωi is the distance from the rejected sample to the center ωi of Ci, θi is the radius of Ci, and Κx,ωi−θi is the distance from the rejected sample to the edge of Ci, which is a negative value. The function comprehensively considers factors such as the distance between the sample and the coverage edge, the distance between the sample and the coverage center, and the coverage radius. When the sample happens to fall on the edge of the coverage, the value of μi is 1; that is, it belongs to the coverage. As the samples move away, μi decreases monotonically and gradually tends to 0. At this time, the fuzzy kernel copula function FKCA (Fuzzy Kernel Covering Algorithm) is obtained. The algorithm is divided into two parts: learning and testing, which are described as follows:Algorithm 3.
The learning algorithm is as follows.
We assume that the learning sampleX has a total of k classes; that is, X=X1,X2,⋯,Xk, and the algorithm uses the Gaussian radial basis function Kx,y=exp−x−y2/q, where q=2σ2. For k categories, the algorithm constructs the coverage of each category in turn, until all samples are included in a certain coverage. The overriding construction process of the ith class is as follows:
Step 1. The algorithm takes any point that has not been covered in theith category and denotes it as a1.
Step 2. The algorithm takesa1 as the center and calculates the threshold d2 according to d2 in formula (10) and obtains a coverage Ca1 with a1 as the center and θ1 as the radius.
Step 3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then presses Step 1.2 to find the new threshold θ1′ and obtain the new coverage Ca1′. If Ca1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points, and then, a coverage Ci is obtained.The membership function designed in formula (11) comprehensively considers a variety of location factors covered to determine the membership. When the distance between a rejected sample and the coverage edge of two different categories is equal, the following conclusion can be obtained according to this function; the membership degree of the sample to the coverage with a smaller radius is greater than that of the coverage with a larger radius. In this regard, we give an intuitive explanation as shown in Figure 4. For the sake of simplicity, we take the two-category case under the two-dimensional plane as an example for analysis.Figure 4
Analysis of membership function.We assume that two coverages Cover 1 and Cover 2 have been obtained in Figure4, which cover samples of different classes, respectively. The solid line represents its range, and the radius r1 of Cover 1 is greater than the radius r2 of Cover 2, and the distance between the rejection point T and the two coverage edges is equal. According to the way of determining the radius, it is advisable to set the point A∈C1 and B∈C2 at the position shown in the figure. It does the radii R1 and R2 to get the range shown by the dotted line. For Cover 1, when the radius reaches r1, it stops due to encountering a heterogeneous B in the process of continuing expansion. It can be considered that the point located on the edge R2 does not belong to Cover 1 at all. Therefore, the connection C1B can be made, and the membership of the points on the connection to Cover 1 gradually decreases, and 0 is taken at point B. In the same way, there is a connection C2A to Cover 2, and the properties are the same. It is easy to know that the degree of membership of point T to Cover 1 is smaller than that to Cover 2, so T is determined as the category to which Cover 2 belongs.


## 2.3. Multiple Example Copula Functions

A threshold is set, and when the sum of the cost of expansion is higher than the threshold, the current coverage stops expanding, as shown in Figure5.Figure 5
Schematic diagram of MICA-SNP.The distribution of each bag example in Figure5 is consistent with the figure, with white for positive packets and black for negative packets. For example, in construction coverage in the negative bag, when the coverage C1.1 is obtained, it continues to expand to obtain C1.2 and C1.3, and the cost increases continuously. When expanding to C1.4, the newly added positive bag example makes the cost exceed the threshold, so C1.4 cancels and falls back to C1.3. C2.3 and C3.2 are obtained in the same way, while the negative packet covers C4, C5, and C6. It cannot be expanded because of its small capacity. When the coverage of the negative examples is completed, the coverage of the remaining positive examples is constructed, and the general construction method is adopted at this time, but the positive examples are not deleted during the construction process. For example, when obtaining C8 and continuing to construct C9, although some positive examples have been covered by C3, it is still used for the construction of C. The target concept area after construction is completed is shown in the shaded area.In summary, the multi-instance copula function MICA-BSNP (Multi-instance Covering Algorithm Based on Strong Noise Processing) is obtained as follows.Algorithm 4.
The learning algorithm is as follows: the algorithm gives K learning samplesB1,y1,B2,y2,⋯,BK,yK, yK∈0,1, yK=0 means negative packet, yK=1 means positive packet, and the number of examples contained in packet Bi is Ni. A new sample set b11,y1,⋯,b1N1,y1,⋯,bK1,yK,⋯,bKNK,yK is obtained by assigning the label of the bag to each example in the bag. We record the set of negative examples as X0 and the set of positive examples as X1.
Step 1. The algorithm takes any example that has not been learned and denotes it asa1.
Step 2. The algorithm takesa1 as the center and calculates the threshold θ1 according to d2 in formula (10) and obtains a coverage Ca1 with a1 as the center and θ1 as the radius.
Step 3. The algorithm finds the center of gravitya1′ of the coverage Ca1 and then presses Step 1.2 to find the new threshold θ1′ and obtains the new coverage Ca1′.
IfCa1′ covers more points than Ca1, then a1′⟶a1, θ1′⟶θ1, and loop operation until Ca1′ cannot cover more points; then, a quasicoverage Ca1 is obtained.
Step 4. When the number of examples inCa1 is less than epsN, the algorithm determines Ca1 and obtains a coverage Ci, the algorithm marks the examples contained in it as learned, and the algorithm goes to Step 1. Otherwise, the algorithm goes to Step 1.5.
Step 5. The algorithm takesa1 as the center; finds θ1′′, θ1′′=maxKa1,x<θ1x∈X1; and calculates the total cost of the current cost of coverage expansion. When the total cost is less than the threshold, the algorithm marks the positive examples included in the expansion as negative, θ1′′⟶θ1, and a new Ca1 is obtained, and the algorithm goes to Step 1.3. Otherwise, the algorithm cancels this expansion and obtains a coverage Ci with a1 as the center and θ1 as the radius.The algorithm is given two finite setsA and B with A=a1,a2,⋯,am and B=B1,B2,⋯,Bn. Then, the Hausdorff distance between A and B can be defined by formula (12):
(12)HA,B=maxhA,B,hB,A,(13)hA,B=maxa∈Aminb∈Ba−b,(14)hB,A=maxb∈Bmina∈Ab−a.In formulas (12)–(14), · is a certain distance norm, and the Euclidean distance is used in this paper. Hausdorff distance describes the degree of difference between two sets A and B; the larger the distance, the more obvious the difference. Thus, the multi-instance copula function MICA-BBC (Multi-Instance Covering Algorithm Based on Bag Covering) is obtained.Algorithm 5.
The learning algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1, and the set of positive and negative packets is denoted as Xi, where i=0 means negative packet and i=1 means positive packet. The algorithm constructs the spherical cover of positive and negative packages in turn, until all packages fall into a certain cover, and the construction process of the ith cover is as follows:
Step 1. The algorithm selects any package that has not yet been covered in theith category, denoted as a1.
Step 2. The algorithm takesa1 as the center to solve the threshold θ, and the solution method of θ is
(15)d1=minHx,a1,x∉Xi,(16)d2=maxHx,a1Hx,a1<d1,x∈Xi,(17)θ=d1+d22.
At this point, a sphere coveringCj is obtained, whose center is a1 and whose radius is θ.
The test algorithm is as follows:
Step 1. For the bagx to be classified, the algorithm calculates the distance from x to each one in turn:
(18)dx,Cj=θj−Hx,aj.
Step 2. If there isCj such that dx,Cj≥0, it means that x falls into the sphere cover Cj, and the label of the package to which Cj belongs is used as the label of the package x.
Step 3. If∀j, dx,Cj<0, the algorithm takes dx,Cj and takes the tag of the package to which Cj belongs as the tag of package x.In order to properly optimize the coverage results, increase the coverage radius, and reduce the number of coverages, we introduce the secondary scanning method introduced in Section3 and then obtain an improved multi-instance copula function based on package coverage.Algorithm 6.
The learning algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1, and the set of positive and negative packets is denoted as Xi, where i=0 means positive packet and i=1 means negative packet. The algorithm constructs the spherical cover of positive and negative packages in turn, until all packages fall into a certain cover, and the construction process of the ith cover is as follows:
Step 1. The algorithm selects any package that has not yet been covered in theith category, denoted as a1.
Step 2. The algorithm takesa1 as the center and uses formula (17) to solve the threshold θ and obtains a spherical coverage Ca1 with a1 as the center and θ as the radius and records the number of packets contained in the coverage. If there are uncovered packages in this class, the algorithm goes to Step 1.1; otherwise, the algorithm goes to Step 1.3.
Step 3. The algorithm sorts the coverages in a descending order according to the number of samples contained in each coverage and reconstructs coverages in turn according to the sorted centers. When the number of samples contained in the obtained coverage is not less than the number of samples contained in the coverage for the first time, the coverage is determined. Otherwise, the algorithm cancels this construction and reinserts the center into the table in order based on the number of samples contained in this time.Algorithm 7.
The algorithm is as follows: the algorithm is givenK learning samples B1,y1,B2,y2,⋯,BK,yK, yK∈0,1. The algorithm transforms the package and constructs an overlay.
Step 1. The algorithm arbitrarily selectsk packages from the set B of packages as the initial cluster center, denoted as C1 to Ck, and the cluster corresponding to the cluster center Cj is cluster j.
Step 2. The algorithm uses the Hausdorff distance to find the distanceHBi,Cj from Bi to each cluster center Cj for each packet Bi in B−C1,⋯,Ck, where j=1,..,k. The algorithm puts Bi into the cluster j formed by the nearest Cj and repeats until all packets are clustered into k categories.
Step 3. The algorithm solves the center bag for thek clusters obtained by clustering, and the new center of the jth cluster is
(19)Cj=argminA∈ClusterjHA,B.
Step 4. The algorithm finds the Hausdorff distance fromBi to Cj (j=,..,k) for each package Bi in B and uses it as a component of the feature vector. That is, xi=HBi,C1,HBi,C2,⋯,HBi,Ck; all xi form a new sample set X, and X=x1,y1,x2,y2,⋯,xK,yK.
Step 5. The algorithm uses the copula function onX to construct a classifier.


## 3. Correlation Analysis of Exchange Rate Fluctuations and Oil Price Changes Based on Copula

Based on the established individual effect model, a panel model based on the Brent oil and WTI oil future prices is established for the exchange rate, respectively, to forecast the exchange rate of exporting countries. The cases are shown in Figures6–8.Figure 6
Prediction figure1.
(a)(b)Figure 7
Prediction figure2.
(a)(b)Figure 8
Prediction figure3.
(a)(b)Figure6(a) shows the WTI oil price prediction, and Figure 6(b) shows the Brent oil price. According to the comparison of the scales in the above picture, it is found that there is a high degree of similarity between the two. Moreover, the results show that the WTI oil price prediction error value is 0.000168, and the Brent oil price forecast error value is 0.000145. Although it can be seen from the error value that it is relatively small, it can be found that there is still a big difference in the whole model, especially the trend.Similarly, Figure7(a) shows the WTI oil price prediction exchange rate series, and Figure 7(b) shows the Brent oil price prediction. The fluctuation of the entire trend is more in line with the original sequence. Among them, the total error of WTI oil future price series forecast is 2.63E-05, and the error of Brent oil future price forecast is 3.2E-06. It can be seen from the figure that the entire predicted sequence fits well with the original sequence, and the similarity is high.Through the above simulation studies, it is verified that there is a relatively obvious correlation between exchange rate fluctuations and oil price changes.


## 4. Conclusion

At present, in the postcrisis era, all kinds of instability and risks are increasing day by day. For example, the instability of the global economy and political changes in major countries have become uncertain factors that can cause sudden jumps in international oil prices at any time, which may lead to continuous fluctuations in oil futures prices. When the changes in international oil prices are continuous or large scale, it will likely lead to more violent inflation. According to the theory of purchasing power parity, due to the rise in the price level and inflation, the exchange rate rises and the local currency depreciates. At the same time, higher inflation means higher interest rates. According to the theoretical formula of interest rate parity, the change of the interest rate level will cause the opposite direction change of the value of the local currency; that is, the international oil price will rise, the interest rate will rise, and the local currency will depreciate. This paper combines the copula function to study the correlation between exchange rate fluctuations and oil price changes. The simulation study verifies that there is a relatively obvious correlation between exchange rate fluctuations and oil price changes.



---

*Source: 1023725-2022-10-04.xml*