bugfixing

This commit is contained in:
MuslemRahimi 2025-01-06 00:10:37 +01:00
parent c5ba7a39fd
commit 1b516b3cfb
2 changed files with 0 additions and 11 deletions

View File

@ -67,12 +67,6 @@
function computeOTM(strikePrice, optionType) { function computeOTM(strikePrice, optionType) {
// Get the current stock price // Get the current stock price
const currentPrice = data?.getStockQuote?.price; const currentPrice = data?.getStockQuote?.price;
// Ensure the current price and strike price are valid numbers
if (typeof currentPrice !== "number" || typeof strikePrice !== "number") {
throw new Error("Invalid current price or strike price");
}
let otmPercentage = 0; let otmPercentage = 0;
if (optionType === "C") { if (optionType === "C") {

View File

@ -68,11 +68,6 @@
// Get the current stock price // Get the current stock price
const currentPrice = data?.getStockQuote?.price; const currentPrice = data?.getStockQuote?.price;
// Ensure the current price and strike price are valid numbers
if (typeof currentPrice !== "number" || typeof strikePrice !== "number") {
throw new Error("Invalid current price or strike price");
}
let otmPercentage = 0; let otmPercentage = 0;
if (optionType === "C") { if (optionType === "C") {