6월, 2022의 게시물 표시

증권사 - 배당주 투자 일기, 2022. 06. 26(일)

이미지
변경 사항  - 환율 추가  - PBR 추가 악재: 경기 침체로 인한 주식 투자 거래 감소 호재: 증권거래세 0.23% -> 0.20% 가능성 있음(단타에 유리) 신기한 점은 대신증권2우B는 보통주와 배당금이 동일 대신증권우만 50원 더 주기에 배당률이 제일 높게 예상됨 대부분의 증권사가 연말배당을 한 다는 것은 아쉬운 점

Python, [1, 2, 3, 5, 7, 11, 13, 17, 19, 23]에서 합이 15가 되는 조합

arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23] a = 15 for i in range(len(arr)):     for j in range(i+1, len(arr)):         if arr[i] + arr[j] == a:             print(arr[i], arr[j])         elif arr[i] + arr[j] < a:             for k in range(j+1, len(arr)):                 if arr[i] + arr[j] + arr[k] == a:                     print(arr[i], arr[j], arr[k])                 elif arr[i] + arr[j] + arr[k] < a:                     for l in range(k+1, len(arr)):                         if arr[i] + arr[j] + arr[k] + arr[l] == a:                             print(arr[i], arr[j], ar...

효성 - 배당주 투자 일기, 2022. 06. 25(토)

이미지
드디어 효성이 8만원 밑으로 내려왔네. 기관은 한 달 동안 매수하고 있고, 외인은 2주 동안 매도하고 있고, 나는 8만원 밑으로 오길 기다리고 있고, 월요일 외인이 매수로 돌아서면 나도 분할매수 고고~

Excel VBA, Web Crolling, 주가 가져오기 v3

Sub stock_v3() 'v1 today stock price 'v2 timer 'v3 exchange rate          Dim ie As InternetExplorer     Dim strURL As String     Dim i As Integer     Dim start_time As Single     Dim end_time As Single          start_time = Timer          Range(Range("D3"), Range("D3").End(xlDown)).ClearContents     For i = 3 To Range("C1000").End(xlUp).Row              Set ie = CreateObject("InternetExplorer.application")         strURL = "https://finance.naver.com/item/coinfo.nhn?code=" & Range("C" & i)         ie.Navigate strURL         ie.Visible = False         Do While (ie.ReadyState <> READYSTATE_COMPLETE Or ie.Busy = True)             DoEvents         Loop         Application....

은행주 - 배당주 투자 일기, 2022. 06. 21(화)

이미지
은행주들이 배당률이 좋음 근데 왜 사고 싶다는 생각은 안들지? 금리도 올라가고 있는데~ 좀 더 세부 분석을 해 봐야겠음 

삼성전자 주가에 대한 나의 생각, 2022.06.20(월)

이미지
위의 2개의 그래프로 추정을 해보면, 맨 아래 선 교차점인 46,000 ~ 48,000원에서 반등하지 않을까 생각됨 이미지 출처: 네이버 금융

증권사 - 배당주 투자 일기, 2022. 06. 20(월)

이미지
부국증권만 '22년 예상 배당금 정보가 없어 '21년 배당금으로 기재 증권사 배당률도 나쁘지 않네 악재: 경기 침체로 인한 주식 투자 거래 감소 호재: 증권거래세 0.23% -> 0.20% 가능성 있음 세금 0.03% 낮아진다고 해서 주식 거래량 얼마나 늘어나겠어. 단타 치시는 분들에게는 상당히 호재일 듯 지속 update 중이라 오타 및 잘못된 정보 많음 확실히 여윳돈으로 배당 투자를 하니 하락장에도 마음이 편함 

Excel VBA, Stock Web Crolling from Naver, version 2

Sub stock_v2()     Dim ie As InternetExplorer     Dim strURL As String     Dim i As Integer     Dim start_time As Single     Dim end_time As Single          start_time = Timer  '시작 시각          Range(Range("D3"), Range("D3").End(xlDown)).ClearContents     For i = 3 To Range("C1000").End(xlUp).Row         Set ie = CreateObject("InternetExplorer.application")         strURL = "https://finance.naver.com/item/coinfo.nhn?code=" & Range("C" & i)         ie.Navigate strURL         ie.Visible = False         Do While (ie.ReadyState <> READYSTATE_COMPLETE Or ie.Busy = True)             DoEvents         Loop         Application.Wait (Now + TimeValue("00:00:01"))  '1초 대기         R...

Reitz - 배당주 투자 일기, 2022. 06. 19(일)

이미지
요즘 상가투자 절대 하지 말라는데~ 차라리 리츠 투자도 나쁘지 않을 거 같음 우리 동네만 봐도 임대 붙여 논 게 상가가 엄청 많음 에이리츠 - 매출 떨어졌음 매력적이지 않음 코람코에너지리츠 - 좋아 보임 정보를 계속 모으는 중이라 뭐라 결론 짓기 뭐하지만~ 맥쿼리인프라 - 기름값 비싸면 사람들이 고속도로 덜 탈 거라 생각됨 신한서부티앤디리츠 - 대통령 집무실까지 2km인데 영향이 있는지 모르겠음

Excel VBA, Exchange rate(환율), Web Crolling Naver

이미지
Sub exchange_rate()     Dim ie              As InternetExplorer     Dim strURL        As String     Set ie = CreateObject("InternetExplorer.application")     strURL = "https://search.naver.com/search.naver?where=nexearch&sm=top_hty&fbm=1&ie=utf8&query=%ED%99%98%EC%9C%A8"     ie.navigate strURL     ie.Visible = False     Do While (ie.readyState <> READYSTATE_COMPLETE Or ie.Busy = True)         DoEvents     Loop     MsgBox ie.document.getElementsByTagName("strong")(16).innerText     ie.Quit     Set ie = Nothing End Sub

배당주 투자 일기, 2022. 06. 18(토)

이미지
오타 수정  - HD현대 반기배당주(1년에 2번 배당)인데 분기로 표시되어 있어서 수정했음 역시 회식 있는 날은 투자 일기 쓰기 어렵네요! 주가는 또 내려가서 6% 이상 배당수익률 종목 증가(8개)  - HD현대 배당락일까지 기다리자  - 근데 돈이 없다.  - 효성아 80,000원 딱 한 번만 찍자~  - POSCO, 삼성전자우 물타기 했음  - 코오롱인더우 괴리율 매우 큼  - 환율, 유가 추가했음(왼쪽 맨 위에)

Python, 순열(Permutation)과 조합(Combination)

1, 2, 3, 4번의 카드 중 2개를 뽑아 나열하는 경우의 수 # 순열(Permutation) - 순서 고려 case=0 for i in range(1, 5):     for j in range(1, 5):         if i != j:             print(i, j)             case+=1 print("total:", case)   # total: 12 #1 2 #1 3 #1 4 #2 1 #2 3 #2 4 #3 1 #3 2 #3 4 #4 1 #4 2 #4 3 # 조합(Combination) - 순서 고려하지 않음 case=0 for i in range(1, 5):     for j in range(i+1, 5):         print(i, j)         case+=1 print("total:", case)   # totla: 6 #1 2 #1 3 #1 4 #2 3 #2 4 #3 4

배당주 투자 일기, 2022. 06. 14(화)

이미지
오늘도 주가는 또 내려갔군! 주가 내려가니 배당률은 계속 오르고 있네 효성만 주가가 안 떨어졌네! 효성아 80,000원 한 번 찍자~ 유가, WTI(서부텍사스유)가 120달러 찍었네 HD현대(전 현대중공업지주) 추가, 현대오일뱅크 돈 많이 벌겠네. 미국 금리인상 발표가 내일 모래. 이번 주 들어가자~ 효성, POSCO~ HD현대는 배당락일 이후에 들어가야겠음

순열(Permutation)과 조합(Combination)의 개념

이미지
  이제 파이썬으로 구현해보자

배당주 투자 일기, 2022. 06. 13(월)

이미지
내가 관리하는 배당주 중 6%이상만 골랐음. 오늘 주가 대부분 하락 마감하니 배당 수익률 6%대 이상 종목들이 늘어났네~ 효성 좋아 보이는데 과거 4개 년도를 보면,  시가배당률 6%대 맞춰주는 경향을 보임. 주가가 연말까지 83,000원을 유지한다면,  6,500원이 아니라 5,500원을 줄 수도 있다고 생각됨. 효성 재무제표 분석 한 번 해야겠음.

Python, 숫자 1, 2, 3, 4이 표시되어 있는 4장의 카드를 나열하는 경우의 수(순서 고려)

# 총 24 가지(4! = 4 x 3 x 2 x 1 = 24) case=0 for i in range(1, 5):     for j in range(1, 5):         for k in range(1, 5):             for l in range(1, 5):                 if i!=j and i!=k and i!=l and j!=k and j!=l and k!=l:                     case+=1                     print(i, j, k, l) print("total:", case) # 1 2 3 4 # 1 2 4 3 # 1 3 2 4 # 1 3 4 2 # 1 4 2 3 # 1 4 3 2 # 2 1 3 4 # 2 1 4 3 # 2 3 1 4 # 2 3 4 1 # 2 4 1 3 # 2 4 3 1 # 3 1 2 4 # 3 1 4 2 # 3 2 1 4 # 3 2 4 1 # 3 4 1 2 # 3 4 2 1 # 4 1 2 3 # 4 1 3 2 # 4 2 1 3 # 4 2 3 1 # 4 3 1 2 # 4 3 2 1 # total: 24

배당주 투자 일기, 2022. 06. 12(일)

이미지
현재 6월 중반이니 반기배당주 점검 사고싶어도 돈이 없네 ㅠㅠ

Python, trunc(), int(), ceil(), floor()

이미지
# trunc() - for 0 import math print(math.trunc(1.234))    #1 print(math.trunc(-1.234))   #-1 # int() - for 0 print(int(1.234))     #1 print(int(-1.234))    #-1 # floor() - for minus import math print(math.floor(1.234))    #1 print(math.floor(-1.234))   #-2 # ceil() - for plus import math print(math.ceil(1.234))     #2 print(math.ceil(-1.234))    #-1

Python, round()

 # round() print(round(1.2))       # 1 print(round(1.2, 0))    # 1.0 print(round(1.2, 1))    # 1.2 print(round(1.2, 2))    # 1.2 print(round(1.7))       # 2 print(round(1.7, 0))    # 2.0 print(round(1.7, 1))    # 1.7 print(round(1.7, 2))    # 1.7 print(round(1.234567))       # 1 print(round(1.234567, 0))    # 1.0 print(round(1.234567, 1))    # 1.2 print(round(1.234567, 2))    # 1.23 print(round(1.234567, 3))    # 1.235

Python, 2 plots in 1 window

이미지
import matplotlib.pyplot as plt import numpy as np xAxis = np.linspace(-10, 10, 100) yAxis_1 = np.sin(xAxis) yAxis_2 = np.sin(xAxis)+1 plt.plot(xAxis, yAxis_1, xAxis, yAxis_2) plt.show()

Excel VBA, Timer

Sub timerBasics()     Dim current_time As Single              current_time = Timer     MsgBox current_time                ' elapsed second from 00:00:00     MsgBox current_time / 60         ' elapsed minute from 00:00:00     MsgBox current_time / 3600      ' elapsed hour from 00:00:00      End Sub

배당주 투자 일기, 2022. 06. 11(토)

이미지
내 라이브러리에서 배당수익률 5%이상 예상되는 종목 9개 아~ 오타 및 잘못된 정보가 많네~

Python, for i in list, for i in str

my_list = ["a", "pp", "l", "e"] my_str = "apple"   for i in my_list:     print(i) #a #pp #l #e for i in my_str:     print(i) #a #p #p #l #e

Excel VBA, Split()

Option Base 1 Sub test()     Dim fruit As Variant          fruit  = Split("apple,banana,cranberry,grape,orange", ",")     MsgBox fruit(0)     'apple     MsgBox fruit(1)     'banana     MsgBox fruit(2)     'cranberry     MsgBox fruit(3)     'grape     MsgBox fruit(4)     'orange ' Regardless of Option Base 1, it starts 0 ' Split - Variant End Sub

Python, in the case of a def has 2 returns

def func(a, b):     return a+b     return a-b print(func(4, 2)) # 6 # not 6 2 # Even if a function has 2 returns, we only get the first one. # And the function processing ends after the first return. 

Excel VBA, Trim(), LTrim(), RTrim(), Application.Trim()

 Sub test()     MsgBox Trim("   apple   ")     'apple     MsgBox LTrim("   apple   ")     'apple        MsgBox RTrim("   apple   ")     '   apple     MsgBox Trim("a   pple")     'a   pple     MsgBox Application.Trim("a   pple")     'a pple 'Spaces contained in a string are removed. 'However, spaces in middle of the string are left only one space.          End Sub