Skip to content

Commit

Permalink
added the note on frequency of the data updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mnsrulz committed Dec 16, 2024
1 parent 121c0f0 commit 0cc95e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ To deploy the application, follow these steps:
netlify deploy --prod
```

## Data Update Frequencies

- **Delta/Gamma**
Based on [Tradier documentation](https://documentation.tradier.com/brokerage-api/markets/get-options-chains), greeks values (delta/gamma) are updated every hour.

- **Open Interest**
Open interest data is updated **overnight**.

- **Volume**
Volume is updated **live**.

- **Spot Price**
The spot price is **live** and updates in real time during market hours.
- For **historical Delta/Gamma (DEX/GEX)** charts, the **last closing price** is used as the spot price.

## Contributing

We welcome contributions to the project! If you have suggestions or improvements, please follow these steps:
Expand Down
9 changes: 6 additions & 3 deletions src/app/options/analyze/[symbol]/C.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Expo, typeMap } from "@/components/Expo";
import { TickerSearchDialog } from "@/components/TickerSearchDialog";
import { calculateHedgingV2, getCalculatedStrikes } from "@/lib/dgHedgingHelper";
import { DexGexType, MiniOptionContract } from "@/lib/types";
import { FormControl, InputLabel, Select, MenuItem, Box, Tab, Tabs, Paper, Container } from "@mui/material";
import { FormControl, InputLabel, Select, MenuItem, Box, Tab, Tabs, Paper, Container, Typography } from "@mui/material";
import dayjs from "dayjs";
import { useRouter } from "next/navigation";
import { parseAsInteger, parseAsString, parseAsStringEnum, useQueryState } from "nuqs";
Expand Down Expand Up @@ -35,8 +35,8 @@ export const C = (props: { symbol: string, cachedDates: string[], dte: number, s
const tillDate = dayjs().add(dte, 'day');
return data.filter(r => dayjs(r.expiration_date) <= tillDate);
}, [dte]);
const allStrikes = useMemo(() => getCalculatedStrikes(price, strikeCounts, [...filteredData.reduce((p,c)=> p.add(c.strike) , new Set<number>())]), [strikeCounts]);
const allDates = useMemo(() => [...filteredData.reduce((p,c)=> p.add(c.expiration_date) , new Set<string>())].sort(), [dte]);
const allStrikes = useMemo(() => getCalculatedStrikes(price, strikeCounts, [...filteredData.reduce((p, c) => p.add(c.strike), new Set<number>())]), [strikeCounts]);
const allDates = useMemo(() => [...filteredData.reduce((p, c) => p.add(c.expiration_date), new Set<string>())].sort(), [dte]);
const { exposureData } = useMemo(() => {
return calculateHedgingV2(data, allStrikes, allDates, price)
}, [dte, strikeCounts, allStrikes, allDates]);
Expand Down Expand Up @@ -80,6 +80,9 @@ export const C = (props: { symbol: string, cachedDates: string[], dte: number, s
<Expo data={exposureData} exposure={typeMap[gexTab]} symbol={props.symbol} dte={dte} skipAnimation={false} />
</Box>
</Paper>
<Box textAlign="right">
<Typography variant="caption" fontStyle={ "italic" }>Click <a href="https://github.com/mnsrulz/mytradingview#data-update-frequencies">here</a> to know more about when this data updates</Typography>
</Box>
{/* <Paper sx={{ p: 0 }}> */}

{/* <FormControl sx={{ m: 1, minWidth: 120 }} size="small">
Expand Down

0 comments on commit 0cc95e3

Please sign in to comment.