Exchange
The Exchange model is built on Metaโs Llama 3.1 and developed using SFT (Supervised Fine-Tuning) and DPO (Direct Preference Optimization) techniques. It analyzes factors influencing exchange rates based on provided foreign exchange market data and generates reports predicting exchange rate movements. The model supports forecasts for major global currencies such as USD, JPY, and EUR, offering intuitive explanations that are easy to understand even for users without a financial background. A key differentiator of this system is its ability to provide insights into the uncertain future of foreign exchange trading, leveraging the capabilities of a large language model. Additionally, it effectively processes and analyzes complex financial data while integrating various unstructured data sources, enabling it to reflect real-time market changes for more accurate predictions.
Model Details
- model_url: https://huggingface.co/davidkim205/exchange
- 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")
model = AutoModelForCausalLM.from_pretrained(
"davidkim205/exchange",
device_map="auto",
torch_dtype=torch.bfloat16,
)
text="""{์ฃผ์ด์ง 2025-01-08 ์์์ผ๊น์ง์ ๊ฒฝ์ ์งํ์ ๋ด์ค์์, USD ํ์จ ๋ณ๋์ ์ ์๋ฏธํ ์ ํ ์งํ๋ก ์์ฉํ ์ ๋ณด๋ฅผ ์ฐพ์ ํจํด์ ๋ถ์ํ๊ณ , ์ด ๊ณผ์ ์์ ์ป์ ํต์ฐฐ์ ๋ฐํํ์ฌ 2025-01-09 ๋ชฉ์์ผ์ USD ํ์จ ๋ณ๋์ ์์ธกํ์ฌ๋ผ.
๋ถ์ ๋ฐ ์์ธก ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ธก ์์ฝ๋ฌธ์ ๋
ผ๋ฆฌ์ ์ผ๊ด์ฑ์ ๊ฐํํด๋ผ.
๊ฒฐ๊ณผ๋ ์๋ ํ์์ ๋ง์ถ์ด ์์ฑํ๋ค.
## ํ์
### ๋ถ์
1. {๊ตฌ์ฒด์ ํญ๋ชฉ}: {ํญ๋ชฉ์ ๋ํ ๊ฐ๋จํ ์ค๋ช
}
...
### ์์ธก
{๋ถ์ ๋ฐ ์์ธก ๊ฒฐ๊ณผ๋ฅผ ํ ๋ฌธ์ฅ์ผ๋ก ์์ฝ}
```csv
{์ ๋ต}
```
## 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
## 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
## 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
## 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-08 ๋ด์ค
1. ๋ฏธ๊ตญ ๊ฒฝ์ ์งํ๊ฐ ์์ ์ ์ธ ๊ณ ์ฉ ์์ฅ๊ณผ ๊ฐํ ์๋น์ค ๋ถ๋ฌธ์ ๋ณด์ฌ์ฃผ๋ฉฐ ๋ฌ๋ฌ ๊ฐ์ธ.
2. ํธ์ฃผ ๋ฌ๋ฌ๊ฐ ๋ฏธ๊ตญ ๋ฌ๋ฌ์ ๋นํด ์ฝ์ธ๋ฅผ ๋ณด์์ผ๋ ๊ธ๋ฆฌ์ ํฐ ์ํฅ์ ์์ ๊ฒ์ผ๋ก ์ ๋ง.
3. ๋ฏธ๊ตญ ๋ฌ๋ฌ ๊ฐ์น๊ฐ 2.8395 ๋ผ๋ฆฌ๋ฅผ ๊ธฐ๋กํ๋ฉฐ ์กฐ์ง์ ํ์จ ์์น.
## 2025-01-07 ๋ด์ค
- **์ค๊ตญ ์์ํ ํ์จ ๋ฐฉ์ด:** ์ค๊ตญ ์ค์์ํ์ 2025๋
์ ์์ํ ๊ฐ์น ํ๋ฝ์ ๋ฐฉ์งํ๊ธฐ ์ํด ๊ฐ๋ ฅํ ๋์ฒํ ์์ .
- **์ ๋ก-๋ฌ๋ฌ ํจ๋ฆฌํฐ:** ์ ๋กํ์ ๋ฏธ๊ตญ ๋ฌ๋ฌ์ ๊ฐ์น๊ฐ ๋์ผํ๋ ๋ง์ง๋ง ์๊ธฐ๋ 2022๋
, ํ์ฌ ๋ค์ ํจ๋ฆฌํฐ ๊ฐ๋ฅ์ฑ ์ธ๊ธ.
## 2025-01-06 ๋ด์ค
- ๋ฏธ๊ตญ ๋ฌ๋ฌ์ ๊ตญ์ ์ค๋น ํตํ๋ก์์ ๋น์ค์ด 30๋
๋ง์ ์ต์ ์น๋ฅผ ๊ธฐ๋กํ๋ฉฐ, ์ค์์ํ๋ค์ด ๋ค๋ฅธ ํตํ์ ๊ธ์ ์ง์คํ๊ณ ์์. ํ์ฌ ์ถ์ธ๋๋ก๋ผ๋ฉด 2034๋
๊น์ง ๋ฌ๋ฌ ๋น์ค์ด 50% ์ดํ๋ก ๋จ์ด์ง ๊ฐ๋ฅ์ฑ์ด ์์.
1. **ํ์ ๊ฐ๊ฒฉ ์์น**: ๋ง๋ ์ด์์ ํ์ ๋ ์์ ์ฆ๊ฐ์ ์ ๋ฆฌํ ํ์จ๋ก ์ธํด ์์น.
12. **๋๋ ์ ๋ฌผ ๊ฐ์**: ๋๋ ์ ๋ฌผ์ ๊ฐ๊ฒฉ ๋ณ๋์ ์์ธกํ๊ฑฐ๋ ํค์งํ๊ธฐ ์ํ ์ ๋์ฑ ๋์ ๋๊ตฌ. }"""
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]))
### ๋ถ์
1. **๋ฌ๋ฌ ๊ฐ์ธ ์ ์ง**: ๋ฏธ๊ตญ์ ๊ฒฝ์ ์งํ๊ฐ ๊ฐ์ธ๋ฅผ ์ ์งํ๊ณ ์์ผ๋ฉฐ, ์๋น์ค์
๋ฐ ๊ณ ์ฉ ์งํ๋ ํนํ ๊ธ์ ์ ์ธ ์ํฅ์ ๋ฏธ์ณค์ต๋๋ค. ์ด๋ ๋ฌ๋ฌ ๊ฐ์ธ๋ฅผ ๋ท๋ฐ์นจํ๋ ์ฃผ์ ์์ธ์
๋๋ค. ๋ํ, ๊ธ๋ก๋ฒ ์ฃผ์ ํตํ ๋๋น ๋ฌ๋ฌ์ ์๋์ ๊ฐ์ธ๊ฐ ์ง์๋๊ณ ์์ต๋๋ค.
2. **๊ตญ๋ด์ธ ๊ฒฝ์ ๋ถํ์ค์ฑ ํ๋**: ํ๊ตญ ์ ์น์ ๋ถ์๊ณผ ๊ตญ์ ์ ํธ๋ผํ ๊ด์ธ ์ ์ฑ
๋ณํ ๋ฑ์ด ์ํ ์ฝ์ธ๋ฅผ ์ฌํ์ํค๊ณ ์์ผ๋ฉฐ, ์ด๋ ํ์จ ์์น ์๋ ฅ์ผ๋ก ์์ฉํ๊ณ ์์ต๋๋ค. ํํธ, ๋ฏธ๊ตญ ๊ฒฝ์ ์ ์๋์ ์์ ์ฑ๊ณผ ์ฑ์ฅ ๊ธฐ๋๊ฐ์ด ๋ฌ๋ฌ ๊ฐ์น์ ์ถ๊ฐ์ ์ธ ์์น๋ ฅ์ ๋ถ์ฌํฉ๋๋ค.
3. **์ธ๊ตญ์ธ ํฌ์ ์ฆ๊ฐ ๋ฐ ์ฝ์คํผ ์์น**: ์ธ๊ตญ์ธ๊ณผ ๊ธฐ๊ด์ ๋งค์์ธ๊ฐ ์ฆ๊ฐํ๋ฉด์ ์ฝ์คํผ๋ ์์ ์ ์ธ ์์น์ธ๋ฅผ ์ ์งํ๊ณ ์์ต๋๋ค. ์ด๋ ํ์จ ํ๋ฝ ์๋ ฅ์ผ๋ก ์์ฉํ ๊ฐ๋ฅ์ฑ์ด ์์ต๋๋ค.
4. **์์ ์ ๊ธ ๊ฐ๊ฒฉ ์์น**: ๊ตญ์ ์์ ์ ๊ธ ๊ฐ๊ฒฉ์ด ์์น์ธ๋ฅผ ๋ณด์ด๋ฉฐ ์์ ์์ฐ์ผ๋ก์์ ํฌ์์ ์ ๋ขฐ๋๋ฅผ ํ๋ํ๊ณ ์์ต๋๋ค. ์ด๋ ๊ธ๋ก๋ฒ ๊ฒฝ์ ๋ถํ์ค์ฑ์ด ๋์์ง์ ๋ฐ๋ผ ์์ ์์ฐ ์ ํธ๊ฐ ๊ฐํ๋ ์์ธ์ผ๋ก ํด์๋ฉ๋๋ค.
### ์์ธก
2025๋
1์ 9์ผ USD ํ์จ์ ๋ฏธ๊ตญ ๊ฒฝ์ ์ ๊ฐํ ์งํ์ ๋ฌ๋ฌ ๊ฐ์ธ ํ๋ฆ, ๊ทธ๋ฆฌ๊ณ ๊ตญ๋ด์ธ ๋ถํ์ค์ฑ์ด ์์กดํ๋ ๊ฐ์ด๋ฐ, ๋ณ๋์ฑ์ด ์ ์ง๋ ๊ฐ๋ฅ์ฑ์ด ์์ต๋๋ค. ๋ค๋ง, ์ธ๊ตญ์ธ๊ณผ ๊ธฐ๊ด ํฌ์์๋ค์ ๋งค์์ธ์ ๊ตญ๋ด ํํค์ง ์์ง์์ด ํ์จ ํ๋ฝ ์์ธ์ ์ ๊ณตํ ๊ฒ์
๋๋ค. ์ด์ ๋ฐ๋ผ, USD/์ ํ์จ์ ์ ์ผ ์ข
๊ฐ(1462) ๋๋น ์ํญ ํ๋ฝ์ธ๋ฅผ ๋ณด์ด๋ฉฐ, ์ข
๊ฐ๊ฐ **1453.21์**์ ๋ง๊ฐํ ๊ฒ์ผ๋ก ์์ธก๋ฉ๋๋ค.
```csv
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 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 | Shinhan Bank | 09-26 | 0.27 |
3 | Woori Bank | 09-26 | 0.27 |
5 | KOOKMIN BANK | 09-26 | 0.30 |
5 | iM Bank | 09-26 | 0.30 |
7 | Exchange | 00-24 | 0.32 |
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 | 00-24 | 0.22 | 0.43 |
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
- 21