【backtrader源码解析49】analyzers中tradeanalyzer.py、periodstats.py、drawdown.py三个文件源代码解读(枯燥,仅供参考)

tradeanalyzer.py、periodstats.py、drawdown.py三个文件解读

tradeanalyzer.py

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

import sys

from backtrader import Analyzer
from backtrader.utils import AutoOrderedDic
lock