Estimation and Inference for Context-Specific Causal Average Treatment Effect and Optimal Individualized Treatment Effect with Single Time Series