tomatophobia / allowance-chart

다수의 증권 계좌로 구성된 포트폴리오 관리 서비스
1 stars 0 forks source link

계좌마다 수수료를 설정할 수 있다 #35

Closed tomatophobia closed 2 years ago

tomatophobia commented 2 years ago

Account 초기화 과정에서 수수료를 설정하였다.

  1. 수수료를 설정하기 전, 후로 PartialAccountState , FullAccountState 상태로 나누었음. 처음에 AccountStatus 필드를 넣으려 했는데 이는 실수로 패턴매칭을 빼먹는 실수를 저지를 수 있음. 그래서 반드시 패턴매칭을 강제하기 위해 AccountState 그 자체를 하위 타입으로 나누었음.
  2. diamond에서 이벤트 핸들 로직이 왜 AccountState에 있었는지 의문이 풀림. EventSourcedAccount에 있으면 패턴매칭을 일일이 해야 하기 때문에 AccountState로 옮기면 boilerplate가 많이 줄어듦.
tomatophobia commented 2 years ago

매수, 매도 수수료를 분리해야 한다.

tomatophobia commented 2 years ago

근데 생각해보니까 거래 비용은 증권사의 수수료 + 세금인데 이 때 세금이 증권사랑 관련 없고 시장과 관련이 있음. 지금 코스피, 미국 시장에 투자하고 있어서 수수료 계산할 때 결국 마켓에서 비롯되는 세금, 계좌에서 비롯되는 수수료를 분리해야 한다.

tomatophobia commented 2 years ago

https://m.help.naver.com/support/contents/contentsView.help?contentsNo=12203&lang=ko 해외주식 수수료, 세금 정리

국내주식은 증권거래세 내용이 나무위키에 정리되어 있음

tomatophobia commented 2 years ago

NH 나무 증권 수수료율:국내주식0.0043319%, ETF/ETN:0.004901%