#Cardano fam, 😂😂
We are literally ready-doing last November. We are at the mercy of Wall St algos now 😏
class NovemberPriceSimulator {
constructor(initialPrice = 100, dropPercent = 15, risePercentPerDay = 1.2) {
this.initialPrice = initialPrice;
this.dropPercent = dropPercent; // % drop in first week
this.risePercentPerDay = risePercentPerDay; // % rise each day after
this.prices = [];
this.dates = [];
}
// Generate price for each day in November
simulateNovember(year = new Date().getFullYear()) {
const nov1 = new Date(year, 10, 1); // November 1st (month is 0-indexed)
const daysInNovember = 30;
let currentPrice = this.initialPrice;
for (let day = 1; day <= daysInNovember; day++) {
const currentDate = new Date(year, 10, day);
this.dates.push(currentDate.toISOString().split('T')[0]);
// First week: November 1–7 → price drops
if (day <= 7) {
const dropFactor = 1 - (this.dropPercent / 100) / 7; // Daily drop
currentPrice *= dropFactor;
}
// Rest of the month: November 8–30 → price rises daily
else {
const riseFactor = 1 + (this.risePercentPerDay / 100);
currentPrice *= riseFactor;
}
this.prices.push(parseFloat(currentPrice.toFixed(2)));
}
return { dates: this.dates, prices: this.prices };
}
// Simple trading algorithm based on the pattern
executeTradingStrategy(startingCapital = 10000) {
const { dates, prices } = this.simulateNovember();
let cash = startingCapital;
let shares = 0;
let portfolioValue = startingCapital;
const trades = [];
for (let i = 0; i < prices.length; i++) {
const price = prices[i];
const date = dates[i];
// Buy on November 7 (end of drop week)
if (i === 6) {
shares = cash / price;
cash = 0;
trades.push(`BUY on ${date}: ${shares.toFixed(4)} shares @ $${price}`);
}
// Sell on November 30 (end of month)
if (i === prices.length - 1 && shares > 0) {
cash = shares * price;
trades.push(`SELL on ${date}: ${shares.toFixed(4)} shares @ $${price}`);
shares = 0;
}
// Update portfolio value
portfolioValue = cash + (shares * price);
}
const finalValue = portfolioValue.toFixed(2);
const profit = (portfolioValue - startingCapital).toFixed(2);
const profitPercent = ((portfolioValue / startingCapital - 1) * 100).toFixed(2);
return {
startingCapital,
finalValue,
profit: parseFloat(profit),
profitPercent: parseFloat(profitPercent),
trades,
priceHistory: { dates, prices }
};
}
}
// === RUN THE SIMULATION ===
const simulator = new NovemberPriceSimulator(
100, // Starting price on Nov 1
15, // 15% total drop in first week
1.2 // 1.2% rise per day after
);
const result = simulator.executeTradingStrategy(10000);
console.log("November Price Movement & Trading Result");
console.log("==========================================");
result.trades.forEach(t => console.log(t));
console.log(`\nStarting Capital: $${result.startingCapital}`);
console.log(`Final Value: $${result.finalValue}`);
console.log(`Profit: $${result.profit} (${result.profitPercent}%)`);
console.log("\nDaily Prices:");
result.priceHistory.dates.forEach((date, i) => {
console.log(`${date}: $${result.priceHistory.prices[i]}`);
});