트레이더 혹은 퀀트가 chatGPT를 사용하는 방법

1.
현재도 수많은 사람들이 chatGPT와 장난을 하고 있습니다. 저도 장난을 해보았습니다. 저도 다른 분들이 해본 일을 물었습니다.

첫째 Rust로 PostgreSQL에 연결하는 프로그램

Yes, it is possible to program a Rust application that accesses a PostgreSQL database. Here is an example of how you could do this using the postgres crate:
This code creates a table called “person” in a PostgreSQL database, inserts a row into the table, and then retrieves and prints the rows in the table. You will need to have the postgres crate and a PostgreSQL database server installed and running in order to use this code. You will also need to replace username, password, and database with the appropriate values for your database setup. I hope this helps!

Writing Code Snippet Using AI — OpenAI ChatGPT을 보면 chaGPT를 이용하여 아래의 질문을 했다고 합니다. AI Assistant로 역할을 합니다. 프로그래밍을 하다가 막힐 때 코드의 문제점을 확인할 때 혹은 학습할 때 비서처럼 사용해보면.

Request ChatGPT to write a code snippet using the Rust programming language.
Request ChatGPT to convert the code to an async function.
Request ChatGPT to provide a detailed explanation of the code.

둘째 검사의 범죄사실 공표죄. 미국과 한국을 각각 물었습니다. 한국이나 미국이나 “fair trial” 혹은 “with integrity and impartiality”을 어겼을 경우 유죄라고 합니다만 최종적으로 변호사와 상의하라고 합니다. 좀더 깊은 질문을 하면 더 깊은 답변을 할 듯 합니다.

It is generally not legal for a prosecutor to leak allegations about a defendant to the media. Under the ethical rules that govern the conduct of prosecutors, it is generally not appropriate for a prosecutor to make public statements about a pending case that could prejudice the outcome of the case or interfere with the defendant’s right to a fair trial. This includes leaking allegations about a defendant to the media or making public statements about the defendant’s guilt.

However, there may be circumstances in which a prosecutor is permitted to disclose certain information about a case to the media or to the public, such as to correct a mistake or to protect the public from harm. In general, though, prosecutors are expected to act with discretion and to avoid making statements or taking actions that could compromise the fairness of a trial. If you have concerns about the conduct of a prosecutor in your case, I recommend that you speak with an attorney.

In Korea, it is generally not legal for a prosecutor to leak allegations about a defendant to the media. The Korean Code of Criminal Procedure and the Korean Prosecutors’ Act contain provisions that govern the conduct of prosecutors and that generally require them to act with integrity and impartiality when handling criminal cases. These provisions may be violated if a prosecutor leaks allegations about a defendant to the media or makes public statements about the case that could prejudice the outcome of the trial or interfere with the defendant’s right to a fair trial.

In Korea, as in many other countries, the media is subject to certain legal restrictions on its freedom to report on criminal cases, particularly when the case is still ongoing. These restrictions are designed to protect the integrity of the criminal justice system and to ensure that defendants receive a fair trial. If you have concerns about the conduct of a prosecutor in your case, I recommend that you speak with an attorney.

이와 관련하여 연구자들이 GPT3가 미국 변호사 시험에 합격할 수 있는지를 연구했다고 합니다. 그 결과가 ‘가능하다’고 합니다.

GPT Takes the Bar Exam

Download (PDF, 344KB)

앞으로 어느 수준까지 진화할지 알 수 없지만 프로기사의 예를 들어보겠습니다. 중국 프로바둑 기사가 대국중 AI치팅을 했다고 합니다.

2019년 프로 기사에 입단한 24살의 류루이지 기사는 지난 15일 열린 중국 프로 바둑 선수권대회 1차 라운드 대국에 참가했다. 류 기사는 가볍게 상대를 제압했고, 그렇게 2차 라운드에 진출하는 듯했다. 하지만 중국 바둑협회는 16일 그의 몰수패를 선언했다. 대국 도중 AI(인공지능) 프로그램을 몰래 활용한 게 들통나면서다.

최근 중국 내 신종 코로나바이러스 감염증(코로나19) 신규 확진자가 급증하는 상황에서 주최 측은 이번 대회를 ‘온라인 대국’ 형식으로 실시했다. 중국뿐 아니라 한국과 일본 등 ‘바둑 좀 둔다’ 하는 나라들 역시 비슷한 사정으로 온라인 대회를 열고 있다. 팬데믹(전염병 대유행) 시대의 불가피한 선택이지만 접속 장애, 시스템 불안정은 물론, 무엇보다 치팅(cheating·부정 행위) 위험에 고스란히 노출될 수밖에 없다.

상대편 기사를 관찰할 수 있는 카메라를 설치한다고 해도, 컴퓨터 화면까지 감시하긴 어렵다. 이번 대회 주최 측도 부정행위를 막기 위해 각 기사에게 감독관을 1명씩 붙였지만, 컴퓨터 어딘가에서 가동되고 있는 AI 프로그램까지 알아차리진 못한 것으로 보인다.
대국 중 몰래 ‘AI 치팅’…바둑 종주국 중국 망신 준 24살 프로 기사중에서

