Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

provide the complete programming codes you use as an Appendix to the submitted solutions. The strength of trade relationships between pairs of countries (A,B) and

provide the complete programming codes you use as an Appendix to the submitted solutions.

The strength of trade relationships between pairs of countries (A,B) and (C,D) is reflected in the dependency of currency exchange rates (currency A / currency B) with (currency C / currency D). Mutual information between exchange rates (A/B) and (C/D) can be a measure of such dependency.

Consider the following currencies: Euro (EUR), US Dollar(USD), British Pound (GBR), Japan Yen (JPY) and Australian Dollar (AUD). You are given the daily exchange rates over one year (365 days) for the following: x1: (EUR/USD), x2: (GBR/USD), x3: (EUR/JPY), x4: (EUR/AUD), x5: (USD/JPY). The problem is to find the pairwise mutual information between these sequences of exchange rates and the measure of their independencies. This means that we would like to compute: I(xi ; xj) and Dindp(i,j) = 1 - 2 I(xi ; xj) / ( H(xi) + H(xj)) for i = 1..5 and j = 1..5

Input Data:

Synthetic Exchange Rates for 5 pairs of currencies over one year are given in a text file exchrate.txt. In the file, all recorded rates are multiplied by 100. To get true rates, divide each by 100. The figure shows a plot of the provided exchange rates.

image text in transcribed

image text in transcribed

find attached file

# Synthetic Exchange Rates for 5 pairs of currencies over one year

# All recorded rates are multiplied by 100.

# To get true rates, divide each by 100.

# name: x

# type: matrix

# rows: 365

# columns: 5

# column 1:EUR/USD, column 2: GBR/USD, column 3: EUR/JPY, column 4: EUR/AUD, Column 5: USD/JPY

132 167 14551 178 11885

122 137 13593 157 11408

104 125 11676 153 10278

122 131 13235 136 9822

107 129 11030 166 10257

117 137 12058 159 9457

130 163 14024 143 9262

116 132 12533 156 10169

133 154 13361 165 11041

141 151 15774 153 11701

148 171 14928 152 10202

117 136 11372 177 10572

135 155 13517 159 9687

135 148 15113 164 10351

108 148 9883 168 10795

96 105 10203 162 9060

106 135 11211 158 10560

133 153 13525 121 10090

134 156 15032 156 10512

110 136 11485 170 9554

115 140 12724 154 10317

137 156 14424 169 8805

136 153 14323 161 9735

139 164 14245 166 11632

116 140 12746 144 9844

128 145 14679 156 9126

123 158 13001 137 8350

131 150 13493 149 10672

108 139 11952 177 9588

115 131 11661 132 10001

119 138 11741 136 10912

116 133 12057 147 11136

103 119 10858 155 11931

135 147 13748 169 11095

116 139 12160 142 10524

111 130 11684 169 9119

128 154 11692 194 10377

137 148 14912 146 11832

123 154 12882 137 12273

118 140 12810 136 10449

126 136 12826 174 11577

108 119 11463 151 9793

106 136 10832 163 9470

122 137 12613 134 11657

126 129 13859 171 10027

148 176 15799 135 11364

141 169 14670 133 9234

122 153 12354 159 10571

91 119 10646 160 9085

121 151 13413 183 11424

119 139 12956 143 11921

124 130 12313 158 9706

111 133 12106 165 12137

125 149 13872 184 10635

134 132 13574 153 9579

130 148 14225 175 9885

116 129 12659 146 11098

131 142 13866 172 11873

121 132 12348 127 9524

108 138 12564 143 9749

140 159 15172 155 10249

129 137 13663 162 12163

127 149 13580 147 10155

125 130 12428 151 10331

126 147 13991 163 12596

119 135 13216 119 10789

145 159 15154 186 11095

114 141 11299 174 11493

137 153 15129 187 11448

124 131 13966 162 10556

127 132 12887 163 10374

106 132 11316 147 10895

134 142 14374 159 10930

114 137 12908 182 10762

122 153 12371 147 10533

119 125 12549 166 11022

108 126 10903 128 11060

118 138 13009 150 10609

125 137 13097 174 10615

101 124 9485 153 11313

119 129 11644 180 10186

114 145 11791 155 9883

123 156 13120 156 12757

122 136 12871 160 10091

137 159 15336 145 12473

118 134 12616 137 9179

124 150 13089 156 9039

133 154 13162 151 9120

106 128 12103 173 11311

127 155 12507 176 9696

137 162 13849 168 10079

109 131 10848 164 11257

112 124 12020 137 9151

113 123 11655 151 10093

121 143 12842 148 12123

114 130 11678 165 12221

103 121 11305 165 11375

134 158 15433 111 11033

125 161 14231 168 9740

129 138 14022 174 11357

129 143 13006 133 9555

