Raising it on client behalf
I would like to ask info about the timestamp of EURHUF data from the Refinitiv python package.
How do I know if it is my time (Budapest, right now UCT+1). Please explain how to get the data to match my perception, I can't fix my mismatch
388.4
2025-10-28 12:35:43
EURHUF= BID ASK
Timestamp
2025-10-28 12:36:00 388.12 388.25
2025-10-28 12:37:00 388.2 388.34
2025-10-28 12:38:00 388.16 388.44
2025-10-28 12:39:00 388.25 388.35
2025-10-28 12:40:00 388.16 388.31
This is an output of the code, as you can see the entry price and the first price from the timeseries does not match
(Some of the text is in Hungarian but please let me know if I need to translate
Dátum=Date
Idő=Time)
import pandas as pd
import lseg.data as rd
from datetime import datetime, date, timedelta
import matplotlib.pyplot as plt
def main():
rd.open_session()
def get_rate(start, end, ccy_pair, interval):
df = rd.get_history(
universe=[ccy_pair],
fields=["BID", "ASK"],
interval=interval,
start=start,
end=end
)
return df
barcie = pd.read_excel("Barclays_kodolas.xlsx")
barcie["Dátumidő"] = pd.to_datetime(barcie["Dátumidő"]) + pd.Timedelta(hours = 1)
#barcie['Idő'] = barcie['Idő'].apply(
# lambda t: (datetime.combine(date.today(), t) + timedelta(hours=2)).time()
#)
eurhuf = barcie[barcie['Ccy Pair'] == 'EURHUF']
for index, row in eurhuf.iterrows():
#account for UTC time in refinitiv(assumed) shift 2h in summer time 1h in winter
prices = get_rate(f"{row['Dátum']}T09:00:00",f"{row['Dátum']}T18:00:00", "EURHUF=", '1min')
trade_time_only = row["Idő"]
trade_date = prices.index[0].date() # assuming all trades are on the same day
#trade_time = pd.Timestamp.combine(trade_date, trade_time_only)
trade_time = row["Dátumidő"]
direction = row["Saját irány"]
entry_price = row['Árfolyam']
print(direction)
print(entry_price)
end_time = trade_time + pd.Timedelta(minutes=20)
post_trade = prices[(prices.index > trade_time) & (prices.index <= end_time)]
print(trade_time)
print(post_trade.head())
if direction.lower() == 'buy':
price_series = post_trade['BID']
label = 'BID (Buy)'
else:
price_series = post_trade['ASK']
label = 'ASK (Sell)'
# Plot
plt.figure(figsize=(10, 5))
plt.plot(price_series.index, price_series.values, label=label, color='blue')
# Entry price line
plt.axhline(entry_price, color='green', linestyle='--', label=f'Entry Price: {entry_price}')
plt.title(f"Price Evolution After Trade ({direction.capitalize()})")
plt.xlabel("Time")
plt.ylabel("Price")
plt.legend()
plt.grid(True)
plt.show()
rd.close_session()
if name == "main":
main()