Exchange-Price
Exchange-Price is a model that leverages a large language model (LLM) to analyze the volatility of the foreign exchange market and predict the exchange rates of major global currencies (USD, JPY, EUR, etc.). This model is designed to integrate both structured and unstructured financial data to provide more accurate predictions of market changes. Based on Meta's Llama 3.1 architecture, Exchange-Price optimizes exchange rate prediction performance using techniques such as SFT (Supervised Fine-Tuning) and DPO (Direct Preference Optimization). By incorporating historical foreign exchange market data, key economic indicators, and global financial news, the model is able to make predictions for the next day's exchange rates (High, Low, Close).
Model Details
- model_url: https://huggingface.co/davidkim205/exchange-price
- base_model: metal-llama/Llama-3.1-8B-Instruct
- base_model_release_date: 2024/07/23
- model_type: text generation
- context_length: 128k
- license: https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE
Usage Application Form
To use this model, please complete the application form and submit it via email [[email protected]]. Access will be granted after your application is reviewed and approved. We appreciate your cooperation and look forward to assisting you.
1. **Name:**
- (e.g., John Doe)
2. **Date of Birth:**
- (e.g., January 1, 1990)
3. **Affiliation:**
- Are you applying as a company or an individual? [ ] Company [ ] Individual
- Company Name (if applicable):
- Department (if applicable):
4. **Position/Role:**
- (e.g., Data Scientist, Researcher, etc.)
5. **Contact Information:**
- Email:
- Phone Number:
6. **Purpose of Use:**
- (e.g., Research and Development, Commercial use, Educational purposes, etc.)
7. **Detailed Reason for Use:**
- 1. Name and version of the model you wish to use:
- 2. Reason for selecting this model:
- 3. Objectives to achieve using this model:
- 4. Expected use cases (please describe in as much detail as possible):
8. **Data Security and Ethical Use Plan:**
- (Please describe your plans for data protection and ethical use.)
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("davidkim205/exchange-price")
model = AutoModelForCausalLM.from_pretrained(
"davidkim205/exchange-price",
device_map="auto",
torch_dtype=torch.bfloat16,
)
text="""{오늘 날짜는 2025-01-08 수요일이다.
데이터와 뉴스를 바탕으로 2025-01-09 목요일의 USD 환율 변동을 예측하시오.
가장 최근 뉴스와 데이터에 집중하세요. CSV 형식으로 date,Open,High,Low,Close column으로 예측 결과를 제공하시오.
## USD 환율
date,name,Open,High,Low,Close
2025-01-08,USD,1450.52,1463.49,1448.21,1462.0
2025-01-07,USD,1458.77,1465.07,1444.09,1450.52
2025-01-06,USD,1468.35,1474.36,1453.78,1458.77
2025-01-03,USD,1468.98,1473.9,1463.35,1469.76
2025-01-02,USD,1476.76,1476.76,1462.45,1468.98
## KOSPI 데이터
date,name,Open,High,Low,Close,Volume
2025-01-08,KOSPI,2481.25,2526.77,2481.25,2526.1,326533
2025-01-07,KOSPI,2513.49,2521.86,2481.25,2481.25,373148
2025-01-06,KOSPI,2453.3,2513.49,2446.82,2513.49,254708
2025-01-03,KOSPI,2402.58,2454.67,2402.58,2443.24,380098
2025-01-02,KOSPI,2400.87,2410.99,2386.84,2402.58,310413
## S&P500 데이터
date,name,Open,High,Low,Close,Volume
2025-01-08,S&P500,5951.0,5959.55,5882.64,5887.82,1994316874
2025-01-07,S&P500,6012.66,6021.04,5942.8,5951.0,2045970603
2025-01-06,S&P500,5982.81,6013.59,5982.81,6012.66,444484907
2025-01-03,S&P500,5902.2,5918.03,5829.53,5905.42,1681352286
2025-01-02,S&P500,5903.26,5935.09,5886.67,5902.2,338398952
## Gold 데이터
date,name,Open,High,Low,Close,Volume
2025-01-08,Gold,2672.0,2683.9,2653.8,2677.1,150403
2025-01-07,Gold,2643.4,2678.5,2641.2,2672.0,132699
2025-01-06,Gold,2652.8,2663.8,2624.6,2643.4,119883
2025-01-03,Gold,2660.8,2681.0,2657.0,2661.6,131339
2025-01-02,Gold,2645.8,2664.9,2642.6,2660.8,67742
## Oil 데이터
date,name,Open,High,Low,Close,Volume
2025-01-08,Oil,77.03,77.89,76.62,77.16,40416
2025-01-07,Oil,77.4,77.5,75.92,77.03,43538
2025-01-06,Oil,76.59,77.4,76.08,77.4,24683
2025-01-03,Oil,76.25,76.54,75.53,76.19,36625
2025-01-02,Oil,74.87,76.27,74.73,76.25,19631
## 2025-01-08 뉴스
1. 미국 경제 지표가 안정적인 고용 시장과 강한 서비스 부문을 보여주며 달러 강세.
2. 호주 달러가 미국 달러에 비해 약세를 보였으나 금리에 큰 영향은 없을 것으로 전망.
3. 미국 달러 가치가 2.8395 라리를 기록하며 조지아 환율 상승.
4. 베트남에서 미국 달러 기준 환율이 소폭 하락(24330 VND/USD).
5. 1월 8일 기준, USD/VND 환율 상승, EUR 약세 지속.
1. **원유 가격 상승**: 러시아와 이란의 공급 감소 우려 및 중국의 수요 증가 기대감으로 유가 상승.
2. **중국 항구 제재 소식**: 중국 산둥항이 제재 선박 금지 발표 후 원유 선물 가격 반등.
3. **3주 최고치 기록**: 공급 차질 우려와 수요 증가로 유가 3주 최고치 기록.
4. **엑손모빌 손실 예상**: 엑손모빌, 유가 하락으로 약 7억 달러 손실 예상.
5. **미국 재고 감소 영향**: 미국 원유 재고 감소, OPEC 생산 감소, 중국 제재로 인해 원유 선물 상승.
## 2025-01-07 뉴스
- **중국 위안화 환율 방어:** 중국 중앙은행은 2025년에 위안화 가치 하락을 방지하기 위해 강력히 대처할 예정.
- **유로-달러 패리티:** 유로화와 미국 달러의 가치가 동일했던 마지막 시기는 2022년, 현재 다시 패리티 가능성 언급.
- **유로/달러 반등:** 유로/달러 환율이 최근 두 번째로 반등하며 1.0223 달러에서 상승.
8. 2025년 석유 공급 여유 전망으로 유가 하락.
9. 브렌트유와 WTI유 가격 차이 지속.
10. 유가, 공급 과잉 우려로 상승세 중단.
11. 난방유 선물 거래 증가.
## 2025-01-06 뉴스
- 미국 달러의 국제 준비 통화로서의 비중이 30년 만에 최저치를 기록하며, 중앙은행들이 다른 통화와 금에 집중하고 있음. 현재 추세대로라면 2034년까지 달러 비중이 50% 이하로 떨어질 가능성이 있음.
- 중국 인민은행(PBoC)이 달러 대비 위안화 환율을 시장 예상치(7.20)보다 낮은 7.1876으로 설정함.
- 우즈베키스탄에서 상업은행들의 달러 판매 환율이 처음으로 13,000 UZS를 초과함.
- 원-달러 환율은 위안화 약세의 영향으로 소폭 상승하며 1469.7원으로 마감.
- 스위스 프랑-달러 환율은 1월 5일 기준 0.91로 유지됨.
9. **난방유 수요에도 하락**: 난방유 수요 증가 전망에도 유가 하락, 중국 경제 움직임 변수.
10. **오늘 유가 전망**: 배럴당 $74.13 이하 약세, $74.33 이상 강세.
11. **팜유 가격 상승**: 말레이시아 팜유는 수요 증가와 유리한 환율로 인해 상승.
12. **대두 선물 개요**: 대두 선물은 가격 변동을 예측하거나 헤징하기 위한 유동성 높은 도구.
## 2025-01-05 뉴스
1. **이라크 바그다드·에르빌**: 미 달러 환율 하락.
2. **유로/달러**: 3일간 하락세 멈추며 RSI 과매도 영역 진입 방지.
3. **방글라데시 타카**: 7개월 만에 미 달러 대비 가치 하락.
4. **파키스탄 루피**: 달러 환율 변동이 경제와 시민 생활에 영향.
5. **짐바브웨**: 산업 협회, 환율·물가 안정 지속 가능성 확신.
4. 지난주 브렌트유 3.1% 상승, 기술적 분석으로 추가 상승 가능성 언급.
5. 중국 정책 지원과 겨울 날씨로 원유가 주간 상승.
6. 노르웨이, 재생에너지 목표에도 2025년까지 석유 및 가스 투자 최고치 전망.
7. WTI 원유 선물, 두 달 최고치 근처에서 거래, 2주 연속 상승.
## 2025-01-04 뉴스
1. **아르메니아 중앙은행**: 1월 3일 기준, 미국 달러 환율은 396.90 드람으로 0.34 드람 상승.
2. **쿠바 달러 환율**: 비공식 시장에서 달러 상승, 유로는 안정적.
3. **뉴질랜드 달러(NZD/USD)**: 환율이 5주 연속 하락해 2022년 10월 이후 최저치 기록.
4. **파운드/달러(GPD/USD)**: 2025년 첫 거래일에 8개월 만의 최저치 기록.
1. **2024년 유럽 전력 시장:** 유럽 주요 전력 시장에서 재생에너지 발전과 가스 가격 하락으로 인해 전력 가격이 2021년 이후 최저 수준을 기록함.
2. **원유 가격 상승:** 유럽과 미국의 추운 날씨 및 중국의 경제 부양책이 원유 가격 상승에 기여, 원유 선물은 배럴당 $73.96로 상승.
3. **아시아 수요와 안정:** 중동과 우크라이나 갈등 속에서도 아시아의 글로벌 석유 수요가 유지되며 시장 안정에 영향.
4. **비철금속 가격 하락:** 런던금속거래소(LME)에서 아연을 포함한 비철금속 가격이 하락세를 보임.
## 2025-01-03 뉴스
1. 원-달러 환율이 1,500원에 근접하며 국내외 요인으로 인해 상승세 분석.
2. 호주 달러 하락, 중국 경제 약세와 미국 관세 인상이 주요 원인.
3. 2025년 초 EUR/USD가 하락, 1.0250 수준 기록.
4. 미국 달러, 2025 첫 거래일에서 2년 만의 최고치 경신, 미국 성장 기대.
5. VND/USD 환율, 2024년 내내 변동하다 연말 사상 최고치 기록.
- 북극 한파 예보로 인해 유럽과 미국 에너지 수요 증가, 원유 및 난방유 가격 상승.
- 이란과 러시아에서의 원유 공급 감소로 중동산 원유 가격 상승.
- 미국 원유 재고 감소폭 예상보다 적음.
- 중국 정책 지원 기대감으로 원유 가격 주간 상승 지속.
- 말레이시아 팜유 가격 하락 및 인도네시아 바이오디젤 계획 지연으로 시장 불안.
## 2025-01-02 뉴스
1. **유로-폴란드 즈워티 환율 변화**: 2014년 2월부터 2024년 12월까지 유럽중앙은행 데이터에 따르면, 매월 유로-폴란드 즈워티 환율이 변동했다는 내용.
2. **아시아 주식 시장 하락**: 새해 연휴로 도쿄 증시는 휴장했지만, 정책 변화 우려로 아시아 주요 주식 시장이 전반적으로 하락했다.
3. **환율 1,500원 시대**: 국내 정치 불확실성과 트럼프 재선 가능성 등 외부 요인으로 강달러 흐름이 본격화되며 원/달러 환율이 1,500원에 근접하고 있음.
1. 새해 첫 거래일, 원/달러 환율이 하락하며 원화 가치가 상승하지만, 코스피는 2400선을 돌파하지 못함.
2. 환율은 국민연금의 환헤지 물량 영향으로 안정세를 보일 가능성이 있음.
3. 3일 원/달러 환율은 상승하며 1469.5원으로 출발, 달러 강세 지속되는 분위기.
4. 코스피는 불확실성 속에 새해 첫 거래일 하락 마감.
9. **미국 경제 상황**: 미국 첫 경제 지표 양호, 불황 우려 해소했으나 트럼프 정책이 향후 변수가 될 가능성.
- 금 선물 가격, 현물 수요 증가로 상승 \n- 금 가격, 달러 약세로 소폭 상승
- 말레이시아 파생상품 거래소 금 선물, 연초 첫 거래일 상승 마감
- 석유 선물 시장, 휴가 후 거래 재개로 전망 개선 가능성
- 2025년 첫 거래일, 중국과 미국의 경제 호조로 석유 가격 상승
- 금과 WTI 원유, 재고 감소로 새해 긍정적 시작
}"""
messages = [
{"role": "user", "content": text},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
date,Open,High,Low,Close
2025-01-09,1462.0,1463.51,1450.3,1453.21
Evaluation
Ranking
Ranking refers to the process of listing multiple values to assess their relative magnitude. During January 2025, the accuracy of the High and Low values predicted by other banks and Exchange-Price for USD exchange rates was calculated to determine rankings. The accuracy for High and Low values was determined by calculating the average MAPE (Mean Absolute Percentage Error) for each and using it to rank the predictions. MAPE calculates the average error between the predicted and actual exchange rates as a percentage, where a lower value indicates higher prediction accuracy.
USD Currency
The Rank
column represents the accuracy ranking of each Site
based on MAPE values. The Site
column lists the names of various banking sites providing exchange rate predictions. The Time
column indicates the prediction period, specifying the timeframe for which the exchange rate was forecasted. The USD MAPE(high, low)
column represents the average MAPE for USD predictions over January 2025, calculated as the mean of the MAPE for High and Low values.
Rank | Site | Time | USD MAPE(high,low) |
---|---|---|---|
1 | KEB Hana Bank | 09-26 | 0.24 |
2 | Korea Trade Insurance Corp. | 09-26 | 0.25 |
3 | Exchange-Price | 00-24 | 0.26 |
4 | Woori Bank | 09-26 | 0.27 |
4 | Shinhan Bank | 09-26 | 0.27 |
6 | iM Bank | 09-26 | 0.30 |
6 | KOOKMIN BANK | 09-26 | 0.30 |
Global Currency
Among existing banks, only one provides exchange rate predictions for global currencies against KRW, while most banks either do not offer predictions for global currencies or only provide USD-based exchange rate predictions. Therefore, to evaluate the USD-based exchange rate predictions, the following formula was used to convert the previous day's closing price into KRW-based exchange rates and collect the predicted values.
EUR/USD => 1 EUR per USD (prediction unit provided by the bank)
USD/JPY => 1 USD per JPY (prediction unit provided by the bank)
USD/KRW => Previous day's closing price (actual exchange rate)
1. (USD / EUR) * (KRW / USD) = KRW / EUR = (1 EUR per KRW)
2. (KRW / USD) / (JPY / USD) = KRW / JPY = (1 JPY per KRW)
The Rank
column represents the accuracy ranking of each Site
based on MAPE values. The Site
column lists the names of various banking sites providing exchange rate predictions. The Time
column indicates the prediction period, specifying the timeframe for which the exchange rate was forecasted. The EUR MAPE(high, low)
column represents the average MAPE for EUR predictions over January 2025, calculated as the mean of the MAPE for High and Low values. The JPY MAPE(high, low)
column represents the average MAPE for JPY predictions over January 2025, calculated as the mean of the MAPE for High and Low values.
Rank | Site | Time | EUR MAPE(high,low) | JPY MAPE(high,low) |
---|---|---|---|---|
1 | Exchange-Price | 00-24 | 0.20 | 0.32 |
2 | iM Bank | 09-26 | 0.36 | 0.52 |
3 | KOOKMIN BANK | 09-26 | 0.33 | 0.58 |
4 | KEB Hana Bank | 09-26 | 0.45 | 0.61 |
5 | Shinhan Bank | 09-26 | 0.52 | 0.63 |
- | Woori Bank | - | Not provided | Not provided |
- | Korea Trade Insurance Corp. | - | Not provided | Not provided |
- Downloads last month
- 19