88 106 9843 147 10699

128 145 14110 163 12297

128 144 12286 150 12375

134 139 12725 156 11822

134 155 13150 190 10401

112 137 10932 161 11116

125 151 12514 193 9128

139 171 14628 116 9064

107 123 11425 156 11600

112 121 12158 142 11474

101 119 10361 165 10257

116 141 11512 165 10541

135 154 13737 146 11547

134 148 14431 141 10958

122 139 13170 151 10060

134 154 14088 134 10260

128 147 13650 182 10587

136 171 13824 168 9059

120 137 12195 186 9345

129 144 13566 160 10863

143 170 13583 153 11618

131 151 13693 169 10290

136 161 13665 148 9829

117 147 12383 178 10358

97 117 9688 141 11415

131 140 14494 149 10438

113 138 12323 175 12062

113 148 12525 150 11839

124 134 12622 183 10673

117 152 12070 169 10793

124 147 13683 113 9030

113 139 12362 173 10682

118 141 12705 137 11769

122 153 12681 156 10236

131 132 13756 153 10716

138 143 15062 153 8484

133 160 14349 151 9304

125 159 12986 175 10614

124 144 13041 142 10389

114 132 12507 150 10640

111 130 11724 157 10033

127 143 12462 126 10845

130 148 13245 159 9958

125 134 13263 144 8587

114 143 11828 176 12350

119 138 12257 173 10047

113 134 12434 192 11174

118 150 11464 173 9469

146 157 14617 186 8970

125 131 13105 152 10596

139 168 14446 152 10169

131 144 14037 138 10841

96 112 10999 163 11492

114 127 12291 144 9743

145 162 14506 144 9992

115 139 12903 136 10735

126 143 14454 148 10355

107 134 12064 145 10603

134 143 13821 140 10048

125 146 12942 147 10431

108 136 10990 170 10449

110 133 11772 189 9816

121 124 12919 138 13170

135 155 14199 158 11529

128 153 14464 144 11123

116 134 11746 169 10332

144 148 14204 159 9881

116 133 12671 174 9124

148 172 15409 137 11583

123 144 13330 133 9837

110 118 11558 148 9199

123 146 12901 139 10293

106 123 11846 147 8062

118 140 12955 160 9364

128 151 13178 139 10037

116 142 12865 171 10438

135 155 14662 160 8001

125 158 13959 138 8756

108 121 12426 145 10902

121 145 12970 150 11048

121 142 13331 131 11310

119 133 12526 159 8975

122 147 13212 150 9879

118 124 12748 178 9192

127 145 12551 151 9547

119 131 13553 163 7376

128 150 14024 153 10466

120 121 12943 141 9127

112 129 12743 151 11664

98 115 10382 139 9823

113 142 12400 193 11633

115 131 13335 178 10041

111 130 12415 127 10592

134 156 13588 189 12085

129 153 13063 179 10268

103 131 10486 174 11790

133 161 13128 155 10763

123 133 13890 146 9859

119 145 13223 150 9478

104 117 10108 139 9519

120 147 12468 155 9327

106 113 10923 169 10196

115 134 12673 141 10992

120 130 12204 152 8756

121 143 13799 166 8071

128 132 13449 154 10015

114 135 11605 180 9598

116 137 12878 121 11349

111 138 12983 135 8814

108 143 11007 172 11162

117 138 11669 131 11547

114 135 12945 184 10479

119 137 12293 152 8390

126 146 13397 158 12015

133 157 13526 130 12300

127 141 13759 149 9707

127 152 15067 175 9429

99 126 9872 153 8289

139 151 14899 139 11069

99 105 11197 131 10662

131 146 14000 165 9730

134 164 13748 168 10782

130 161 13682 191 10803

116 142 12411 174 10015

122 132 12047 158 10068

129 153 13058 146 11308

104 119 11201 168 10888

130 149 13704 175 10899

128 150 13728 166 10347

106 128 11184 167 10602

107 137 10336 156 11744

127 139 13199 154 8689

134 159 13866 139 9590

118 133 13300 151 9955

114 126 12405 138 8163

124 146 13496 155 9612

128 149 12268 165 8609

141 166 15233 153 10719

117 138 12258 142 11617

136 167 13540 153 9553

129 139 12250 157 11576

115 140 11827 131 11620

117 137 13395 170 10081

90 118 9650 165 10956

126 152 13288 181 11520

128 136 11933 172 11449

100 117 11203 150 11506

97 100 10272 165 11134

118 138 11142 182 9626

122 140 12273 176 10879

120 149 12532 149 9828

128 157 13661 155 9544

110 123 11083 155 10879

112 127 12014 171 10126

139 161 13393 139 10251

121 141 12187 143 8169

125 137 13173 190 10910

126 159 12969 136 11027

113 129 12109 151 12277

