Lớp hàm FA.Historical
Tổng hợp 24 hàm FA.Historical để kéo dữ liệu giá, thanh khoản và giao dịch vào bảng tính.
- 🇻🇳 Tiếng Việt
- 🇬🇧 English
- 🇰🇷 한국어
- 🇨🇳 中文
Cú pháp
Biểu thức lấy thông tin giao dịch cổ phiếu quá khứ có dạng như sau:
=FA.Historical.[Trường thông tin]("Mã CK", "Ngày đầu tiên", "Ngày cuối cùng")
Trong đó:
- Mã CK: Là mã cổ phiếu niêm yết hoặc Index(VNINDEX, HNXINDEX,UPINDEX, VN30, HNX30,…)
- Trường thông tin: là tên trường tương ứng với một thông tin nhất định về giao dịch cổ phiếu trong quá khứ
- Ngày đầu tiên, Ngày cuối cùng: là khoảng thời gian bạn muốn xem thông tin. Hai ngày này không nhất thiết phải là ngày có giao dịch. Định dạng như sau: "YYYY-MM-DD"
Ví dụ:
Nếu muốn lấy giá đóng cửa các phiên giao dịch từ ngày 15-06-2016 đến ngày 22-06-2016 của mã ACB, ta dùng công thức:
=FA.Historical.Close("ACB","2016-06-15","2016-06-22")
Và để biết các ngày đó là ngày nào, ta dùng công thức:
=FA.Historical.Date("ACB","2016-06-15","2016-06-22")
Khoảng thời gian trong hai công thức phải giống nhau, và công thức cần nhập vào 2 ô thuộc 2 cột khác nhau nhưng cùng trên 1 dòng.
Lưu ý: Bạn có thể lưu các tham số vào các ô rồi truyền vào các công thức. Trong trường hợp này bạn cần bảo đảm tham số Ngày đầu tiên và Ngày cuối cùng là Text và có định dạng YYYY-MM-DD. Bạn có thể dùng hàm Text của Excel để chuyển dữ liệu thời gian thành Text với định dạng mong muốn.
Danh sách hàm
- FA.Historical.AdjRatio — Lấy hệ số điều chỉnh giá trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Average — Lấy giá trung bình trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Basic — Lấy giá tham chiếu trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.BuyCount — Lấy số lệnh đặt mua trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.BuyForeignQuantity — Lấy khối lượng nước ngoài mua trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.BuyForeignValue — Lấy giá trị nước ngoài mua trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.BuyQuantity — Lấy khối lượng đặt mua trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Close — Lấy giá đóng cửa trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.CurrentForeignRoom — Lấy room nhà đầu tư nước ngoài trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Date — Lấy các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.DealVolume — Lấy tổng khối lượng giao dịch khớp lệnh trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.High — Lấy giá cao nhất trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Low — Lấy giá thấp nhất trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.MarketCap — Lấy vốn hóa của cổ phiếu trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Open — Lấy giá mở cửa trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.PutthroughValue — Lấy giá trị giao dịch thỏa thuận trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.PutthroughVolume — Lấy tổng khối lượng giao dịch thỏa thuận trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.SellCount — Lấy số lệnh đặt bán trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.SellForeignQuantity — Lấy khối lượng nước ngoài bán trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.SellForeignValue — Lấy giá trị nước ngoài bán trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.SellQuantity — Lấy khối lượng đặt bán trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.Shares — Lấy số lượng CP lưu hành trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.TotalValue — Lấy tổng giá trị giao dịch trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
- FA.Historical.TotalVolume — Lấy tổng khối lượng giao dịch trong các ngày giao dịch của 1 mã hoặc index trong 1 khoảng thời gian
Syntax
The expression to get historical trading information of a stock has the following form:
=FA.Historical.[Trường thông tin]("Mã CK", "Ngày đầu tiên", "Ngày cuối cùng")
Where:
- Ticker: A listed stock ticker or an index (VNINDEX, HNXINDEX, UPINDEX, VN30, HNX30,…)
- Field: The field name corresponding to a specific piece of historical trading information
- First date, Last date: The period you want to view. These two dates do not have to be trading days. Format: "YYYY-MM-DD"
Example:
To get the closing prices of the trading sessions from 15-06-2016 to 22-06-2016 for ACB, use the formula:
=FA.Historical.Close("ACB","2016-06-15","2016-06-22")
And to know which dates those are, use the formula:
=FA.Historical.Date("ACB","2016-06-15","2016-06-22")
The period in both formulas must be the same, and the formulas must be entered in 2 cells in different columns but on the same row.
Notes: You can store the parameters in cells and pass them to the formulas. In this case, make sure the First date and Last date parameters are Text in the YYYY-MM-DD format. You can use Excel's Text function to convert dates into Text with the desired format.
Function list
- FA.Historical.AdjRatio — Get the price adjustment factor for the trading days of a ticker or index over a period
- FA.Historical.Average — Get the average price for the trading days of a ticker or index over a period
- FA.Historical.Basic — Get the reference price for the trading days of a ticker or index over a period
- FA.Historical.BuyCount — Get the number of buy orders for the trading days of a ticker or index over a period
- FA.Historical.BuyForeignQuantity — Get the foreign buy volume for the trading days of a ticker or index over a period
- FA.Historical.BuyForeignValue — Get the foreign buy value for the trading days of a ticker or index over a period
- FA.Historical.BuyQuantity — Get the buy order volume for the trading days of a ticker or index over a period
- FA.Historical.Close — Get the closing price for the trading days of a ticker or index over a period
- FA.Historical.CurrentForeignRoom — Get the foreign investor room for the trading days of a ticker or index over a period
- FA.Historical.Date — Get the trading days of a ticker or index over a period
- FA.Historical.DealVolume — Get the total matched trading volume for the trading days of a ticker or index over a period
- FA.Historical.High — Get the highest price for the trading days of a ticker or index over a period
- FA.Historical.Low — Get the lowest price for the trading days of a ticker or index over a period
- FA.Historical.MarketCap — Get the market capitalization for the trading days of a ticker or index over a period
- FA.Historical.Open — Get the opening price for the trading days of a ticker or index over a period
- FA.Historical.PutthroughValue — Get the negotiated (put-through) trading value for the trading days of a ticker or index over a period
- FA.Historical.PutthroughVolume — Get the total negotiated trading volume for the trading days of a ticker or index over a period
- FA.Historical.SellCount — Get the number of sell orders for the trading days of a ticker or index over a period
- FA.Historical.SellForeignQuantity — Get the foreign sell volume for the trading days of a ticker or index over a period
- FA.Historical.SellForeignValue — Get the foreign sell value for the trading days of a ticker or index over a period
- FA.Historical.SellQuantity — Get the sell order volume for the trading days of a ticker or index over a period
- FA.Historical.Shares — Get the number of outstanding shares for the trading days of a ticker or index over a period
- FA.Historical.TotalValue — Get the total trading value for the trading days of a ticker or index over a period
- FA.Historical.TotalVolume — Get the total trading volume for the trading days of a ticker or index over a period
구문
과거 주식 거래 정보를 가져오는 수식은 다음과 같은 형태입니다:
=FA.Historical.[Trường thông tin]("Mã CK", "Ngày đầu tiên", "Ngày cuối cùng")
여기서:
- 종목 코드: 상장 종목 코드 또는 지수 (VNINDEX, HNXINDEX, UPINDEX, VN30, HNX30,…)
- 필드: 과거 주식 거래의 특정 정보에 해당하는 필드 이름
- 첫째 날짜, 마지막 날짜: 조회하려는 기간. 두 날짜는 반드시 거래일일 필요는 없습니다. 형식: "YYYY-MM-DD"
예시:
ACB 종목의 2016-06-15부터 2016-06-22까지 거래 세션 종가를 가져오려면 다음 수식을 사용합니다:
=FA.Historical.Close("ACB","2016-06-15","2016-06-22")
그리고 해당 날짜가 언제인지 확인하려면 다음 수식을 사용합니다:
=FA.Historical.Date("ACB","2016-06-15","2016-06-22")
두 수식의 기간은 동일해야 하며, 수식은 같은 행의 서로 다른 두 열 셀에 입력해야 합니다.
참고: 매개변수를 셀에 저장한 뒤 수식에 전달할 수 있습니다. 이 경우 첫째 날짜와 마지막 날짜 매개변수는 YYYY-MM-DD 형식의 텍스트여야 합니다. Excel의 TEXT 함수를 사용하여 날짜 데이터를 원하는 형식의 텍스트로 변환할 수 있습니다.
함수 목록
- FA.Historical.AdjRatio — 특정 종목 또는 지수의 기간 내 거래일별 가격 조정 계수 조회
- FA.Historical.Average — 특정 종목 또는 지수의 기간 내 거래일별 평균 가격 조회
- FA.Historical.Basic — 특정 종목 또는 지수의 기간 내 거래일별 기준가 조회
- FA.Historical.BuyCount — 특정 종목 또는 지수의 기간 내 거래일 별 매수 주문 수 조회
- FA.Historical.BuyForeignQuantity — 특정 종목 또는 지수의 기간 내 거래일별 외국인 매수 수량 조회
- FA.Historical.BuyForeignValue — 특정 종목 또는 지수의 기간 내 거래일별 외국인 매수 금액 조회
- FA.Historical.BuyQuantity — 특정 종목 또는 지수의 기간 내 거래일별 매수 주문 수량 조회
- FA.Historical.Close — 특정 종목 또는 지수의 기간 내 거래일별 종가 조회
- FA.Historical.CurrentForeignRoom — 특정 종목 또는 지수의 기간 내 거래일별 외국인 보유 한도 잔여(room) 조회
- FA.Historical.Date — 특정 종목 또는 지수의 기간 내 거래일 조회
- FA.Historical.DealVolume — 특정 종목 또는 지수의 기간 내 거래일별 총 체결 거래량 조회
- FA.Historical.High — 특정 종목 또는 지수의 기간 내 거래일별 최고가 조회
- FA.Historical.Low — 특정 종목 또는 지수의 기간 내 거래일별 최저가 조회
- FA.Historical.MarketCap — 특정 종목 또는 지수의 기간 내 거래일별 시가총액 조회
- FA.Historical.Open — 특정 종목 또는 지수의 기간 내 거래일별 시가 조회
- FA.Historical.PutthroughValue — 특정 종목 또는 지수의 기간 내 거래일별 협의(퍼트스루) 거래 대금 조회
- FA.Historical.PutthroughVolume — 특정 종목 또는 지수의 기간 내 거래일별 총 협의 거래량 조회
- FA.Historical.SellCount — 특정 종목 또는 지수의 기간 내 거래일별 매도 주문 수 조회
- FA.Historical.SellForeignQuantity — 특정 종목 또는 지수의 기간 내 거래일별 외국인 매도 수량 조회
- FA.Historical.SellForeignValue — 특정 종목 또는 지수의 기간 내 거래일별 외국인 매도 금액 조회
- FA.Historical.SellQuantity — 특정 종목 또는 지수의 기간 내 거래일별 매도 주문 수량 조회
- FA.Historical.Shares — 특정 종목 또는 지수의 기간 내 거래일별 유통 주식 수 조회
- FA.Historical.TotalValue — 특정 종목 또는 지수의 기간 내 거래일별 총 거래 대금 조회
- FA.Historical.TotalVolume — 특정 종목 또는 지수의 기간 내 거래일별 총 거래량 조회
语法
获取股票历史交易信息的表达式形式如下:
=FA.Historical.[Trường thông tin]("Mã CK", "Ngày đầu tiên", "Ngày cuối cùng")
其中:
- 股票代码: 上市股票代码或指数 (VNINDEX, HNXINDEX, UPINDEX, VN30, HNX30,…)
- 字段: 对应某项历史交易信息的字段名称
- 起始日期、截 止日期: 您想查看的时间段。这两个日期不一定是交易日。格式: "YYYY-MM-DD"
示例:
若要获取 ACB 在 2016-06-15 至 2016-06-22 各交易日的收盘价,使用公式:
=FA.Historical.Close("ACB","2016-06-15","2016-06-22")
若要了解这些日期具体是哪几天,使用公式:
=FA.Historical.Date("ACB","2016-06-15","2016-06-22")
两个公式中的时间段必须相同,且公式需输入在同一行、不同列的两个单元格中。
注意: 您可以将参数保存在单元格中再传入公式。此时请确保 起始日期 和 截止日期 参数为文本,且格式为 YYYY-MM-DD。您可以使用 Excel 的 TEXT 函数将日期数据转换为所需格式的文本。
函数列表
- FA.Historical.AdjRatio — 获取某只股票或指数在一段时间内各交易日的价格调整系数
- FA.Historical.Average — 获取某只股票或指数在一段时间内各交易日的平均价
- FA.Historical.Basic — 获取某只股票或指数在一段时间内各交易日的参考价
- FA.Historical.BuyCount — 获取某只股票或指数在一段时间内各交易日的买入委托笔数
- FA.Historical.BuyForeignQuantity — 获取某只股票或指数在一段时间内各交易日的外资买入数量
- FA.Historical.BuyForeignValue — 获取某只股票或指数在一段时间内各交易日的外资买入金额
- FA.Historical.BuyQuantity — 获取某只股票或指数在一段时间内各交易日的买入委托数量
- FA.Historical.Close — 获取某只股票或指数在一段时间内各交易日的收盘价
- FA.Historical.CurrentForeignRoom — 获取某只股票或指数在一段时间内各交易日的外资可投资额度(room)
- FA.Historical.Date — 获取某只股票或指数在一段时间内的交易日
- FA.Historical.DealVolume — 获取某只股票或指数在一段时间内各交易日的撮合成交总量
- FA.Historical.High — 获取某只股票或指数在一段时间内各交易日的最高价
- FA.Historical.Low — 获取某只股票或指数在一段时间内各交易日的最低价
- FA.Historical.MarketCap — 获取某只股票或指数在一段时间内各交易日的市值
- FA.Historical.Open — 获取某只股票或指数在一段时间内各交易日的开盘价
- FA.Historical.PutthroughValue — 获取某只股票或指数在一段时间内各交易日的协议成交金额
- FA.Historical.PutthroughVolume — 获取某只股票或指数在一段时间内各交易日的协议成交总量
- FA.Historical.SellCount — 获取某只股票或指数在一段时间内各交易日的卖出委托笔数
- FA.Historical.SellForeignQuantity — 获取某只股票或指数在一段时间内各交易日的外资卖出数量
- FA.Historical.SellForeignValue — 获取某只股票或指数在一段时间内各交易日的外资卖出金额
- FA.Historical.SellQuantity — 获取某只股票或指数在一段时间内各交易日的卖出委托数量
- FA.Historical.Shares — 获取某只股票或指数在一段时间内各交易日的流通股数
- FA.Historical.TotalValue — 获取某只股票或指数在一段时间内各交易日的总成交金额
- FA.Historical.TotalVolume — 获取某只股票或指数在一段时间内各交易日的总成交量