As one of the most widely used memristor models, the spintronic memristor has become a promising candidate for the electronic synapse. Non-volatility, nanoscale geometries, binary data and multi-level information storage make the circuit simpler and consume less electricity. In this study, a new spintronic memristor synaptic circuit is proposed which can realise positive, zero and negative weights successfully. Furthermore, the circuits of the presented synaptic-based neuron and compact neural network are designed and an improved random weight change (RWC) algorithm is proposed. Compared with the traditional RWC algorithm, it has faster training speed and less training error. In addition, the neural network is applied to data prediction, the result of which is closer to real data. Finally, the correctness and effectiveness of the proposed network are verified via a series of computer simulations.