129 147 13880 194 9685

125 161 14313 158 10593

127 154 13929 159 9743

132 150 15050 157 9435

129 169 13647 188 9948

128 144 12410 160 9149

121 121 12238 155 9373

116 144 13504 160 9253

116 125 13112 158 12577

108 124 11568 144 9961

135 146 13884 165 11240

115 133 11275 185 10979

120 139 12371 165 9792

127 139 13284 143 11171

126 151 12716 139 8814

105 124 12154 174 10121

101 112 10934 169 10376

122 131 13051 163 10036

127 158 14294 170 11688

129 143 13127 162 9706

122 140 12728 173 9944

138 168 14840 140 10744

136 169 14259 148 9099

125 147 13920 155 8670

108 138 11948 153 9422

106 125 11221 136 8556

128 151 13938 166 10964

116 136 12642 157 9485

123 157 12721 180 11550

133 153 14321 161 9916

109 124 12620 188 10243

119 141 11315 142 10584

122 136 12294 136 11169

107 124 11783 150 10693

124 145 12982 146 9245

108 124 11719 175 9982

118 135 13377 169 9215

133 169 13240 156 9446

104 129 9512 158 9930

118 149 12233 152 10952

140 160 14532 178 8202

121 153 12504 171 10949

116 151 11581 171 11120

126 157 12697 156 10359

114 133 12006 157 10383

125 138 12469 138 10286

138 168 13439 132 9915

114 147 13278 165 10003

137 148 14446 190 10552

123 133 13264 179 11166

125 149 13402 167 8823

117 145 12023 161 9806

100 118 11593 195 12062

134 163 13307 161 11608

104 134 10943 173 9244

131 134 14542 165 10452

135 167 14188 137 9836

142 164 15045 155 12673

130 147 13895 150 11350

117 122 13090 129 9870

127 146 13070 194 11812

133 143 13520 155 10230

119 137 11872 169 9714

134 145 14509 169 9751

121 149 11730 166 10004

114 136 12425 157 10052

130 155 13931 153 10264

123 146 12727 139 10723

138 162 14445 166 9478

115 136 12344 137 9951

133 142 14068 167 9634

111 123 11605 185 10248

106 123 11311 168 11539

115 137 12796 161 10307

112 125 12701 198 9487

126 152 12888 150 10136

132 156 13323 118 9451

135 150 13124 150 10382

118 144 11832 194 11174

122 144 12142 165 10466

131 138 14304 144 10040

127 132 13342 171 10526

127 131 13699 143 10833

98 115 11493 162 10908

110 125 11815 167 9318

123 134 13527 166 10758

109 141 11304 173 9969

122 153 12431 162 9738

117 149 10927 160 11428

118 131 13195 150 9296

116 142 12629 142 9946

135 146 15494 166 10278

127 144 13252 151 12230

114 117 12897 155 11904

100 132 11593 171 10233

110 133 11171 139 9739

126 142 13631 169 10520

118 127 12345 165 10987

114 151 11187 145 9182

128 155 13247 163 12600

131 131 12756 152 11489

135 145 13712 145 10961

138 152 13156 159 9620

133 153 13933 175 11035

104 135 10795 159 11029

Exchange Rates (1 year) EUR/USD Pumparan oyununa darila ang mapanganin 8:8 0 100 200 300 400 GBR/USD 1.8 1.6 1.4 1.2 1 0 a temerahanamuil Maighamns why whithana 100 200 300 400 EUR/JPY Morsham 0 100 200 300 400 EUR/AUD to important window.alwww.laws y hand 0 100 200 300 400 USD/JPY paco-N 000000 EMM "Anhin lemon Mary, Muthahah marathon 100 300 400 200 Days The two matrices: (X,Y) X3 X1 X2 X4 XS X1 X2 UL X3 X4 X5 Dinge X3 X1 X2 X4 X5 Average X1 X2 X3 X4 X5 Average Analysis of findings from these two matrices. Exchange Rates (1 year) EUR/USD Pumparan oyununa darila ang mapanganin 8:8 0 100 200 300 400 GBR/USD 1.8 1.6 1.4 1.2 1 0 a temerahanamuil Maighamns why whithana 100 200 300 400 EUR/JPY Morsham 0 100 200 300 400 EUR/AUD to important window.alwww.laws y hand 0 100 200 300 400 USD/JPY paco-N 000000 EMM "Anhin lemon Mary, Muthahah marathon 100 300 400 200 Days The two matrices: (X,Y) X3 X1 X2 X4 XS X1 X2 UL X3 X4 X5 Dinge X3 X1 X2 X4 X5 Average X1 X2 X3 X4 X5 Average Analysis of findings from these two matrices

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

C) and for AF?

Answered: 1 week ago

Question

Sort the expressions below by increasing speed of growth

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago