Skip to content

Commit

Permalink
Setting relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
JVerstry committed Mar 2, 2024
1 parent e482f4a commit 2013b31
Showing 1 changed file with 111 additions and 86 deletions.
197 changes: 111 additions & 86 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<th id="snd-snp500" class="cellRightBor">0</th>
</tr>

<tr class="trUnderline">
<tr>
<th class="cellRightBor">Nasdaq</th>
<th>
<button onclick="plusClick('nasdaq')" id="plus-m2" class="pmCss">+</button>
Expand All @@ -205,6 +205,18 @@
<th id="snd-nasdaq" class="cellRightBor">0</th>
</tr>

<tr class="trUnderline">
<th class="cellRightBor">US GDP</th>
<th>
<button onclick="plusClick('us-gdp')" id="plus-us-gdp" class="pmCss">+</button>
<button onclick="minusClick('us-gdp')" id="minus-us-gdp" class="pmCss">-</button>
</th>
<th id="direction-us-gdp">Sideways</th>
<th id="arrow-us-gdp" class="arrow cellRightBor">&#x219D;</th>
<th id="fst-us-gdp" class="cellRightBor">0</th>
<th id="snd-us-gdp" class="cellRightBor">0</th>
</tr>

<tr><th class="cellRightBor">BTC</th>
<th>
<button onclick="plusClick('btc')" id="plus-btc" class="pmCss">+</button>
Expand All @@ -229,7 +241,7 @@
</tr>

<tr>
<th class="cellRightBor">US Debt</th>
<th class="cellRightBor">US debt</th>
<th>
<button onclick="plusClick('us-debt')" id="plus-gold" class="pmCss">+</button>
<button onclick="minusClick('us-debt')" id="minus-gold" class="pmCss">-</button>
Expand Down Expand Up @@ -456,8 +468,9 @@
var i_Sentiment = 0, x_Sentiment = 0, x2_Sentiment = 0;
var i_SnP500 = 0, x_SnP500 = 0, x2_SnP500 = 0;
var i_Unemployment = 0, x_Unemployment = 0, x2_Unemployment = 0;
var i_UsRate = 0, x_UsRate = 0, x2_UsRate = 0;
var i_UsDebt = 0, x_UsDebt = 0, x2_UsDebt = 0;
var i_UsGDP = 0, x_UsGDP = 0, x2_UsGDP = 0;
var i_UsRate = 0, x_UsRate = 0, x2_UsRate = 0;
var i_War = 0, x_War = 0, x2_War = 0;

arrBTCElem = document.getElementById("arrow-btc");
Expand All @@ -477,8 +490,9 @@
arrSentimentElem = document.getElementById("arrow-sentiment");
arrSnP500Elem = document.getElementById("arrow-snp500");
arrUnemploymentElem = document.getElementById("arrow-unempl");
arrUsRateElem = document.getElementById("arrow-us-rate");
arrUsDebtElem = document.getElementById("arrow-us-debt");
arrUsGDPElem = document.getElementById("arrow-us-gdp");
arrUsRateElem = document.getElementById("arrow-us-rate");
arrWarElem = document.getElementById("arrow-war");

fstBTCElem = document.getElementById("fst-btc");
Expand All @@ -498,8 +512,9 @@
fstSnP500Elem = document.getElementById("fst-snp500");
fstSentimentElem = document.getElementById("fst-sentiment");
fstUnemploymentElem = document.getElementById("fst-unempl");
fstUsRateElem = document.getElementById("fst-us-rate");
fstUsDebtElem = document.getElementById("fst-us-debt");
fstUsGDPElem = document.getElementById("fst-us-gdp");
fstUsRateElem = document.getElementById("fst-us-rate");
fstWarElem = document.getElementById("fst-war");

sndBTCElem = document.getElementById("snd-btc");
Expand All @@ -519,8 +534,9 @@
sndSentimentElem = document.getElementById("snd-sentiment");
sndSnP500Elem = document.getElementById("snd-snp500");
sndUnemploymentElem = document.getElementById("snd-unempl");
sndUsRateElem = document.getElementById("snd-us-rate");
sndUsDebtElem = document.getElementById("snd-us-debt");
sndUsGDPElem = document.getElementById("snd-us-gdp");
sndUsRateElem = document.getElementById("snd-us-rate");
sndWarElem = document.getElementById("snd-war");

function updateData() {
Expand All @@ -542,95 +558,104 @@
i_Sentiment = windValue(arrSentimentElem.innerHTML);
i_SnP500 = windValue(arrSnP500Elem.innerHTML);
i_Unemployment = windValue(arrUnemploymentElem.innerHTML);
i_UsRate = windValue(arrUsRateElem.innerHTML);
i_UsDebt = windValue(arrUsDebtElem.innerHTML);
i_UsGDP = windValue(arrUsGDPElem.innerHTML);
i_UsRate = windValue(arrUsRateElem.innerHTML);
i_War = windValue(arrWarElem.innerHTML);

x_BTC = i_ETH + 0.5 * i_M2; // add Us Debt + inflation?
x_ETH = i_BTC + 0.5 * i_M2; // add Us Debt + inflation?
x_BankLending = 0;
x_Bonds = 0;
x_FedBalanceSheet = 0;
x_Gold = 0.5 * i_M2 - i_RealInterest;
x_GovernmentBorrowing = 0 - i_UsRate;
x_Infl = i_M2;
x_M2 = i_BankLending + i_GovernmentBorrowing + i_FedBalanceSheet - i_ReverseRepo;
x_Nasdaq = 0;
x_Oil = 0; // Add GDP
x_RealEstate = i_Infl - i_UsRate;
x_BTC = i_M2 + i_Infl - i_Sentiment;
x_ETH = i_M2 + i_Infl - i_Sentiment;
x_BankLending = 0 - i_UsRate;
x_Bonds = i_UsRate + i_GovernmentBorrowing;
x_FedBalanceSheet = i_FedBalanceSheet;
x_Gold = i_M2 - i_RealInterest + i_War + i_UsDebt;
x_GovernmentBorrowing = 0 - i_UsRate + i_UsDebt;
x_Infl = i_M2 - i_UsRate;
x_M2 = i_BankLending + i_GovernmentBorrowing + i_FedBalanceSheet - i_ReverseRepo
+ i_UsDebt;
x_Nasdaq = i_M2 - i_UsRate;
x_Oil = i_UsGDP;
x_RealEstate = i_Infl - i_UsRate - i_Unemployment;
x_RealInterest = i_UsRate - i_Infl;
x_ReverseRepo = 0;
x_Sentiment = 0 - i_Infl - i_Unemployment;
x_SnP500 = i_SnP500;
x_Unemployment = 0;
x_UsRate = 0;
x_UsDebt = 0;
x_War = 0;

x2_BTC = x_ETH + 0.5 * x_M2;
x2_ETH = x_BTC + 0.5 * x_M2;
x2_BankLending = 0;
x2_Bonds = 0;
x2_FedBalanceSheet = 0;
x2_Gold = 0.5 * x_M2 - x_RealInterest;
x2_GovernmentBorrowing = 0 - x_UsRate;
x2_Infl = x_M2;
x2_M2 = x_BankLending + x_GovernmentBorrowing + x_FedBalanceSheet - x_ReverseRepo;
x2_Nasdaq = 0;
x2_Oil = 0;
x2_RealEstate = x_Infl - x_UsRate;
x_ReverseRepo = i_ReverseRepo;
x_Sentiment = 0 - i_Infl - i_Unemployment - i_UsDebt
+ 0.5 * i_SnP500 + 0.5 * i_Nasdaq + i_RealEstate;
x_SnP500 = i_M2 - i_UsRate;
x_Unemployment = 0 - i_UsGDP;
x_UsDebt = 0 - i_UsRate + i_GovernmentBorrowing + i_War;
x_UsGDP = 0 - i_Oil - i_War + i_Sentiment + 0.5 * i_GovernmentBorrowing;
x_UsRate = i_UsRate;
x_War = i_War;

x2_BTC = 0.8 * x_ETH + x_M2 + 0.25 * x_Infl - x_Sentiment;
x2_ETH = 0.8 * x_BTC + x_M2 + 0.25 * x_Infl - x_Sentiment;
x2_BankLending = 0 - x_UsRate;
x2_Bonds = x_UsRate + x_GovernmentBorrowing;
x2_FedBalanceSheet = x_FedBalanceSheet;
x2_Gold = x_M2 - x_RealInterest + x_War + x_UsDebt;
x2_GovernmentBorrowing = 0 - x_UsRate + x_UsDebt;
x2_Infl = x_M2 - x_UsRate;
x2_M2 = x_BankLending + x_GovernmentBorrowing + x_FedBalanceSheet - x_ReverseRepo
+ x_UsDebt;
x2_Nasdaq = x_M2 - x_UsRate + x_UsGDP;
x2_Oil = x_UsGDP;
x2_RealEstate = x_Infl - x_UsRate - x_Unemployment;
x2_RealInterest = x_UsRate - x_Infl;
x2_ReverseRepo = 0;
x2_Sentiment = 0 - x_Infl - x_Unemployment;
x2_SnP500 = 0;
x2_Unemployment = 0;
x2_UsRate = 0;
x2_UsDebt = 0;
x2_War = 0;
x2_ReverseRepo = i_ReverseRepo;
x2_Sentiment = 0 - x_Infl - x_Unemployment - x_UsDebt
+ 0.5 * x_SnP500 + 0.5 * x_Nasdaq + x_RealEstate;
x2_SnP500 = x_M2 - x_UsRate;
x2_Unemployment = 0 - x_UsGDP;
x2_UsDebt = 0 - x_UsRate + x_GovernmentBorrowing + x_War;
x2_UsGDP = 0 - x_Oil - x_War + x_Sentiment + 0.5 * x_GovernmentBorrowing;
x2_UsRate = x_UsRate;
x2_War = x_War;

// Update

fstBTCElem.innerHTML = x_BTC;
fstETHElem.innerHTML = x_ETH;
fstBankLendingElem.innerHTML = x_BankLending;
fstBondsElem.innerHTML = x_Bonds;
fstFedBalanceSheetElem.innerHTML = x_FedBalanceSheet;
fstGoldElem.innerHTML = x_Gold;
fstGovernmentBorrowingElem.innerHTML = x_GovernmentBorrowing;
fstInflElem.innerHTML = x_Infl;
fstM2Elem.innerHTML = x_M2;
fstNasdaqElem.innerHTML = x_Nasdaq;
fstOilElem.innerHTML = x_Oil;
fstRealEstateElem.innerHTML = x_RealEstate;
fstRealInterestElem.innerHTML = x_RealInterest;
fstReverseRepoElem.innerHTML = x_ReverseRepo;
fstSentimentElem.innerHTML = x_Sentiment;
fstSnP500Elem.innerHTML = x_SnP500;
fstUnemploymentElem.innerHTML = x_Unemployment;
fstUsRateElem.innerHTML = x_UsRate;
fstUsDebtElem.innerHTML = x_UsDebt;
fstWarElem.innerHTML = x_War;
fstBTCElem.innerHTML = x_BTC.toFixed(2);
fstETHElem.innerHTML = x_ETH.toFixed(2);
fstBankLendingElem.innerHTML = x_BankLending.toFixed(2);
fstBondsElem.innerHTML = x_Bonds.toFixed(2);
fstFedBalanceSheetElem.innerHTML = x_FedBalanceSheet.toFixed(2);
fstGoldElem.innerHTML = x_Gold.toFixed(2);
fstGovernmentBorrowingElem.innerHTML = x_GovernmentBorrowing.toFixed(2);
fstInflElem.innerHTML = x_Infl.toFixed(2);
fstM2Elem.innerHTML = x_M2.toFixed(2);
fstNasdaqElem.innerHTML = x_Nasdaq.toFixed(2);
fstOilElem.innerHTML = x_Oil.toFixed(2);
fstRealEstateElem.innerHTML = x_RealEstate.toFixed(2);
fstRealInterestElem.innerHTML = x_RealInterest.toFixed(2);
fstReverseRepoElem.innerHTML = x_ReverseRepo.toFixed(2);
fstSentimentElem.innerHTML = x_Sentiment.toFixed(2);
fstSnP500Elem.innerHTML = x_SnP500.toFixed(2);
fstUnemploymentElem.innerHTML = x_Unemployment.toFixed(2);
fstUsDebtElem.innerHTML = x_UsDebt.toFixed(2);
fstUsGDPElem.innerHTML = x_UsGDP.toFixed(2);
fstUsRateElem.innerHTML = x_UsRate.toFixed(2);
fstWarElem.innerHTML = x_War.toFixed(2);

sndBTCElem.innerHTML = x2_BTC;
sndETHElem.innerHTML = x2_ETH;
sndBankLendingElem.innerHTML = x2_BankLending;
sndBondsElem.innerHTML = x2_Bonds;
sndFedBalanceSheetElem.innerHTML = x2_FedBalanceSheet;
sndGoldElem.innerHTML = x2_Gold;
sndGovernmentBorrowingElem.innerHTML = x2_GovernmentBorrowing;
sndInflElem.innerHTML = x2_Infl;
sndM2Elem.innerHTML = x2_M2;
sndNasdaqElem.innerHTML = x2_Nasdaq;
sndOilElem.innerHTML = x2_Oil;
sndRealEstateElem.innerHTML = x2_RealEstate;
sndRealInterestElem.innerHTML = x2_RealInterest;
sndReverseRepoElem = x2_ReverseRepo;
sndSentimentElem = x2_Sentiment;
sndSnP500Elem.innerHTML = x2_SnP500;
sndUnemploymentElem = x2_Unemployment;
sndUsRateElem = x2_UsRate;
sndUsDebtElem = x2_UsDebt;
sndWarElem = x2_War;
sndBTCElem.innerHTML = x2_BTC.toFixed(2);
sndETHElem.innerHTML = x2_ETH.toFixed(2);
sndBankLendingElem.innerHTML = x2_BankLending.toFixed(2);
sndBondsElem.innerHTML = x2_Bonds.toFixed(2);
sndFedBalanceSheetElem.innerHTML = x2_FedBalanceSheet.toFixed(2);
sndGoldElem.innerHTML = x2_Gold.toFixed(2);
sndGovernmentBorrowingElem.innerHTML = x2_GovernmentBorrowing.toFixed(2);
sndInflElem.innerHTML = x2_Infl.toFixed(2);
sndM2Elem.innerHTML = x2_M2.toFixed(2);
sndNasdaqElem.innerHTML = x2_Nasdaq.toFixed(2);
sndOilElem.innerHTML = x2_Oil.toFixed(2);
sndRealEstateElem.innerHTML = x2_RealEstate.toFixed(2);
sndRealInterestElem.innerHTML = x2_RealInterest.toFixed(2);
sndReverseRepoElem = x2_ReverseRepo.toFixed(2);
sndSentimentElem = x2_Sentiment.toFixed(2);
sndSnP500Elem.innerHTML = x2_SnP500.toFixed(2);
sndUnemploymentElem = x2_Unemployment.toFixed(2);
sndUsDebtElem = x2_UsDebt.toFixed(2);
sndUsGDPElem = x2_UsGDP.toFixed(2);
sndUsRateElem = x2_UsRate.toFixed(2);
sndWarElem = x2_War.toFixed(2);

}

Expand Down

0 comments on commit 2013b31

Please sign in to comment.