  Let A be an abelian variety over a number field K. An identity between the
L-functions L(A/K_i,s) for extensions K_i of K induces a conjectural relation
between the Birch-Swinnerton-Dyer quotients. We prove these relations modulo
finiteness of Sha, and give an analogous statement for Selmer groups. Based on
this, we develop a method for determining the parity of various combinations of
ranks of A over extensions of K. As one of the applications, we establish the
parity conjecture for elliptic curves assuming finiteness of Sha[6^\infty] and
some restrictions on the reduction at primes above 2 and 3: the parity of the
Mordell-Weil rank of E/K agrees with the parity of the analytic rank, as
determined by the root number. We also prove the p-parity conjecture for all
elliptic curves over Q and all primes p: the parities of the p^\infty-Selmer
rank and the analytic rank agree.