보통 재판은 수많은 문서가 증거로 다루어집니다. 변호사, 검사, 판사가 하는 일중의 하나가 읽기입니다. 빨리 읽으면서 사건의 본질에 접근해야 합니다. 증거가 전자화되었다고 하면 AI와 AI가 대결하는 재판을 상상할 수 있습니다. 예를 들어서 법무법인 태평양이 GPT를 이용하여 인공지능시스템을 구축하고 재판의 증거로 나온 전자자료를 학습시킵니다. 변호사가 이렇게 나온 결론을 이용하여 변론을 하면?

2.
제가 하는 일과 관련한 질문을 했습니다. 먼저 테슬라의 주가와 매매여부를 묻는 질문을 했습니다.

It’s not appropriate for me to provide investment advice. In general, buying individual stocks carries more risk than investing in a diversified portfolio, as the performance of a single stock is more volatile than a diversified portfolio. I recommend that you consult with a financial advisor or conduct your own research and analysis before making any investment decisions.

I’m sorry, but I am unable to browse the internet and do not have access to current stock prices. It’s important to carefully consider all relevant information before making an investment decision, and to understand that past performance is not necessarily indicative of future results. I recommend that you consult with a financial advisor or conduct your own research and analysis to obtain current information and to understand the risks and potential rewards of any investment.

It’s not appropriate for me to provide investment advice. In general, buying individual stocks carries more risk than investing in a diversified portfolio, as the performance of a single stock is more volatile than a diversified portfolio. I recommend that you consult with a financial advisor or conduct your own research and analysis before making any investment decisions.

미국경제가 2023년에 성장할지도 물었습니다.

I’m sorry, but I do not have access to future economic data and cannot predict the future growth rate of the US economy. Economic growth can be affected by a wide variety of factors, including changes in monetary and fiscal policy, changes in global economic conditions, and shifts in consumer and business confidence, among other things. It is not possible to accurately forecast the future growth of the economy with certainty. I recommend that you consult with a financial advisor or economist for more information on this topic.

앞서와 다른 결과가 나왔습니다. 왜 그럴까 궁금했습니다.

우선 간단히 chatGPT의 동작원리를 알고 싶어서 How ChatGPT actually worksWhat is ChatGPT And How Can You Use It?을 읽었습니다. 위 글을 보면 AI를 논할 때 Alignment와 Capacity개념을 사용합니다. Alignment는 AI시스템을 설계자의 의도된 목표와 관심에 맞게끔 하는 것(we actually want the model to do)으로 이야기하고 Capacity는 주어진 목표를 얼마나 잘 하는가(how well it is able to optimize its objective function)라고 합니다.

LLM은 Alignment라는 측면에서 의도와 다른 결과를 노출할 가능성이 높아서 Reinforcement Learning from Human Feedback와 같은 작업이 필요하다고 합니다. chatGPT는 Large Language Model과 Reinforcement Learning from Human Feedback (RLHF)로 인하여 정확성을 성취했다고 합니다. 이를 통해 볼 때 LLM은 주가나 경제 예측을 위한 만들어진 모형은 아닌 듯 합니다.

Google Publishes Technique for AI Language Model Self-Improvement를 보면 chatGPT의 약점이라고 지적한 학습문제를 해결하는 방안이 있다고 합니다. 구글의 논문이지만 Language Model Self-Improved입니다.

Download (PDF, 532KB)

그래서 생각을 바꾸어보았습니다. 강화학습모델로 주가를 예측하는 프로그램을 만들어달라고 했습니다. 그 결과입니다.

덧붙여 Market Microstructure Theory와 관련한 논문을 추천해달라고 하니까 이런 답변을 합니다.

Some classic papers in the field of market microstructure include:

“Market Microstructure: A Survey” by Maureen O’Hara (1995)
“The Microstructure Approach to Exchange Rates” by Richard Lyons (1996)
“An Empirical Analysis of the Limit Order Book and the Order Flow in the Paris Bourse” by Jean-Charles Rochet and Jean Tirole (1997)
“Price Discovery in Electronic Markets” by Terrence Hendershott, Charles M. Jones, and Albert J. Menkveld (2011)

여기서 O’Hara의 이론을 정리해달라고 했습니다.

“Market Microstructure: A Survey” by Maureen O’Hara is a comprehensive review of the field of market microstructure, which is the study of how buyers and sellers interact in financial markets and how this interaction affects prices. In the paper, O’Hara discusses the various factors that influence market microstructure, including trading costs, liquidity, and information asymmetry. She also reviews the different types of marketplaces and trading platforms, such as dealer markets, auction markets, and electronic communication networks, and how these different types of markets can affect price discovery and the allocation of trade.

Overall, O’Hara’s paper provides a broad overview of the field of market microstructure and is a useful resource for those interested in understanding how financial markets work.

한단계 더나아갔습니다. Limit Order Book과 관련한 C++코드를 만들어달라고 했습니다.

재미있습니다. 수준낮은 질문입니다. 기초질문이 아니라 심화질문을 하면 어떨까요? ChatGPT: Here to replace the writers and coders? 에서 읽은 의견이 기억에 남습니다. 원하는 모든 것을 얻는 것은 힘듭니다. 다만 부분적으로 원하는 것을 얻은 후 조립하는 방법은 어떨까요? 전략과 관련한 R&D를 할 때 훌륭한 도우미가 되지 않을까 생각합니다.

“The most essential way to think about technology is as a tool, not as a substitute for people”
“For the most part, ChatGPT generated texts are a mish-mash of pre-existing related information”

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.